Details
Description
After finishing a quiz you is redirected to review.php and get an error:
Debug info: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '00 < maxgrade' at line 1<br /><br />SELECT feedbacktext FROM mdl_quiz_feedback WHERE quizid = ? AND mingrade <= ? AND 0,00 < maxgrade<br />[array ( 0 => '6', 1 => '0,00', )]
Stack trace:
line 372 of \lib\dml\moodle_database.php: dml_read_exception thrown
line 656 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end()
line 1209 of \lib\dml\moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
line 1284 of \lib\dml\moodle_database.php: call to moodle_database->get_record_sql()
line 1263 of \lib\dml\moodle_database.php: call to moodle_database->get_field_sql()
line 462 of \mod\quiz\locallib.php: call to moodle_database->get_field_select()
line 207 of \mod\quiz\review.php: call to quiz_feedback_for_grade()
P.S. I guess a function displaying SQL in errors could use some upgrading too. It escapes HTML-related things too much, resulting in a things like mingrade <= ? displayed on the page
Ah, the problem seems to be it is using a grade 0,00 which a 'european' decimal point, rather than 0.00. That is breaking the SQL syntax.