Details
Description
Create a user
Create a quiz
Realise an attempt for this quiz
Create another quiz (set grade on first attempt)
Realise three attempts for this second quiz
Display the second quiz report
The first (neither the others) attempt is not highlighted. It should be.
The executed request is (mod/quiz/report/overview/report.php):
SELECT CONCAT( u.id, '#', IFNULL( qa.attempt, 0 ) ) AS uniqueid, (
SELECT id
FROM mdl_quiz_attempts
WHERE u.id = userid
ORDER BY timestart ASC
LIMIT 1
) = qa.id AS gradedattempt, qa.uniqueid AS attemptuniqueid, qa.id AS attempt, u.id AS userid, u.idnumber, u.firstname, u.lastname, u.picture, qa.sumgrades, qa.timefinish, qa.timestart, qa.timefinish - qa.timestart AS duration
FROM mdl_user u
LEFT JOIN mdl_quiz_attempts qa ON qa.userid = u.id
AND qa.quiz =2
WHERE u.id
IN ( 6, 7, 4 )
AND qa.preview =0
AND qa.id IS NOT NULL
ORDER BY uniqueid