Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 2.0.2, 2.1.1, 2.2
-
Component/s: Database SQL/XMLDB, Quiz
-
Labels:
-
Database:Microsoft SQL, Oracle
-
Testing Instructions:
-
Affected Branches:MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
-
Fixed Branches:MOODLE_20_STABLE, MOODLE_21_STABLE
-
Pull from Repository:
-
Pull Master Branch:
-
Pull Master Diff URL:
Description
in Quiz->results->statistics page,
i'm getting oracle error:
Debug info: ORA-00907: missing right parenthesis
SELECT (CASE WHEN attempt=1 THEN 1 ELSE 0 END) AS isfirst, COUNT(1) AS countrecs, SUM(sumgrades) AS total FROM m_quiz_attempts qa WHERE qa.quiz = :quizid AND qa.preview=0 AND qa.timefinish !=0 GROUP BY (attempt=1)
[array (
'quizid' => '1',
)]
Stack trace:
line 391 of \lib\dml\moodle_database.php: dml_read_exception thrown
line 268 of \lib\dml\oci_native_moodle_database.php: call to moodle_database->query_end()
line 1042 of \lib\dml\oci_native_moodle_database.php: call to oci_native_moodle_database->query_end()
line 464 of \mod\quiz\report\statistics\report.php: call to oci_native_moodle_database->get_records_sql()
line 594 of \mod\quiz\report\statistics\report.php: call to quiz_statistics_report->quiz_stats()
line 97 of \mod\quiz\report\statistics\report.php: call to quiz_statistics_report->quiz_questions_stats()
line 90 of \mod\quiz\report.php: call to quiz_statistics_report->display()
and MSSQL error:
Debug info: Incorrect syntax near '='.
SELECT (CASE WHEN attempt=1 THEN 1 ELSE 0 END) AS isfirst, COUNT(1) AS countrecs, SUM(sumgrades) AS total FROM mdl_quiz_attempts qa WHERE qa.quiz = ? AND qa.preview=0 AND qa.timefinish !=0 GROUP BY (attempt=1)
[array (
0 => '2',
)]
Stack trace:
line 391 of /lib/dml/moodle_database.php: dml_read_exception thrown
line 255 of /lib/dml/mssql_native_moodle_database.php: call to moodle_database->query_end()
line 707 of /lib/dml/mssql_native_moodle_database.php: call to mssql_native_moodle_database->query_end()
line 736 of /lib/dml/mssql_native_moodle_database.php: call to mssql_native_moodle_database->get_recordset_sql()
line 464 of /mod/quiz/report/statistics/report.php: call to mssql_native_moodle_database->get_records_sql()
line 594 of /mod/quiz/report/statistics/report.php: call to quiz_statistics_report->quiz_stats()
line 97 of /mod/quiz/report/statistics/report.php: call to quiz_statistics_report->quiz_questions_stats()
line 90 of /mod/quiz/report.php: call to quiz_statistics_report->display()