Commit e7f9b7ab authored by Sam Hemelryk's avatar Sam Hemelryk
Browse files

MDL-28549 navigation: Added a missing login check when adding the calendar link to the navigation

parent b77088cd
......@@ -2319,9 +2319,11 @@ class global_navigation extends navigation_node {
$coursenode->add(get_string('tags', 'tag'), new moodle_url('/tag/search.php'));
}
// Calendar
$calendarurl = new moodle_url('/calendar/view.php', array('view' => 'month'));
$coursenode->add(get_string('calendar', 'calendar'), $calendarurl, self::TYPE_CUSTOM, null, 'calendar');
if (isloggedin()) {
// Calendar
$calendarurl = new moodle_url('/calendar/view.php', array('view' => 'month'));
$coursenode->add(get_string('calendar', 'calendar'), $calendarurl, self::TYPE_CUSTOM, null, 'calendar');
}
// View course reports
if (has_capability('moodle/site:viewreports', $this->page->context)) { // basic capability for listing of reports
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment