Browse files

MDL-29618 backup - back to handling enrolments properly. Regession of…

… MDL-26841, my fault, grrr
  • Loading branch information...
1 parent 690ef50 commit ab37ff59521aedcada3ac8d442a9f6597627ced1 @stronk7 stronk7 committed Oct 3, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 backup/moodle2/backup_course_task.class.php
  2. +1 −1 backup/moodle2/restore_course_task.class.php
View
2 backup/moodle2/backup_course_task.class.php
@@ -73,7 +73,7 @@ public function build() {
$this->add_step(new backup_course_structure_step('course_info', 'course.xml'));
// Generate the enrolment file (conditionally, prevent it in any IMPORT/HUB operation)
- if (!$this->plan->get_mode() == backup::MODE_IMPORT && !$this->plan->get_mode() == backup::MODE_HUB) {
+ if ($this->plan->get_mode() != backup::MODE_IMPORT && $this->plan->get_mode() != backup::MODE_HUB) {
$this->add_step(new backup_enrolments_structure_step('course_enrolments', 'enrolments.xml'));
}
View
2 backup/moodle2/restore_course_task.class.php
@@ -70,7 +70,7 @@ public function build() {
$this->add_step(new restore_ras_and_caps_structure_step('course_ras_and_caps', 'roles.xml'));
// Restore course enrolments (plugins and membership). Conditionally prevented for any IMPORT/HUB operation
- if (!$this->plan->get_mode() == backup::MODE_IMPORT && !$this->plan->get_mode() == backup::MODE_HUB) {
+ if ($this->plan->get_mode() != backup::MODE_IMPORT && $this->plan->get_mode() != backup::MODE_HUB) {
$this->add_step(new restore_enrolments_structure_step('course_enrolments', 'enrolments.xml'));
}

0 comments on commit ab37ff5

Please sign in to comment.