fix for moodle 2