Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-5654

Upgrade from 2.6.3 to 2.7.7+ Invalid course module ID and invalidrecord

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • None
    • 2.7.7
    • Module: Realtime Quiz
    • None
    • >2.2 Assignment
    • MOODLE_27_STABLE

      Upgraded from 2.63 -> 2.6.10 -> 2.7.7+

      This issue first popped up in the 2.6.3 to 2.6.10 update and I was hoping a move to 2.7.7 would fix it when it updated the database. Now whenever I try to add an activity of any type (quiz in this case) I get errors like this:

      Invalid course module ID

      More information about this error

      Debug info: SELECT id,course FROM

      {course_modules}

      WHERE id = ?
      [array (
      0 => 3353,
      )]
      Error code: invalidcoursemodule
      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 7093 of /lib/accesslib.php: call to moodle_database->get_record()
      line 129 of /course/modlib.php: call to context_module::instance()
      line 268 of /course/modedit.php: call to add_moduleinfo()

      Also I can't backup courses, I can't do ANYTHING. I initially tried to update assignments from the old 2.2 assignment module and get a big fat error like this:

      Can not find data record in database table assign.

      Debug info: SELECT * FROM

      {assign}

      WHERE id = ?
      [array (
      0 => 3,
      )]
      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 610 of /mod/assign/locallib.php: call to moodle_database->get_record()
      line 112 of /mod/assign/upgradelib.php: call to assign->add_instance()
      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()

      Upgrade assignment: Vocabulary week 1 (Course: Demo Course)
      The assignment conversion was not successful. The log from the upgrade was:
      [[couldnotcreatenewcoursemodule]]

            davosmith Davo Smith
            creator1326 Eric Browning
            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.