MDL-21432 backup - complete standard/course outcomes backup & restore
[moodle.git] / backup / moodle2 / restore_root_task.class.php
index 588e1e1..98128fe 100644 (file)
@@ -40,6 +40,9 @@ class restore_root_task extends restore_task {
         // If we haven't preloaded information, load all the included inforef records to temp_ids table
         $this->add_step(new restore_load_included_inforef_records('load_inforef_records'));
 
+        // If we haven't preloaded information, load all the needed roles to temp_ids_table
+        $this->add_step(new restore_load_and_map_roles('load_and_map_roles'));
+
         // If we haven't preloaded information and are restoring user info, load all the needed users to temp_ids table
         $this->add_step(new restore_load_included_users('load_user_records'));
 
@@ -48,6 +51,25 @@ class restore_root_task extends restore_task {
         // performed the same process so, it's not possible to have errors here
         $this->add_step(new restore_process_included_users('process_user_records'));
 
+        // Load all the needed files to temp_ids table
+        $this->add_step(new restore_load_included_files('load_file_records', 'files.xml'));
+
+        // Unconditionally, create all the needed users calculated in the previous step
+        $this->add_step(new restore_create_included_users('create_users'));
+
+        // Unconditionally, load create all the needed groups and groupings
+        $this->add_step(new restore_groups_structure_step('create_groups_and_groupings', 'groups.xml'));
+
+        // Unconditionally, load create all the needed scales
+        $this->add_step(new restore_scales_structure_step('create_scales', 'scales.xml'));
+
+        // Unconditionally, load create all the needed outcomes
+        $this->add_step(new restore_outcomes_structure_step('create_scales', 'outcomes.xml'));
+
+        // Unconditionally, load create all the needed outcomes.
+        // TODO: restore outcomes
+        // $this->add_step(new restore_outcomes_structure_step('create_outcomes', 'outcomes.xml'));
+
         // At the end, mark it as built
         $this->built = true;
     }