mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
Merge branch 'MDL-27764' of git://github.com/stronk7/moodle
This commit is contained in:
commit
cb0a069019
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user