We are extracting course tracking/progress info for further analysis outside of Moodle. One piece of data we need is when students started on their courses - as in when they first access the resource, not just enrol as they may enrol but not access the course until much later.
We are using Moodle 2.1.1 (20110928) and running SQL queries (read-only) to extract the various fields we need. We noticed that in the table mdl_course_completion, the timestarted field is reset to 0 every now and then when admin/cron.php is run. Then if cron.php is run again after sometime (if the student has accessed the course since the last cron run), the timestarted may be set to the last access time - the actual (original) time started is lost.
Is this the right table/field to extract the info from? If yes, then how should we deal with this reset? We've checked the database schema and http://docs.moodle.org/dev/Course_completion but it shows course_completion.timeenrolled instead of course_completion.timestarted (as seen in MySQL database). Any help or pointers?