Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-28549 navigation: Added a missing login check when adding the cal…

…endar link to the navigation
  • Loading branch information...
commit 63f81e076d273d1e1d91db456946da2af49fb68b 1 parent 75371a7
@samhemelryk samhemelryk authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 lib/navigationlib.php
View
8 lib/navigationlib.php
@@ -2300,9 +2300,11 @@ public function add_front_page_course_essentials(navigation_node $coursenode, st
$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
Please sign in to comment.
Something went wrong with that request. Please try again.