Skip to content

Commit

Permalink
NOBUG: Restore section names and descriptions when restoring deleting…
Browse files Browse the repository at this point in the history
…. Somehow related wit Q3 @ MDL-24219
  • Loading branch information
stronk7 committed Sep 15, 2010
1 parent 4887065 commit cfea745
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backup/moodle2/restore_course_task.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ 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
// Executed conditionally if restoring to new course or if overwrite_conf setting is enabled
if ($this->get_target() == backup::TARGET_NEW_COURSE || $this->get_setting_value('overwrite_conf') == true) {
$this->add_step(new restore_course_structure_step('course_info', 'course.xml'));
}
Expand Down
3 changes: 2 additions & 1 deletion backup/moodle2/restore_section_task.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ public function build() {
$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_setting_value('overwrite_conf') == true) {
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'));
}

Expand Down

0 comments on commit cfea745

Please sign in to comment.