You are here

function CourseObjectQuizFulfillment::delete in Course 7.2

Remove all quiz attempts associated with this fulfillment.

Overrides CourseObjectNodeFulfillment::delete

File

modules/course_quiz/CourseObjectQuizFulfillment.php, line 18

Class

CourseObjectQuizFulfillment
Course fulfillment class for quizzes.

Code

function delete() {
  parent::delete();
  $result_ids = (array) $this
    ->getOption('quiz_result_ids');
  if (course_quiz_quiz_version() >= 5) {
    entity_delete_multiple('quiz_result', $result_ids);
  }
  else {
    quiz_delete_results($result_ids);
  }
}