MDL-74154 calendar: Disable secondary nav in calendar

This commit is contained in:
Peter Dias 2022-03-10 14:12:16 +08:00
parent 967d9b2546
commit 8802254c8e
6 changed files with 6 additions and 1 deletions

View File

@ -94,6 +94,7 @@ $PAGE->navbar->add($strcalendar, $viewcalendarurl);
$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');

View File

@ -193,7 +193,7 @@ $PAGE->navbar->add($strcalendar, $viewcalendarurl);
$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);

View File

@ -131,6 +131,7 @@ $headingstr = ($courseid != SITEID && !empty($courseid)) ? "{$headingstr}: {$COU
$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);

View File

@ -69,6 +69,7 @@ if (!calendar_user_can_add_event($course)) {
$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);

View File

@ -53,6 +53,7 @@ if ($courseid != SITEID && !empty($courseid)) {
$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.

View File

@ -111,6 +111,7 @@ if ($iscoursecalendar && !empty($courseid)) {
} else {
$PAGE->set_context(context_system::instance());
}
$PAGE->has_secondary_navigation_setter(false);
require_login($course, false);