comply with new moodle APIs