Git merges in Moodle 3.1.16 by Eloy Lafuente (stronk7)

commit 7edb20caddeffb20de0f30f5ff5ba17ade27f584
Author: Eloy Lafuente (stronk7) <stronk7@moodle.org>
Date:   Wed, 09 Jan 2019 07:04:25 +0800
Tag:    v3.1.16

Merge branch 'MDL-64285-31' of git://github.com/junpataleta/moodle into MOODLE_31_STABLE

commit d3c2514a2ccc8917cd0251b9cbba9579ce7ad868
Author: Eloy Lafuente (stronk7) <stronk7@moodle.org>
Date:   Tue, 08 Jan 2019 17:08:19 +0800
Tag:    v3.1.16

Merge branch 'MDL-64520-31' of git://github.com/andrewnicols/moodle into MOODLE_31_STABLE