Quiz admin: only detailed results shown, regular list has database error

Quiz admin: only detailed results shown, regular list has database error

by Andreas Giesen -
Number of replies: 5

Moodle 3.5

In quiz administration only detailed results are shown, the regular list shows database error accross Moodle instance.... 

Any idea how to tackle that issue? 

Attachment quiz results grading.png
Average of ratings: -
In reply to Andreas Giesen

Re: Quiz admin: only detailed results shown, regular list has database error

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Turn on Debugging to get a fuller error message including stack trace.

In reply to Tim Hunt

Re: Quiz admin: only detailed results shown, regular list has database error

by Andreas Giesen -

Debug info: Table 'db770693100.mdl_quiz_overview_regrades' doesn't exist
SELECT COUNT(DISTINCT quiza.id)
FROM mdl_quiz_attempts quiza
JOIN mdl_quiz_overview_regrades qqr ON quiza.uniqueid = qqr.questionusageid

WHERE

quiza.quiz = ? AND
quiza.preview = 0 AND
qqr.regraded = 0
[array (
0 => '129',
)]
Error code: dmlreadexception

Stack trace:
  • line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
  • line 1216 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 1571 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
  • line 1644 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
  • line 1854 of /lib/dml/moodle_database.php: call to moodle_database->get_field_sql()
  • line 549 of /mod/quiz/report/overview/report.php: call to moodle_database->count_records_sql()
  • line 162 of /mod/quiz/report/overview/report.php: call to quiz_overview_report->count_question_attempts_needing_regrade()
  • line 97 of /mod/quiz/report.php: call to quiz_overview_report->display()

In reply to Tim Hunt

Re: Quiz admin: only detailed results shown, regular list has database error

by Andreas Giesen -

Here the quiz-tables that exist in the db: 



Attachment quiz_dbtables.png
In reply to Andreas Giesen

Re: Quiz admin: only detailed results shown, regular list has database error

by Andreas Giesen -

Hmm, in all other Moodles I support there is a table 


mdl_quiz_overview_regrades 

-> id questionusageid slot newfraction oldfraction regraded timemodified


instead of 


mdl_quiz_question_regrade 

-> id questionid attemptid newgrade oldgrade regraded timemodified


In both cases these tables are empty. 

In reply to Andreas Giesen

Re: Quiz admin: only detailed results shown, regular list has database error

by Andreas Giesen -

Since the table was empty, I simply copied it over from another 3.5 Moodle - now the overview actually works! I wonder though, how this could have happened - I did not install this instance, but I am quite sure nobody would have deleted a table from the db.