diff --git a/backup/moodle2/restore_section_task.class.php b/backup/moodle2/restore_section_task.class.php index 5c03bcb7b85..b09506c6be1 100644 --- a/backup/moodle2/restore_section_task.class.php +++ b/backup/moodle2/restore_section_task.class.php @@ -71,11 +71,9 @@ class restore_section_task extends restore_task { // Define the task contextid (the course one) $this->contextid = get_context_instance(CONTEXT_COURSE, $this->get_courseid())->id; - // Executed conditionally if restoring to new course or deleting or if overwrite_conf setting is enabled - if ($this->get_target() == backup::TARGET_NEW_COURSE || $this->get_target() == backup::TARGET_CURRENT_DELETING || - $this->get_target() == backup::TARGET_EXISTING_DELETING || $this->get_setting_value('overwrite_conf') == true) { - $this->add_step(new restore_section_structure_step('course_info', 'section.xml')); - } + // We always try to restore as much info from sections as possible, no matter of the type + // of restore (new, existing, deleting, import...). MDL-27764 + $this->add_step(new restore_section_structure_step('course_info', 'section.xml')); // At the end, mark it as built $this->built = true;