From 8d137307bf8230a211504807e1a5a9054a6554aa Mon Sep 17 00:00:00 2001 From: sam marshall Date: Tue, 17 Sep 2013 14:43:25 +0100 Subject: [PATCH] MDL-41840 Restore: Page title, breadcrumbs show incorrect stage Unfortunately it isn't possible to display the current stage before printing header any more, because we need to be able to show a progress bar while doing the code that considers whether or not priunt stage. So this change removes stage information from page title. It is still present (in bold) in the strip that shows where you are within the restore/import. This display was inconsistent anyway; change makes it consistent between Restore and Import. --- backup/import.php | 11 ++--------- backup/restore.php | 7 ++----- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/backup/import.php b/backup/import.php index 13ad15a7b22..8c75014fa3c 100644 --- a/backup/import.php +++ b/backup/import.php @@ -25,11 +25,9 @@ require_login($course); // Must hold restoretargetimport in the current course require_capability('moodle/restore:restoretargetimport', $context); -$heading = get_string('import'); - // Set up the page -$PAGE->set_title($heading); -$PAGE->set_heading($heading); +$PAGE->set_title($course->shortname . ': ' . get_string('import')); +$PAGE->set_heading($course->fullname); $PAGE->set_url(new moodle_url('/backup/import.php', array('id'=>$courseid))); $PAGE->set_context($context); $PAGE->set_pagelayout('incourse'); @@ -182,11 +180,6 @@ if ($backup->get_stage() == backup_ui::STAGE_FINAL) { $backup->save_controller(); } -// Adjust the page for the stage -$PAGE->set_title($heading.': '.$backup->get_stage_name()); -$PAGE->set_heading($heading.': '.$backup->get_stage_name()); -$PAGE->navbar->add($backup->get_stage_name()); - // Display the current stage echo $OUTPUT->header(); if ($backup->enforce_changed_dependencies()) { diff --git a/backup/restore.php b/backup/restore.php index 6040d4b7639..7a6ed73f1b4 100644 --- a/backup/restore.php +++ b/backup/restore.php @@ -43,11 +43,8 @@ if ($stage & restore_ui::STAGE_CONFIRM + restore_ui::STAGE_DESTINATION) { } } -$heading = $course->fullname; - -$PAGE->set_title($heading.': '.$restore->get_stage_name()); -$PAGE->set_heading($heading); -$PAGE->navbar->add($restore->get_stage_name()); +$PAGE->set_title($course->shortname . ': ' . get_string('restore')); +$PAGE->set_heading($course->fullname); $renderer = $PAGE->get_renderer('core','backup'); echo $OUTPUT->header(); -- 2.43.0