-
Bug
-
Resolution: Fixed
-
Minor
-
4.0.6, 4.1, 4.1.1
-
MOODLE_400_STABLE, MOODLE_401_STABLE
-
MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE
-
MDL-76843_401 -
I'm seeing lots of errors in the quiz_statistics\task\recalculate scheduled task on one of our sites (multiple quizzes) with an error that looks like the below.
it looks like the question ids have an "s" character being included in the id number somehow.
Calculating statistics for 159 attempts, starting at 11/01/23, 03:28:33 ...
|
Error reading from database
|
|
ERROR: invalid input syntax for type bigint: "s178604"
|
SELECT q.*,
|
qc.id as category,
|
qv.status,
|
qv.id as versionid,
|
qv.version,
|
qv.questionbankentryid,
|
qc.contextid as contextid
|
|
FROM mdl_question q
|
JOIN mdl_question_versions qv
|
ON qv.questionid = q.id
|
JOIN mdl_question_bank_entries qbe
|
ON qbe.id = qv.questionbankentryid
|
JOIN mdl_question_categories qc
|
ON qc.id = qbe.questioncategoryid
|
|
WHERE q.id IN ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25)
|
|
[array (
|
0 => 's178604',
|
1 => 's178600',
|
2 => 's178599',
|
3 => 's178598',
|
4 => 's178597',
|
5 => 's178596',
|
6 => 's178603',
|
7 => 's178595',
|
8 => 's178602',
|
9 => 's178601',
|
10 => '411477',
|
11 => '411484',
|
12 => '411490',
|
13 => '411478',
|
14 => '411480',
|
15 => '411479',
|
16 => '411486',
|
17 => '411491',
|
18 => '411487',
|
19 => '411489',
|
20 => '411466',
|
21 => '411488',
|
22 => '411481',
|
23 => '411482',
|
24 => '411483',
|
)]
|
Error code: dmlreadexception
|
|
* line 494 of /lib/dml/moodle_database.php: dml_read_exception thrown
|
* line 293 of /lib/dml/moodle_read_slave_trait.php: call to moodle_database->query_end()
|
* line 341 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->read_slave_query_end()
|
* line 1027 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
|
* line 905 of /lib/questionlib.php: call to pgsql_native_moodle_database->get_records_sql()
|
* line 924 of /lib/questionlib.php: call to question_preload_questions()
|
* line 852 of /mod/quiz/report/statistics/report.php: call to question_load_questions()
|
* line 939 of /mod/quiz/report/statistics/report.php: call to quiz_statistics_report->load_and_initialise_questions_for_calculations()
|
* line 105 of /mod/quiz/report/statistics/classes/task/recalculate.php: call to quiz_statistics_report->calculate_questions_stats_for_question_bank()
|
- has a non-specific relationship to
-
MDL-74452 Quiz and question versions: confusing errors if all versions of a question are draft
- Closed
-
MDL-77080 Exceptions when running Recalculate question statistics scheduled task
- Closed
- is a regression caused by
-
MDL-74255 Quiz 4.0: 'Always latest' version for a question in a quiz should mean 'latest ready version'
- Closed
- Testing discovered
-
MDL-77349 Cannot edit a quiz if it contains a question which has vanished (missingtype)
- Open