Merge branch 'MDL-37470_27' of https://github.com/mike-grant/moodle into MOODLE_27_STABLE