Git merges in Moodle 3.9.16 by Andrew Nicols

commit 8d1867cdcc7b6c6559a29540b5dd0d3b4c1b66a4
Author: Andrew Nicols <andrew@nicols.co.uk>
Date:   Thu, 04 Aug 2022 10:45:25 +0800
Tag:    v3.9.16

Merge branch 'MDL-75080-39' of https://github.com/andelacruz/moodle into MOODLE_39_STABLE

commit 641b8c31ee4cd99ee1e1650de63f4ec3c1fdac39
Author: Andrew Nicols <andrew@nicols.co.uk>
Date:   Thu, 04 Aug 2022 10:09:22 +0800
Tag:    v3.9.16

Merge branch 'MDL-74655-39' of https://github.com/NoelDeMartin/moodle into MOODLE_39_STABLE

commit 3fbbc7a86b937d781c57ddf37ea904cb4609d236
Author: Andrew Nicols <andrew@nicols.co.uk>
Date:   Tue, 26 Jul 2022 11:39:02 +0800
Tag:    v3.9.16

Merge branch 'MDL-73788-39' of https://github.com/andelacruz/moodle into MOODLE_39_STABLE