MDL-27855 navigation - only display participants link with permissions

This commit is contained in:
Dan Poltawski
2011-07-06 13:19:59 +08:00
committed by Sam Hemelryk
parent 668a9eb90b
commit a35be2f5ef
+3 -1
View File
@@ -1626,7 +1626,9 @@ class global_navigation extends navigation_node {
} else {
// This is the site so add a users node to the root branch
$usersnode = $this->rootnodes['users'];
$usersnode->action = new moodle_url('/user/index.php', array('id'=>$course->id));
if (has_capability('moodle/course:viewparticipants', $coursecontext)) {
$usersnode->action = new moodle_url('/user/index.php', array('id'=>$course->id));
}
$userviewurl = new moodle_url('/user/profile.php', $baseargs);
}
if (!$usersnode) {