Moodle module tracking user time spent in course, port to 2.x branch