Skip to content

Commit

Permalink
Merge branch 'master_MDL-32102' of git://github.com/danmarsden/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed Apr 24, 2012
2 parents 06f29d7 + cbed647 commit e5055d3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions backup/moodle2/restore_final_task.class.php
Expand Up @@ -60,8 +60,11 @@ public function build() {
$this->add_step(new restore_gradebook_structure_step('gradebook_step','gradebook.xml'));
}

// Course completion
$this->add_step(new restore_course_completion_structure_step('course_completion', 'completion.xml'));
// Course completion, executed conditionally if restoring to new course
if ($this->get_target() !== backup::TARGET_CURRENT_ADDING &&
$this->get_target() !== backup::TARGET_EXISTING_ADDING) {
$this->add_step(new restore_course_completion_structure_step('course_completion', 'completion.xml'));
}

// Review all the module_availability records in backup_ids in order
// to match them with existing modules / grade items.
Expand Down

0 comments on commit e5055d3

Please sign in to comment.