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

Upgrade from 2.6.3 -> 2.6.10 ->2.7.7+ (20150326) breaks courses

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • None
    • 2.6.10, 2.7.7
    • None
    • MOODLE_26_STABLE, 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. I cannot "update assignments either" from the 2.2 module. I let MySQL (5.6.15) repair the tables before I performed the upgrade to 2.6.10 and it didn't find anything wrong. Whenever I try to add an assignment 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]]

      The last record id in my mdl_course_modules table is 3361 and every time I attempt to add the assignment or quit that WHERE id = ?
      [array (
      0 => 3364,
      )]
      [array (
      0 => 3365,
      )]

      It increments by one with each attempt, why is it pulling record that don't exist. Is there a bug in which the record isn't being created in the first place?

      It seems like add_moduleinfo() in module_generator.php is failing to add the course info from /course/modedit.php. Not sure why.
      $cm->id = $DB->insert_record('course_modules', $cm);
      course_add_cm_to_section($courseid, $cm->id, $sectionnum);
      return $cm->id;

            Unassigned Unassigned
            creator1326 Eric Browning
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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