CONTRIB-4298 fix Moodle 2.4 compatibility regression