Git merges in Moodle 3.1.3 by AMOS bot

commit 22e7edad43e6782b0f5b65def999b396c0aa9868
Author: AMOS bot <amos@moodle.org>
Date:   Sat, 22 Oct 2016 00:04:59 +0800
Tag:    v3.1.3

Merge branch 'MOODLE_31_STABLE' into install_31_STABLE