Git merges in Moodle 2.7.17 by Andrew Nicols

commit ec452fbb5c51000b6adb57704b9919497d0abfa4
Author: Andrew Nicols <andrew@nicols.co.uk>
Date:   Fri, 11 Nov 2016 15:15:41 +0800
Tag:    v2.7.17

Merge branch 'MDL-55121-27' of git://github.com/lameze/moodle into MOODLE_27_STABLE