. /** * @package moodlecore * @subpackage backup-moodle2 * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ /** * Final task that provides all the final steps necessary in order to finish one * restore like gradebook, interlinks... apart from some final cleaning * * TODO: Finish phpdocs */ class restore_final_task extends restore_task { /** * Create all the steps that will be part of this task */ public function build() { // Review all the block_position records in backup_ids in order // match them now that all the contexts are created populating DB // as needed. Only if we are restoring blocks. if ($this->get_setting_value('blocks')) { $this->add_step(new restore_review_pending_block_positions('review_block_positions')); } // Gradebook //how do I check if I need to restore the gradebook //$this->add_step(new restore_gradebook_step('gradebook_step','gradebook.xml')); // Decode all the interlinks $this->add_step(new restore_decode_interlinks('decode_interlinks')); // Rebuild course cache to see results, whoah! $this->add_step(new restore_rebuild_course_cache('rebuild_course_cache')); // Clean the temp dir (conditionally) and drop temp table $this->add_step(new restore_drop_and_clean_temp_stuff('drop_and_clean_temp_stuff')); $this->built = true; } // Protected API starts here /** * Define the common setting that any restore type will have */ protected function define_settings() { // This task has not settings (could have them, like destination or so in the future, let's see) } }