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

Assignment upgrade tool doesn't cope with orphaned assignment records

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_27_STABLE

      Description

      The following error message was obtained when attempting to upgrade all assignments, also when only one assignment was selected. Assignments were in old hidden courses.

      Can not find data record in database table course_modules.

      More information about this error
      Debug info: SELECT * FROM

      Unknown macro: {course_modules}

      WHERE module = ? AND instance = ?
      [array (
      0 => '8',
      1 => '322',
      )]
      Error code: invalidrecord
      Stack trace:

      line 1451 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
      line 1427 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
      line 72 of /mod/assign/upgradelib.php: call to moodle_database->get_record()
      line 209 of /admin/tool/assignmentupgrade/locallib.php: call to assign_upgrade_manager->upgrade_assignment()
      line 64 of /admin/tool/assignmentupgrade/batchupgrade.php: call to tool_assignmentupgrade_upgrade_assignment()

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            tsala Helen Foster
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: