-
Bug
-
Resolution: Fixed
-
Minor
-
2.2.2, 2.3
-
PostgreSQL
-
MOODLE_22_STABLE, MOODLE_23_STABLE
-
MOODLE_21_STABLE, MOODLE_22_STABLE
-
in admin/tool/qeupgradehelper/locallib.php, function:
tool_qeupgradehelper_get_quiz_for_upgrade
Contains:
SELECT quiz.id
FROM
quiza
JOIN
quiz ON quiz.id = quiza.quiz
JOIN
c ON c.id = quiz.course
WHERE quiza.preview = 0 AND quiza.needsupgradetonewqe = 1
GROUP BY quiz.id, quiz.name, c.shortname, c.id
ORDER BY quiza.timemodified DESC
The ORDER BY clause is invalid because quiza.timemodified is not in GROUP BY or otherwise aggregated. I recommend changing it to
ORDER BY MAX(quiza.timemodified) DESC
but I have not verified this on other DBs yet.