-
Bug
-
Resolution: Fixed
-
Critical
-
2.4.5
-
MOODLE_24_STABLE
-
MOODLE_24_STABLE, MOODLE_25_STABLE
-
MDL-41249-master -
Hi all,
I've found a slight problem with the restore steps lib for the assign module. It seems when you restore an assign module which uses a grading method, everything is restored bar the itemid of the new instances of the grading form. As such when you view the restored activity, the grading form works and is set properly but all the grading form instances are missing. Looking at the DB, all those restored instances have an itemid of NULL instead of the activity's itemid.
I compared the steps with the old assignment 2.2 module and found a mapping was missing which would map the new itemid to the grading form.
The line :
$this->set_mapping(restore_gradingform_plugin::itemid_mapping('submissions'), $oldid, $newitemid);
is missing from : protected function process_assign_grade($data) {}