Miscellaneous moodle fixes #3