Has anyone encountered this issue that can provide some insight and/or workaround?
Thanks
Toan
Toan
After a bit of Googling, I found that the code has to do with newer versions of mySQL throwing this error on older versions of Moodle.
The fix was changing /mod/quiz/report/overview/report.php as follows (note the two casts as signed):
Before:
$select .= 'qa.uniqueid AS attemptuniqueid, qa.id AS attempt, ' .
'u.id AS userid, u.idnumber, u.firstname, u.lastname, u.picture, u.imagealt, ' .
'qa.sumgrades, qa.timefinish, qa.timestart, qa.timefinish - qa.timestart AS duration ';
After:
$select .= 'qa.uniqueid AS attemptuniqueid, qa.id AS attempt, ' .
'u.id AS userid, u.idnumber, u.firstname, u.lastname, u.picture, u.imagealt, ' .
'qa.sumgrades, qa.timefinish, qa.timestart, CAST(qa.timefinish AS SIGNED) - CAST(qa.timestart AS SIGNED) AS duration ';
Just in case someone else runs into the same issue.
Perfect Toan Tran!
Worked fine for us.
Thank you!
Thanks!