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