stop using deprecated functions in Moodle 2.5