Merge branch 'MDL-27764' of git://github.com/stronk7/moodle

This commit is contained in:
Sam Hemelryk 2012-03-06 10:19:28 +13:00
commit cb0a069019

View File

@ -76,11 +76,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;