Git merges in Moodle 3.11.2 by Andrew Nicols

commit 2afafa04312e61cb4d6147fee3a16abe47d155ba
Author: Andrew Nicols <andrew@nicols.co.uk>
Date:   Thu, 22 Jul 2021 11:22:56 +0800
Tag:    v3.11.2

Merge branch 'MDL-70427-311' of git://github.com/paulholden/moodle into MOODLE_311_STABLE