You are here

function quiz_question_node_delete in Quiz 8.4

Same name and namespace in other branches
  1. 7 question_types/quiz_question/quiz_question.module \quiz_question_node_delete()
  2. 7.4 question_types/quiz_question/quiz_question.module \quiz_question_node_delete()

Implements hook_node_delete().

File

question_types/quiz_question/quiz_question.module, line 558
Quiz Question module. This module provides the basic facilities for adding quiz question types to a quiz.

Code

function quiz_question_node_delete($node) {

  // Make sure the latest quizzes table is maintained when a quiz changes
  if ($node
    ->getType() == 'quiz') {
    quiz_question_remove_latest_quizzes($node
      ->id());
  }
  $q_types = array_keys(_quiz_question_get_implementations());
  if (in_array($node
    ->getType(), $q_types)) {
    _quiz_delete_question($node, FALSE);
  }
}