Accessing 'completed' quiz time from gradebook

Accessing 'completed' quiz time from gradebook

by R Yahner -
Number of replies: 1

Hello,

I searched the forums and could not find this issue addressed anywhere.

I'm using Moodle 1.99.  I'm trying to custom code the excel export file (/grade/export/xls/grade_export_xls.php) to include the time that the graded quiz attempt was completed (i.e. the 'completed' time field that appears for each attempt on /mod/quiz/report.php).  Right now I'm exporting the date that the export was completed as a 'date' field in the spreadsheet; but I would prefer to export the date that the quiz was actually completed.  I've been searching the relevant .php files but have been unable to find where the 'completed' value is stored for each attempt or how to go about retrieving it in another file.

Any ideas on how to access this time completed value from within the grade_export_xls.php file so that I can export the 'completed' time along with each user and grade item?

Thanks

In reply to R Yahner

Re: Accessing 'completed' quiz time from gradebook

by Bob Puffer -
I'd take a look at grade/report/grader/lib.php in the function, load_final_grades(). The timemodified field from the grade_grades table is likely what you're looking for, i.e., the point at which the grade was posted to the gradebook which would be the time at which an automatically graded quiz would be completed.