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

When users access grades they receive error "Invalid course module ID"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • None
    • 3.6.1, 3.6.2
    • Gradebook
    • None
    • MOODLE_36_STABLE

      Hi!

      In some courses we have problem with accessing quizzes and gradebook. Students, teachers and administrator when traying to access quiz or gradebook receive error “Invalid course module ID”. In php.log file it says:

      PHP Notice: Undefined offset: 27132 in ../moodle/lib/grade/grade_item.php on line 2498
      PHP Notice: Trying to get property of non-object in ../moodle/lib/grade/grade_item.php on line 2499
      Default exception handler: Invalid course module ID Debug: SELECT id,course FROM

      {course_modules}

      WHERE id IS NULL
      [array (
      )]
      Error code: invalidcoursemodule

      • line 1546 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
      • line 1522 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
      • line 7052 of /lib/accesslib.php: call to moodle_database->get_record()
      • line 2499 of /lib/grade/grade_item.php: call to context_module::instance()
      • line 1242 of /lib/grade/grade_grade.php: call to grade_item->get_context()
      • line 1054 of /lib/grade/grade_grade.php: call to grade_grade->get_context()
      • line 369 of /lib/grade/grade_object.php: call to grade_grade->add_feedback_files()
      • line 1025 of /lib/grade/grade_grade.php: call to grade_object->insert()
      • line 647 of /lib/grade/grade_category.php: call to grade_grade->insert()
      • line 541 of /lib/grade/grade_category.php: call to grade_category->aggregate_grades()
      • line 743 of /lib/grade/grade_item.php: call to grade_category->generate_grades()
      • line 1272 of /lib/gradelib.php: call to grade_item->regrade_final_grades()
      • line 391 of /lib/gradelib.php: call to grade_regrade_final_grades()
      • line 133 of /grade/report/grader/index.php: call to grade_regrade_final_grades_if_required()

      We are using Moodle 3.6.1 (Build: 20181220), but I have tried to upgrade to Moodle 3.6.2+ (Build: 20190124) on our test site but error is not solved.
      This error occurs (so far) on two courses, but other is working without problems.

      Ivica

            Unassigned Unassigned
            imatotek Ivica Matotek
            Votes:
            8 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved:

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