Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

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.

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

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.

return: bool false if the file not found, just send the file otherwise and do not return anything
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

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.

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