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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.4.5
    • Fix Version/s: 2.4.6, 2.5.2
    • Component/s: Assignment
    • Labels:
    • Testing Instructions:
      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.
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-41249-master

      Description

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

        Attachments

          Activity

            People

            Assignee:
            damyon Damyon Wiese
            Reporter:
            mraggett Matthieu Raggett
            Peer reviewer:
            Damyon Wiese
            Integrator:
            Dan Poltawski
            Tester:
            Adrian Greeve
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              9/Sep/13