Miscellaneous moodle fixes #2