I have a configurable report showing the status of the quiz, whether the user is in finished or in progress state along with the submitted time. When I run the query in Live Moodle, it’s showing the report correctly except for the submitted time. I took the DB backup and imported in my local box and then executed the same query. This time I got the correct submitted time.
In Live Moodle, there is a time difference of about 5 hours 30 min. Can anyone please tell me the solution for this?
Moodle version is 3.6.2, MySQL version: 14.14
This is the query:
CONCAT( u.firstname, " ", u.lastname ) AS "Student Name", u.username,
quiza.sumgrades AS 'Marks',
quiza.state AS 'State',
DATE_FORMAT(FROM_UNIXTIME(qa.timemodified),'%Y-%m-%d %H:%i') AS "Submit time"
FROM mdl_quiz_attempts quiza
JOIN mdl_quiz q ON q.id=quiza.quiz
JOIN mdl_question_usages qu ON qu.id = quiza.uniqueid
JOIN mdl_question_attempts qa ON qa.questionusageid = qu.id
JOIN mdl_question que ON que.id = qa.questionid
JOIN mdl_user u ON u.id = quiza.userid
WHERE q.name = "testquiz" AND q.course = "2"
GROUP BY u.username
ORDER BY quiza.userid, quiza.attempt, qa.slot
Thanks in advance