Credits go to Thirot Jean-Luc. http://moodle.org/mod/forum/discuss.php?d=52156 Merged from MOODLE_16_STABLE