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

Course crashing with message "Can not find data record in database table course_modules"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.4, 2.4.3
    • Fix Version/s: None
    • Component/s: Course
    • Labels:
    • Database:
      MySQL
    • Workaround:

      Open course edit page /course/edit.php?id=XXX and save without any changes

    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE

      Description

      Every so often, a course will become unusable with this error message. Attached is a screenshot of the message when full debugging is turned on.

      It is usually printed at the top of the course, just below the summary section, but before the 1st section.

      Weirdly, the fix is to globally turn off the flag 'Enable Conditional Access'. This makes the course fully display again. The conditional access flag can then be turned back on with no negative effects.

      The only common thread seems to be that the courses most affected by this are using the 'Show one section per page' course format. Also, teachers tend to say they've been dragging files into the sections, as one of the last things they did. They also complain that the file doesn't tend to 'land' in the section they dragged it into, but instead, at the top of the page.

      Note: issue MDL-36789 has fixed the similar problem. Make sure that you use Moodle 2.4 or 2.5 with build number at least 20130823 before reporting the bugs

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                18 Vote for this issue
                Watchers:
                28 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: