Git merges in Moodle 3.1.10 by Andrew Nicols

commit cf877600b76109d32fa7910a649f845c3a5c2360
Author: Andrew Nicols <andrew@nicols.co.uk>
Date:   Wed, 06 Dec 2017 10:06:26 +0800
Tag:    v3.1.10

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