mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
navigation MDL-1001 Fixed wrong capability during context call
This commit is contained in:
parent
63442fe14a
commit
b475cf4cbc
@ -1972,7 +1972,7 @@ class global_navigation extends navigation_node {
|
||||
$coursenode->add('frontpageloaded', null, self::TYPE_CUSTOM, null, 'frontpageloaded')->display = false;
|
||||
|
||||
//Participants
|
||||
if (has_capability('moodle/course:viewparticipants', $this->page->context)) {
|
||||
if (has_capability('moodle/course:viewparticipants', get_system_context())) {
|
||||
$coursenode->add(get_string('participants'), new moodle_url('/user/index.php?id='.$course->id), self::TYPE_CUSTOM, get_string('participants'), 'participants');
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user