From 8802254c8ed5ca9119541fddb3ef3f7b75d80bd3 Mon Sep 17 00:00:00 2001 From: Peter Dias Date: Thu, 10 Mar 2022 14:12:16 +0800 Subject: [PATCH] MDL-74154 calendar: Disable secondary nav in calendar --- calendar/delete.php | 1 + calendar/event.php | 2 +- calendar/export.php | 1 + calendar/import.php | 1 + calendar/managesubscriptions.php | 1 + calendar/view.php | 1 + 6 files changed, 6 insertions(+), 1 deletion(-) diff --git a/calendar/delete.php b/calendar/delete.php index 79f464fccda28..f88b2f31cb3f7 100644 --- a/calendar/delete.php +++ b/calendar/delete.php @@ -94,6 +94,7 @@ $PAGE->navbar->add($title); $PAGE->set_title($site->shortname.': '.$strcalendar.': '.$title); $PAGE->set_heading($COURSE->fullname); +$PAGE->has_secondary_navigation_setter(false); echo $OUTPUT->header(); echo $OUTPUT->box_start('eventlist'); diff --git a/calendar/event.php b/calendar/event.php index 9eb3708bdfcfe..366680b3b6672 100644 --- a/calendar/event.php +++ b/calendar/event.php @@ -193,7 +193,7 @@ $PAGE->navbar->add($title); $PAGE->set_title($course->shortname.': '.$strcalendar.': '.$title); $PAGE->set_heading($course->fullname); - +$PAGE->has_secondary_navigation_setter(false); $renderer = $PAGE->get_renderer('core_calendar'); $calendar->add_sidecalendar_blocks($renderer); diff --git a/calendar/export.php b/calendar/export.php index cb48f4cc8b771..f530670da9aec 100644 --- a/calendar/export.php +++ b/calendar/export.php @@ -131,6 +131,7 @@ $PAGE->set_title($course->shortname.': '.get_string('calendar', 'calendar').': '.$pagetitle); $PAGE->set_heading($headingstr); $PAGE->set_pagelayout('standard'); +$PAGE->has_secondary_navigation_setter(false); $renderer = $PAGE->get_renderer('core_calendar'); $calendar->add_sidecalendar_blocks($renderer); diff --git a/calendar/import.php b/calendar/import.php index 52bb68eeb0677..2ae2c1e6e1b34 100644 --- a/calendar/import.php +++ b/calendar/import.php @@ -69,6 +69,7 @@ $heading = get_string('importcalendar', 'calendar'); $pagetitle = $course->shortname . ': ' . get_string('calendar', 'calendar') . ': ' . $heading; +$PAGE->has_secondary_navigation_setter(false); $PAGE->set_title($pagetitle); $PAGE->set_heading($heading); $PAGE->set_url($pageurl); diff --git a/calendar/managesubscriptions.php b/calendar/managesubscriptions.php index 26c03a170fac3..5a61205fb8a03 100644 --- a/calendar/managesubscriptions.php +++ b/calendar/managesubscriptions.php @@ -53,6 +53,7 @@ $PAGE->set_url($url); $PAGE->set_pagelayout('admin'); +$PAGE->has_secondary_navigation_setter(false); if ($courseid != SITEID && !empty($courseid)) { // Course ID must be valid and existing. diff --git a/calendar/view.php b/calendar/view.php index 1b7e12925ee55..f6fb422817926 100644 --- a/calendar/view.php +++ b/calendar/view.php @@ -111,6 +111,7 @@ } else { $PAGE->set_context(context_system::instance()); } +$PAGE->has_secondary_navigation_setter(false); require_login($course, false);