Git merges in Moodle 3.2.7 by Andrew Nicols

commit 3a3f575f4d99d1e1103e25d2cb46d9139af61eb0
Author: Andrew Nicols <andrew@nicols.co.uk>
Date:   Wed, 06 Dec 2017 10:05:49 +0800
Tag:    v3.2.7

Merge branch 'MDL-59159_32' of git://github.com/stronk7/moodle into MOODLE_32_STABLE