Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-27855 navigation - only display participants link with permissions

  • Loading branch information...
commit 8b0614d9eaac91575f5f038751172711beb17a1d 1 parent d64baec
@danpoltawski danpoltawski authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/navigationlib.php
View
4 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) {
Please sign in to comment.
Something went wrong with that request. Please try again.