MDL-45803 mod_quiz: prevented the attempt_started event from being triggered twice