MDL-41249 assign: Fix incorrect gradingform restore step

The mapping in the previous patch was wrong - mod assign uses
the area "submissions" but the itemid is the grade->id not the submission->id.
This commit is contained in:
Damyon Wiese
2013-08-28 16:29:19 +08:00
parent d9cf3ca0b0
commit 1149b5d205
@@ -134,7 +134,6 @@ class restore_assign_activity_structure_step extends restore_activity_structure_
// Note - the old contextid is required in order to be able to restore files stored in
// sub plugin file areas attached to the submissionid.
$this->set_mapping('submission', $oldid, $newitemid, false, null, $this->task->get_old_contextid());
$this->set_mapping(restore_gradingform_plugin::itemid_mapping('submissions'), $oldid, $newitemid);
}
/**
@@ -198,6 +197,7 @@ class restore_assign_activity_structure_step extends restore_activity_structure_
// Note - the old contextid is required in order to be able to restore files stored in
// sub plugin file areas attached to the gradeid.
$this->set_mapping('grade', $oldid, $newitemid, false, null, $this->task->get_old_contextid());
$this->set_mapping(restore_gradingform_plugin::itemid_mapping('submissions'), $oldid, $newitemid);
}
/**