Add changes to be Moodle 2.6 compliant