MDL-45803 mod_quiz: added the attempt as a snapshot for the attempt_started and attempt_preview_started events
MDL-45803 mod_quiz: prevented the attempt_started event from being triggered twice