From 1149b5d205fb34242598f9d7839114a02b0eb6ff Mon Sep 17 00:00:00 2001 From: Damyon Wiese Date: Wed, 28 Aug 2013 16:29:19 +0800 Subject: [PATCH] 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. --- mod/assign/backup/moodle2/restore_assign_stepslib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/assign/backup/moodle2/restore_assign_stepslib.php b/mod/assign/backup/moodle2/restore_assign_stepslib.php index d659cec3cfa..3af9fab2a76 100644 --- a/mod/assign/backup/moodle2/restore_assign_stepslib.php +++ b/mod/assign/backup/moodle2/restore_assign_stepslib.php @@ -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); } /**