From fefd9fed8308fab136f80ff588f54f3cc08c693f Mon Sep 17 00:00:00 2001 From: Neill Magill Date: Thu, 18 Aug 2016 08:49:59 +0100 Subject: [PATCH] MDL-55618 backup: Header should not be output twice Before this patch if the pre-check failed during the final stage of an import a request for the page header to be output was made for a second time, this caused a coding_error to occur. This change removes the second request to output the page header, which will allow the user to see the reasons the pre-check failed. --- backup/import.php | 1 - 1 file changed, 1 deletion(-) diff --git a/backup/import.php b/backup/import.php index af3cf3df6f7..04681c9b1ba 100644 --- a/backup/import.php +++ b/backup/import.php @@ -145,7 +145,6 @@ if ($backup->get_stage() == backup_ui::STAGE_FINAL) { if (!empty($precheckresults['errors'])) { // If errors are found, terminate the import. fulldelete($tempdestination); - echo $OUTPUT->header(); echo $renderer->precheck_notices($precheckresults); echo $OUTPUT->continue_button(new moodle_url('/course/view.php', array('id'=>$course->id))); echo $OUTPUT->footer();