Skip to content

Commit

Permalink
MDL-32102 Course completion - only restore user completion if not add…
Browse files Browse the repository at this point in the history
…ing to existing course
  • Loading branch information
danmarsden committed Apr 22, 2012
1 parent 93fb7b5 commit f778133
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 @@ -55,8 +55,11 @@ public function build() {
$this->add_step(new restore_gradebook_structure_step('gradebook_step','gradebook.xml')); $this->add_step(new restore_gradebook_structure_step('gradebook_step','gradebook.xml'));
} }


// Course completion // Course completion, executed conditionally if restoring to new course
$this->add_step(new restore_course_completion_structure_step('course_completion', 'completion.xml')); 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 // Review all the module_availability records in backup_ids in order
// to match them with existing modules / grade items. // to match them with existing modules / grade items.
Expand Down

0 comments on commit f778133

Please sign in to comment.