MDL-29618 backup - back to handling enrolments properly. Regession of MDL-26841, my fault, grrr

This commit is contained in:
Eloy Lafuente (stronk7) 2011-10-03 00:45:18 +02:00
parent 228d24fd97
commit f253e791ed
2 changed files with 2 additions and 2 deletions

View file

@ -73,7 +73,7 @@ class backup_course_task extends backup_task {
$this->add_step(new backup_course_structure_step('course_info', 'course.xml')); $this->add_step(new backup_course_structure_step('course_info', 'course.xml'));
// Generate the enrolment file (conditionally, prevent it in any IMPORT/HUB operation) // 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')); $this->add_step(new backup_enrolments_structure_step('course_enrolments', 'enrolments.xml'));
} }

View file

@ -70,7 +70,7 @@ class restore_course_task extends restore_task {
$this->add_step(new restore_ras_and_caps_structure_step('course_ras_and_caps', 'roles.xml')); $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 // 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')); $this->add_step(new restore_enrolments_structure_step('course_enrolments', 'enrolments.xml'));
} }