Merge branch 'MDL-54916-31' of https://github.com/mr-russ/moodle into MOODLE_31_STABLE