-
Bug
-
Resolution: Fixed
-
Critical
-
2.1
-
MOODLE_21_STABLE
-
MOODLE_21_STABLE
-
qa.moodle.net
-
I was doing QA test MDLQA-1093 and ran into a problem when changing grading method for a quiz.
Error reading from database
More information about this error
Debug info: Table 'qa.iquiza' doesn't exist
SELECT users.userid, qg.id, qg.grade, newgrades.newgrade
FROM (
SELECT userid
FROM mdl_quiz_grades qg
WHERE quiz = ?
UNION
SELECT DISTINCT userid
FROM mdl_quiz_attempts quiza2
WHERE
quiza2.timefinish <> 0 AND
quiza2.preview = 0 AND
quiza2.quiz = ?
) users
LEFT JOIN mdl_quiz_grades qg ON qg.userid = users.userid AND qg.quiz = ?
LEFT JOIN (
SELECT quiza.userid, MAX(quiza.sumgrades) * 5 AS newgrade
FROM mdl_quiz_attempts quiza
JOIN (
SELECT
iquiza.userid,
MIN(attempt) AS firstattempt,
MAX(attempt) AS lastattempt
FROM
{quiz_attempts iquiza}WHERE
iquiza.timefinish <> 0 AND
iquiza.preview = 0 AND
iquiza.quiz = ?
GROUP BY iquiza.userid
) first_last_attempts ON first_last_attempts.userid = quiza.userid
WHERE
quiza.attempt = first_last_attempts.firstattempt AND
quiza.timefinish <> 0 AND
quiza.preview = 0 AND
quiza.quiz = ?
GROUP BY quiza.userid
) newgrades ON newgrades.userid = users.userid
WHERE
ABS(newgrades.newgrade - qg.grade) > 0.000005 OR
(newgrades.newgrade IS NULL) <> (qg.grade IS NULL)
[array (
0 => '6',
1 => '6',
2 => '6',
3 => '6',
4 => '6',
)]
Stack trace:
line 391 of /lib/dml/moodle_database.php: dml_read_exception thrown
line 794 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
line 723 of /mod/quiz/locallib.php: call to mysqli_native_moodle_database->get_records_sql()
line 119 of /mod/quiz/lib.php: call to quiz_update_all_final_grades()
line 327 of /course/modedit.php: call to quiz_update_instance()
- blocks
-
MDL-27738 META Question engine rewrite - tasks to complete after main integration
- Closed
- has a non-specific relationship to
-
MDL-28035 Upgrade site with 1 simple adaptive mode quiz from 2.0 to 2.1 breaks badly
- Closed
-
MDL-28037 Error restoring simple quiz backup from 2.0 to 2.1
- Closed
-
MDL-28036 pluginname and subplugin names strings missing for quiz reports
- Closed
- is duplicated by
-
MDL-27911 Changing grading method causes database error in moodle 2.1
- Closed
-
MDL-27912 Changing grading method causes database error in moodle 2.1
- Closed
- will help resolve
-
MDLQA-1093 CLONE - A teacher can choose from one of 4 grading methods for a quiz
- Passed