Mdl26 uon fixes

Fixes for issues #1 to #6 against the MOODLE_26_STABLE branch