error when sort student name (grading)

error when sort student name (grading)

by dwi sudibyo -
Number of replies: 3

dear all member. i get this error message when sort grade result with Alphabetic button. But no problem if sort grade by table header.


ubuntu server 16.04.1

PHP Version 7.0.22-0

Apache 2.4.18

mysql 5.7.19

moodle 3.3.2+ (Build: 20170928)


i have been upgrade "max_allowed_packet  =1024M


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 'AND firstname LIKE 'Z%' ESCAPE '\\'' at line 21
SELECT COUNT(1) FROM (SELECT DISTINCT CONCAT(u.id, '#', COALESCE(quiza.attempt, 0)) AS uniqueid,
quiza.uniqueid AS usageid,
quiza.id AS attempt,
u.id AS userid,
u.idnumber, u.firstnamephonetic,u.lastnamephonetic,u.middlename,u.alternatename,u.firstname,u.lastname,
u.picture,
u.imagealt,
u.institution,
u.department,
u.email,
quiza.state,
quiza.sumgrades,
quiza.timefinish,
quiza.timestart,
CASE WHEN quiza.timefinish = 0 THEN null
WHEN quiza.timefinish > quiza.timestart THEN quiza.timefinish - quiza.timestart
ELSE 0 END AS duration FROM mdl_user u
LEFT JOIN mdl_quiz_attempts quiza ON
quiza.userid = u.id AND quiza.quiz = ?
JOIN mdl_user_enrolments ej1_ue ON ej1_ue.userid = u.id
JOIN mdl_enrol ej1_e ON (ej1_e.id = ej1_ue.enrolid AND ej1_e.courseid = ?) WHERE quiza.preview = 0 AND quiza.id IS NOT NULL AND 1 = 1 AND u.deleted = 0) temp AND firstname LIKE ? ESCAPE '\\'
[array (
0 => '34',
1 => '3',
2 => 'Z%',
)]
Error code: dmlreadexception
Stack trace:
  • line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
  • line 1190 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 1558 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
  • line 1631 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
  • line 1841 of /lib/dml/moodle_database.php: call to moodle_database->get_field_sql()
  • line 1589 of /lib/tablelib.php: call to moodle_database->count_records_sql()
  • line 542 of /mod/quiz/report/attemptsreport_table.php: call to table_sql->query_db()
  • line 314 of /mod/quiz/report/overview/overview_table.php: call to quiz_attempts_report_table->query_db()
  • line 1630 of /lib/tablelib.php: call to quiz_overview_table->query_db()
  • line 244 of /mod/quiz/report/overview/report.php: call to table_sql->out()
  • line 97 of /mod/quiz/report.php: call to quiz_overview_report->display()







thank you

Average of ratings: -
In reply to dwi sudibyo

Re: error when sort student name (grading)

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

This is MDL-60317, which was fixed a few weeks ago. The fix is in Moodle 3.3.3 & 3.2.6 which were released today.

Average of ratings: Useful (1)