MDL-41249 assign: Restore step missing gradingform mapping
authorDamyon Wiese <damyon@moodle.com>
Sun, 25 Aug 2013 13:20:53 +0000 (21:20 +0800)
committerDamyon Wiese <damyon@moodle.com>
Sun, 25 Aug 2013 13:20:53 +0000 (21:20 +0800)
Thanks to Matthieu Raggett for the report and the solution.

mod/assign/backup/moodle2/restore_assign_stepslib.php

index 648dcad..d659cec 100644 (file)
@@ -134,6 +134,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 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);
     }
 
     /**