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:31:32 +08:00
parent 14616c145f
commit ef8a68a73f
@@ -128,7 +128,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);
}
/**
@@ -192,6 +191,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);
}
/**