Merged branch 'MDL-29277' of git://github.com/mouneyrac/moodle.git with improvements