Databases: data model question scorm 'Started on' and 'last accessed on' dates

Databases: data model question scorm 'Started on' and 'last accessed on' dates

by Linda Petty -
Number of replies: 1

Hi

I'm writing a sql query to extract records of students completion of courses [SCORM content at present].

I need data for 'started' and 'completed' (last access will serve for completed courses).

This report SCORM report shows  'started on' and 'last accessed on' dates? [see attached screen shot]
  http://<server>/moodle/mod/scorm/report.php?id=19

Can anyone tell me which table and fields are used for these dates on the report?

I'd be very grateful. I've found the table scorm_scoes_track useful but it doesn't have dates (only times).

Linda

Attachment reports_on_reportwriting_scorm2.jpg
Average of ratings: Useful (1)
In reply to Linda Petty

Re: Databases: data model question scorm 'Started on' and 'last accessed on' dates

by Linda Petty -

I've answered my own question, timemodified hold date as well as time, as an integer. In case anyone has same question, here's how I got dates started and last_accessed:

SELECT scormid, userid,

date_format( from_unixtime( min( timemodified ) ) , "%Y-%m-%d" ) started_on,

date_format( from_unixtime( max( timemodified ) ) , "%Y-%m-%d" ) last_accessed

FROM mdl_scorm_scoes_track

GROUP BY scormid, userid

Average of ratings: Useful (1)