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

Quiz: Manual Grading: Change Sort to "By Student ID" -- exception thrown

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.6 regressions, 3.6.4
    • Fix Version/s: 3.6.5, 3.7.1
    • Component/s: Quiz
    • Labels:

      Description

      When grading manually graded questions in the Moodle Quiz activity, if you change the sort option from the default (Randomly) to "By Student ID", a database exception is thrown.

       

      SELECT
      qa.questionusageid,
      1

      FROM mdl_quiz_attempts quiza JOIN mdl_user u ON quiza.userid = u.id
      JOIN mdl_question_attempts qa ON qa.questionusageid = quiza.uniqueid
      JOIN mdl_question_attempt_steps qas ON qas.questionattemptid = qa.id
      AND qas.sequencenumber = (
      SELECT MAX(sequencenumber)
      FROM mdl_question_attempt_steps
      WHERE questionattemptid = qa.id
      )
      JOIN mdl_question q ON q.id = qa.questionid

      WHERE
      quiza.quiz = ? AND
      quiza.preview = 0 AND
      quiza.state = ? AND
      qa.slot = ?
      AND qa.questionid = ?

      ORDER BY idnumber

      [array (
      0 => '4457',
      1 => 'finished',
      2 => 2,
      3 => 199250,
      )]
      Error code: dmlreadexception

      Stack trace:

      line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
      line 1245 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      line 1495 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
      line 744 of /question/engine/datalib.php: call to moodle_database->get_records_sql_menu()
      line 558 of /mod/quiz/report/grading/report.php: call to question_engine_data_mapper->load_questions_usages_where_question_in_state()
      line 338 of /mod/quiz/report/grading/report.php: call to quiz_grading_report->get_usage_ids_where_question_in_state()
      line 156 of /mod/quiz/report/grading/report.php: call to quiz_grading_report->display_grading_interface()
      line 97 of /mod/quiz/report.php: call to quiz_grading_report->display()

       

       

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  8/Jul/19

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 25 minutes
                  1h 25m