Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Plugin version and other meta-data are defined here.

Copyright: 2018 David Mudrák <david@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 238 lines (8 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 7 functions


Functions that are not part of a class:

tool_policy_myprofile_navigation(tree $tree, $user, $iscurrentuser, $course)   X-Ref
Add nodes to myprofile page.

param: tree $tree Tree object
param: stdClass $user User object
param: bool $iscurrentuser
param: stdClass $course Course object
return: bool

tool_policy_before_standard_html_head()   X-Ref
Load policy message for guests.

return: string The HTML code to insert before the head.

tool_policy_standard_footer_html()   X-Ref
Callback to add footer elements.

return: string HTML footer content

tool_policy_pre_signup_requests()   X-Ref
Hooks redirection to policy acceptance pages before sign up.


tool_policy_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload, array $options=array()   X-Ref
Serve the embedded files.

param: stdClass $course the course object
param: stdClass $cm the course module object
param: stdClass $context the context
param: string $filearea the name of the file area
param: array $args extra arguments (itemid, path)
param: bool $forcedownload whether or not force download
param: array $options additional options affecting the file serving
return: bool false if the file not found, just send the file otherwise and do not return anything

tool_policy_get_fontawesome_icon_map()   X-Ref
Map icons for font-awesome themes.


tool_policy_output_fragment_accept_on_behalf($args)   X-Ref
Serve the new group form as a fragment.

param: array $args List of named arguments for the fragment loader.
return: string