mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-78457 course: remove participants navigation if cannot access.
This commit is contained in:
parent
342319339f
commit
8507384ccc
@ -2968,6 +2968,9 @@ class global_navigation extends navigation_node {
|
||||
}
|
||||
} else if (count($this->extendforuser) > 0) {
|
||||
$coursenode->add(get_string('participants'), null, self::TYPE_CONTAINER, get_string('participants'), 'participants');
|
||||
} else if ($siteparticipantsnode = $this->rootnodes['site']->get('participants', self::TYPE_CUSTOM)) {
|
||||
// The participants node was added for the site, but cannot be viewed inside the course itself, so remove.
|
||||
$siteparticipantsnode->remove();
|
||||
}
|
||||
|
||||
// Badges.
|
||||
|
Loading…
x
Reference in New Issue
Block a user