Updated to Moodle 2.7 compatible

Implemented logging 2.0 and event.