Moodle tables.
ie user -> userid in many tables, plus in user_students
start -> starttime and end -> endtime
I've just done all this as carefully as I could ... I don't think
I missed anything but it's pretty intensive work and I'd be fooling myself
if I didn't think I'd missed a couple.
Note that this version should pretty much be able to bootstrap itself
using PostgreSQL now ... but this is untested
gmdate to format times, thus allowing it to take advantage of locale, if set,
to print dates in the appropriate language. Several userdate invocations
had to be changed, though, to use the different formatting specs.