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

Deleting quiz attempts throws error.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 2.7
    • 2.7
    • Quiz
    • MOODLE_27_STABLE
    • MOODLE_27_STABLE
    • MDL-45145_master
    • Hide
      1. Create a course with at least one student enrolled.
      2. Create a quiz with a question.
      3. Log in as a student, complete the quiz and submit it.
      4. As a teacher/admin click on the quiz and click on the 'Attempts: #' link.
      5. Select the attempt and click 'Delete selected attempts'.
      6. Ensure it gets deleted with no issues.
      Show
      Create a course with at least one student enrolled. Create a quiz with a question. Log in as a student, complete the quiz and submit it. As a teacher/admin click on the quiz and click on the 'Attempts: #' link. Select the attempt and click 'Delete selected attempts'. Ensure it gets deleted with no issues.

      If there are certain attempts for quiz and if teacher tries to select them and delete it deletes those attempts but gives an intermediate error.

      1.) Create a quiz with some questions and let some students attempt it.
      2.) Login as teacher. Go to reports and try to delete attempts.
      3.) Error will be shown although attempts get deleted.

      Error: Debug info: SELECT id,course FROM

      {course_modules}

      WHERE id IS NULL
      [array (
      )]
      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 7074 of /lib/accesslib.php: call to moodle_database->get_record()
      line 382 of /mod/quiz/locallib.php: call to context_module::instance()
      line 321 of /mod/quiz/report/attemptsreport.php: call to quiz_delete_attempt()
      line 290 of /mod/quiz/report/attemptsreport.php: call to quiz_attempts_report->delete_selected_attempts()
      line 266 of /mod/quiz/report/overview/report.php: call to quiz_attempts_report->process_actions()
      line 82 of /mod/quiz/report/overview/report.php: call to quiz_overview_report->process_actions()
      line 96 of /mod/quiz/report.php: call to quiz_overview_report->display()
      Output buffer: Notice: Undefined property: stdClass::$cmid in /var/www/vhosts/qa.moodle.net/html/mod/quiz/locallib.php on line 382

        1. Error.png
          333 kB
          Jayesh Anandani

            markn Mark Nelson
            jacks92 Jayesh Anandani
            Tim Hunt Tim Hunt
            Dan Poltawski Dan Poltawski
            Sam Hemelryk Sam Hemelryk
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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