Commit 1bdb9caf authored by Eloy Lafuente's avatar Eloy Lafuente
Browse files

Merge branch 'MDL-72470-master' of https://github.com/sharidas/moodle

parents dc0e7a45 81b0d053
......@@ -123,11 +123,13 @@ $calendar->set_sources($course, $courses);
$pagetitle = get_string('export', 'calendar');
$PAGE->navbar->add(get_string('managesubscriptions', 'calendar'), $managesubscriptionsurl);
$PAGE->navbar->add($pagetitle);
$PAGE->navbar->add(get_string('exportcalendar', 'calendar'), $url);
// Print title and header.
$headingstr = get_string('calendar', 'core_calendar');
$headingstr = ($courseid != SITEID && !empty($courseid)) ? "{$headingstr}: {$COURSE->shortname}" : $headingstr;
$PAGE->set_title($course->shortname.': '.get_string('calendar', 'calendar').': '.$pagetitle);
$PAGE->set_heading($course->fullname);
$PAGE->set_heading($headingstr);
$PAGE->set_pagelayout('standard');
$renderer = $PAGE->get_renderer('core_calendar');
......
......@@ -98,14 +98,15 @@ if (!empty($category)) {
}
$heading = get_string('importcalendar', 'calendar');
$headingstr = get_string('calendar', 'core_calendar');
$headingstr = ($courseid != SITEID && !empty($courseid)) ? "{$headingstr}: {$COURSE->shortname}" : $headingstr;
$pagetitle = $course->shortname . ': ' . get_string('calendar', 'calendar') . ': ' . $heading;
$PAGE->set_title($pagetitle);
$PAGE->set_heading($heading);
$PAGE->set_heading($headingstr);
$PAGE->set_url($pageurl);
$PAGE->set_pagelayout('admin');
$PAGE->navbar->add(get_string('managesubscriptions', 'calendar'), $managesubscriptionsurl);
$PAGE->navbar->add($heading);
$PAGE->navbar->add($heading, $pageurl);
$renderer = $PAGE->get_renderer('core_calendar');
$customdata = [
......
......@@ -67,8 +67,7 @@ require_login($course, false);
if (!calendar_user_can_add_event($course)) {
print_error('errorcannotimport', 'calendar');
}
$PAGE->navbar->add(get_string('managesubscriptions', 'calendar'));
$PAGE->navbar->add(get_string('managesubscriptions', 'calendar'), $PAGE->url);
$types = calendar_get_allowed_event_types($courseid);
......@@ -140,7 +139,9 @@ $subscriptions = $DB->get_records_sql($sql, $params);
// Print title and header.
$PAGE->set_title("$course->shortname: ".get_string('calendar', 'calendar').": ".get_string('subscriptions', 'calendar'));
$PAGE->set_heading($course->fullname);
$heading = get_string('calendar', 'core_calendar');
$heading = ($courseid != SITEID && !empty($courseid)) ? "{$heading}: {$COURSE->shortname}" : $heading;
$PAGE->set_heading($heading);
$renderer = $PAGE->get_renderer('core_calendar');
......
......@@ -138,8 +138,8 @@ switch($view) {
$PAGE->set_pagelayout('standard');
$PAGE->set_title("$course->shortname: $strcalendar: $pagetitle");
$headingstr = ($iscoursecalendar) ? get_string('coursecalendar', 'core_calendar', $COURSE->shortname) :
get_string('calendar', 'core_calendar');
$headingstr = get_string('calendar', 'core_calendar');
$headingstr = ($iscoursecalendar) ? "{$headingstr}: {$COURSE->shortname}" : $headingstr;
$PAGE->set_heading($headingstr);
$renderer = $PAGE->get_renderer('core_calendar');
......
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