Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-41249

Assign module not mapping itemid to grading form instances during restore process

XMLWordPrintable

    • MOODLE_24_STABLE
    • MOODLE_24_STABLE, MOODLE_25_STABLE
    • MDL-41249-master
    • Hide
      1. Create an Assignment
      2. Set the grading method to marking guide
      3. Create a marking guide and make it ready
      4. Mark a student with some comments and a grade
      5. Backup the assignment
      6. Restore the backup file (with user data)
      7. Check that in the new assignment, when you reopen the grading form, the comments and grade are restored in the marking guide.
      Show
      Create an Assignment Set the grading method to marking guide Create a marking guide and make it ready Mark a student with some comments and a grade Backup the assignment Restore the backup file (with user data) Check that in the new assignment, when you reopen the grading form, the comments and grade are restored in the marking guide.

      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) {}

            damyon Damyon Wiese
            mraggett Matthieu Raggett
            Damyon Wiese Damyon Wiese
            Dan Poltawski Dan Poltawski
            Adrian Greeve Adrian Greeve
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.