Merge branch 'wip_MDL-40074' of https://github.com/jamiepratt/moodle