MDL-45803 mod_quiz: removed the quiz_fire_attempt_started function

Also commented in mod/quiz/upgrade.txt to inform developers.
This commit is contained in:
Mark Nelson 2014-06-10 20:25:59 -07:00
parent 62a3472e24
commit b4cfcf5e53
2 changed files with 7 additions and 19 deletions

View file

@ -316,25 +316,6 @@ function quiz_attempt_save_started($quizobj, $quba, $attempt) {
return $attempt;
}
/**
* Fire an event to tell the rest of Moodle a quiz attempt has started.
*
* @param object $attempt
* @param quiz $quizobj
*/
function quiz_fire_attempt_started_event($attempt, $quizobj) {
// Trigger event.
$eventdata = array();
$eventdata['context'] = $quizobj->get_context();
$eventdata['courseid'] = $quizobj->get_courseid();
$eventdata['relateduserid'] = $attempt->userid;
$eventdata['objectid'] = $attempt->id;
$event = \mod_quiz\event\attempt_started::create($eventdata);
$event->add_record_snapshot('quiz', $quizobj->get_quiz());
$event->add_record_snapshot('quiz_attempts', $attempt);
$event->trigger();
}
/**
* Returns an unfinished attempt (if there is one) for the given
* user on the given quiz. This function does not return preview attempts.