Permalink
Browse files

Merge branch 'MDL-27764_22' of git://github.com/stronk7/moodle into M…

…OODLE_22_STABLE
  • Loading branch information...
2 parents ad7ecc0 + dfa28b8 commit bd8718922292889739da98ecffc4f6a398cecdcf Sam Hemelryk committed Mar 5, 2012
Showing with 3 additions and 5 deletions.
  1. +3 −5 backup/moodle2/restore_section_task.class.php
@@ -71,11 +71,9 @@ public function build() {
// 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;

0 comments on commit bd87189

Please sign in to comment.