Affects Version/s: 2.0
Fix Version/s: None
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 '.id AS uid,u.picture,u.firstname,u.lastname,u.imagealt,u.email
F' at line 1
SELECT r.id, r.rating, r.itemid, r.userid, r.timemodified, u..id AS uid,u.picture,u.firstname,u.lastname,u.imagealt,u.email
FROM mdl_rating r
LEFT JOIN mdl_user u ON r.userid = u.id
WHERE r.contextid = ? AND
r.itemid = ?
ORDER BY r.timemodified ASC
0 => '133',
1 => 1,
- line 378 of /lib/dml/moodle_database.php: dml_read_exception thrown
- line 632 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
- line 221 of /rating/lib.php: call to mysqli_native_moodle_database->get_records_sql()
- line 77 of /rating/index.php: call to rating_manager->get_all_ratings_for_item()
Steps to reproduce:
on qa.moodle.net login as a teacher and create a glossary activity.
Set the rating type to Count of ratings
Set the scale to Satisfactory
Save the glossary activity
Login to qa.moodle.net as a student and add an entry to the glossary
As the teacher click on the glossary activity and re-enable the ratings to be count of ratings, scale of satisfactory.
(The ratings only seem to get set on update and not on all, but that will be filed as a separate bug)
View the student entry and click on the hyphen ( - ) between "count of ratings" and the dropdown.
A popup window will appear with a database error.
(This occurs when you try to view the ratings when there aren't any)