MDL-34403 mod quiz: fix error during enrolment