mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-45758 tool_monitor: Update navigation to add callbacks
User settings node now checks for callbacks in various admin tools
This commit is contained in:
parent
e8a925a60e
commit
b9ba26b222
@ -4212,7 +4212,7 @@ class settings_navigation extends navigation_node {
|
||||
if (empty($passwordchangeurl)) {
|
||||
$passwordchangeurl = new moodle_url('/login/change_password.php', array('id'=>$course->id));
|
||||
}
|
||||
$usersetting->add(get_string("changepassword"), $passwordchangeurl, self::TYPE_SETTING);
|
||||
$usersetting->add(get_string("changepassword"), $passwordchangeurl, self::TYPE_SETTING, null, 'changepassword');
|
||||
}
|
||||
|
||||
// View the roles settings
|
||||
@ -4330,6 +4330,12 @@ class settings_navigation extends navigation_node {
|
||||
$usersetting->add(get_string('loginas'), $url, self::TYPE_SETTING);
|
||||
}
|
||||
|
||||
// Let admin tools hook into user settings navigation.
|
||||
$tools = get_plugin_list_with_function('tool', 'extend_navigation_user_settings', 'lib.php');
|
||||
foreach ($tools as $toolfunction) {
|
||||
$toolfunction($usersetting, $user, $usercontext, $course, $coursecontext);
|
||||
}
|
||||
|
||||
return $usersetting;
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@ information provided here is intended especially for developers.
|
||||
it must be amended. It does not apply to lib/googleapi.php. See MDL-47297
|
||||
* Added an extra parameter to the function get_formatted_help_string() (default null) which is used to specify
|
||||
additional string parameters.
|
||||
* User settings node and course node in navigation now support callbacks from admin tools.
|
||||
|
||||
DEPRECATIONS:
|
||||
* completion_info->get_incomplete_criteria() is deprecated and will be removed in Moodle 3.0.
|
||||
|
Loading…
x
Reference in New Issue
Block a user