Updated deprecated code in Moodle 2.4