by Tony Butler.
Thanks Tue. The patch is actually based on the master branch and is regularly rebased, so if you wanted to cherry-pick it after the release of Moodle 3.2 it should merge cleanly. Unfortunately it won't be integrated in time for the 3.2 release as I haven't had time to create the tests yet (and won't for quite a while) and the codebase is about to be frozen for pre-release testing.