Permalink
Browse files

MDL-27855 navigation - only display participants link with permissions

  • Loading branch information...
1 parent 35a39e3 commit fbb580c38a6c16d33a8004e48d60c398c09767ec @danpoltawski danpoltawski committed with Sam Hemelryk Jul 3, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/navigationlib.php
@@ -1817,7 +1817,9 @@ protected function load_for_user($user=null, $forceforcontext=false) {
} 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) {

0 comments on commit fbb580c

Please sign in to comment.