You are here

function CourseObjectQuizFulfillment::delete in Course 8.3

Same name and namespace in other branches
  1. 8.2 modules/course_quiz/src/Plugin/course/CourseObject/CourseObjectQuizFulfillment.php \Drupal\course_quiz\Plugin\course\CourseObject\CourseObjectQuizFulfillment::delete()
  2. 3.x modules/course_quiz/src/Plugin/course/CourseObject/CourseObjectQuizFulfillment.php \Drupal\course_quiz\Plugin\course\CourseObject\CourseObjectQuizFulfillment::delete()

Remove all quiz attempts associated with this fulfillment.

Overrides CourseObjectFulfillment::delete

File

modules/course_quiz/src/Plugin/course/CourseObject/CourseObjectQuizFulfillment.php, line 24

Class

CourseObjectQuizFulfillment
Course fulfillment class for quizzes.

Namespace

Drupal\course_quiz\Plugin\course\CourseObject

Code

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