Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-31463 - navigation - added a context check in the navigation for …

…fullname permission.
  • Loading branch information...
commit 76565fa1029ed2d884c880afbfc870493f1b2a29 1 parent baa5cd8
@abgreeve abgreeve authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/navigationlib.php
View
3  lib/navigationlib.php
@@ -1943,7 +1943,8 @@ protected function load_for_user($user=null, $forceforcontext=false) {
return false;
}
// Add a branch for the current user
- $usernode = $usersnode->add(fullname($user, true), $userviewurl, self::TYPE_USER, null, $user->id);
+ $canseefullname = has_capability('moodle/site:viewfullnames', $coursecontext);
+ $usernode = $usersnode->add(fullname($user, $canseefullname), $userviewurl, self::TYPE_USER, null, $user->id);
if ($this->page->context->contextlevel == CONTEXT_USER && $user->id == $this->page->context->instanceid) {
$usernode->make_active();
Please sign in to comment.
Something went wrong with that request. Please try again.