$rc = new restore_controller($restore->get_filepath(), $restore->get_course_id(), backup::INTERACTIVE_YES, backup::MODE_GENERAL, $USER->id, $restore->get_target()); } } if ($rc) { // check if the format conversion must happen first if ($rc->get_status() == backup::STATUS_REQUIRE_CONV) { $rc->convert(); } $restore = new restore_ui($rc, array('contextid'=>$context->id)); } } // End progress section for loading restore controller. $slowprogress->end_progress(); // This progress section is for the 'process' function below. $slowprogress->start_progress('', 1, 9); // Depending on the code branch above, $restore may be a restore_ui or it may // be a restore_ui_independent_stage. Either way, this function exists. $restore->set_progress_reporter($slowprogress); $outcome = $restore->process(); if (!$restore->is_independent() && $restore->enforce_changed_dependencies()) { debugging('Your settings have been altered due to unmet dependencies', DEBUG_DEVELOPER); } $loghtml = ''; // Finish the 'process' progress reporting section, and the overall count.