Bug fixes / feature for Moodle