$renderer = $PAGE->get_renderer('core', 'backup'); echo $OUTPUT->header(); // Prepare a progress bar which can display optionally during long-running // operations while setting up the UI. $slowprogress = new \core\progress\display_if_slow(get_string('preparingui', 'backup')); $previous = optional_param('previous', false, PARAM_BOOL); if ($backup->get_stage() == backup_ui::STAGE_SCHEMA && !$previous) { // After schema stage, we are probably going to get to the confirmation stage, // The confirmation stage has 2 sets of progress, so this is needed to prevent // it showing 2 progress bars. $twobars = true; $slowprogress->start_progress('', 2); } else { $twobars = false; } $backup->get_controller()->set_progress($slowprogress); $backup->process(); if ($backup->enforce_changed_dependencies()) { debugging('Your settings have been altered due to unmet dependencies', DEBUG_DEVELOPER); } $loghtml = ''; if ($backup->get_stage() == backup_ui::STAGE_FINAL) { // Display an extra backup step bar so that we can show the 'processing' step first. echo html_writer::start_div('', array('id' => 'executionprogress')); echo $renderer->progress_bar($backup->get_progress_bar()); $backup->get_controller()->set_progress(new \core\progress\display()); // Prepare logger and add to end of chain. $logger = new core_backup_html_logger($CFG->debugdeveloper ? backup::LOG_DEBUG : backup::LOG_INFO); $backup->get_controller()->add_logger($logger); // Carry out actual backup. $backup->execute();
$renderer = $PAGE->get_renderer('core', 'backup'); echo $OUTPUT->header(); // Prepare a progress bar which can display optionally during long-running // operations while setting up the UI. $slowprogress = new core_backup_display_progress_if_slow(get_string('preparingui', 'backup')); $previous = optional_param('previous', false, PARAM_BOOL); if ($backup->get_stage() == backup_ui::STAGE_SCHEMA && !$previous) { // After schema stage, we are probably going to get to the confirmation stage, // The confirmation stage has 2 sets of progress, so this is needed to prevent // it showing 2 progress bars. $twobars = true; $slowprogress->start_progress('', 2); } else { $twobars = false; } $backup->get_controller()->set_progress($slowprogress); $backup->process(); if ($backup->enforce_changed_dependencies()) { debugging('Your settings have been altered due to unmet dependencies', DEBUG_DEVELOPER); } $loghtml = ''; if ($backup->get_stage() == backup_ui::STAGE_FINAL) { // Display an extra backup step bar so that we can show the 'processing' step first. echo html_writer::start_div('', array('id' => 'executionprogress')); echo $renderer->progress_bar($backup->get_progress_bar()); $backup->get_controller()->set_progress(new core_backup_display_progress()); // Prepare logger and add to end of chain. $logger = new core_backup_html_logger($CFG->debugdeveloper ? backup::LOG_DEBUG : backup::LOG_INFO); $backup->get_controller()->add_logger($logger); // Carry out actual backup. $backup->execute();