Moodle 2.7 compatibility added to Last Accessed

Added new log system in 2.7, so a new sql was needed for Last Accessed
Courses.