moodle integration fixes