Permalink
Browse files

MDL-27855 navigation - only display participants link with permissions

  • Loading branch information...
danpoltawski authored and Sam Hemelryk committed Jul 3, 2011
1 parent 668a9eb commit a35be2f5ef7172435e1fb311874149dccc4727c3
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/navigationlib.php
View
@@ -1626,7 +1626,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 a35be2f

Please sign in to comment.