Merge branch 'event_monitor' of git://github.com/ankitagarwal/moodle
This commit is contained in:
+15
-2
@@ -3753,7 +3753,7 @@ class settings_navigation extends navigation_node {
|
||||
|
||||
// View course reports.
|
||||
if (has_capability('moodle/site:viewreports', $coursecontext)) { // Basic capability for listing of reports.
|
||||
$reportnav = $coursenode->add(get_string('reports'), null, self::TYPE_CONTAINER, null, null,
|
||||
$reportnav = $coursenode->add(get_string('reports'), null, self::TYPE_CONTAINER, null, 'coursereports',
|
||||
new pix_icon('i/stats', ''));
|
||||
$coursereports = core_component::get_plugin_list('coursereport');
|
||||
foreach ($coursereports as $report => $dir) {
|
||||
@@ -3891,6 +3891,13 @@ class settings_navigation extends navigation_node {
|
||||
$switchroles->add($name, $url, self::TYPE_SETTING, null, $key, new pix_icon('i/switchrole', ''));
|
||||
}
|
||||
}
|
||||
|
||||
// Let admin tools hook into course navigation.
|
||||
$tools = get_plugin_list_with_function('tool', 'extend_navigation_course', 'lib.php');
|
||||
foreach ($tools as $toolfunction) {
|
||||
$toolfunction($coursenode, $course, $coursecontext);
|
||||
}
|
||||
|
||||
// Return we are done
|
||||
return $coursenode;
|
||||
}
|
||||
@@ -4205,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
|
||||
@@ -4323,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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user