Exemplo n.º 1
0
        }
        $restore = new restore_ui($rc, array('contextid' => $context->id));
    }
}
$outcome = $restore->process();
if (!$restore->is_independent()) {
    if ($restore->get_stage() == restore_ui::STAGE_PROCESS && !$restore->requires_substage()) {
        try {
            $restore->execute();
        } catch (Exception $e) {
            $restore->cleanup();
            throw $e;
        }
    } else {
        $restore->save_controller();
    }
}
$heading = $course->fullname;
$PAGE->set_title($heading . ': ' . $restore->get_stage_name());
$PAGE->set_heading($heading);
$PAGE->navbar->add($restore->get_stage_name());
$renderer = $PAGE->get_renderer('core', 'backup');
echo $OUTPUT->header();
if (!$restore->is_independent() && $restore->enforce_changed_dependencies()) {
    debugging('Your settings have been altered due to unmet dependencies', DEBUG_DEVELOPER);
}
echo $renderer->progress_bar($restore->get_progress_bar());
echo $restore->display($renderer);
$restore->destroy();
unset($restore);
echo $OUTPUT->footer();