Fix:Moodle 2.8 compatibility