navigation MDL-22425 Fixed minor bug when logged in as student and viewing a course without the view participants permission

This commit is contained in:
Sam Hemelryk
2010-05-25 03:34:08 +00:00
parent c4979f0220
commit 533299cbec
+1 -1
View File
@@ -1769,7 +1769,7 @@ class global_navigation extends navigation_node {
if (!empty($CFG->enablenotes) && (has_capability('moodle/notes:manage', $this->page->context) || has_capability('moodle/notes:view', $this->page->context))) {
$participants->add(get_string('notes','notes'), new moodle_url('/notes/index.php', array('filtertype'=>'course', 'filterselect'=>$filterselect)));
}
} else if (count($this->extendforuser) > 0) {
} else if (count($this->extendforuser) > 0 || $this->page->course->id == $course->id) {
$participants = $coursenode->add(get_string('participants'), null, self::TYPE_CONTAINER, get_string('participants'), 'participants');
}