You are here

public function TrueFalseQuestion::delete in Quiz 7.5

Same name and namespace in other branches
  1. 6.6 question_types/truefalse/truefalse.classes.inc \TrueFalseQuestion::delete()
  2. 6.3 question_types/quiz_question/quiz_question.truefalse.inc \TrueFalseQuestion::delete()
  3. 6.4 question_types/truefalse/truefalse.classes.inc \TrueFalseQuestion::delete()
  4. 6.5 question_types/quiz_question/quiz_question.truefalse.inc \TrueFalseQuestion::delete()
  5. 7.6 question_types/truefalse/truefalse.classes.inc \TrueFalseQuestion::delete()
  6. 7 question_types/truefalse/truefalse.classes.inc \TrueFalseQuestion::delete()
  7. 7.4 question_types/truefalse/truefalse.classes.inc \TrueFalseQuestion::delete()

Implementation of delete().

Overrides QuizQuestion::delete

See also

QuizQuestion::delete()

File

question_types/truefalse/truefalse.classes.inc, line 49
TrueFalse classes.

Class

TrueFalseQuestion
Extension of QuizQuestion.

Code

public function delete($only_this_version = FALSE) {
  $delete_node = db_delete('quiz_truefalse_node');
  $delete_node
    ->condition('nid', $this->node->nid);
  if ($only_this_version) {
    $delete_node
      ->condition('vid', $this->node->vid);
  }
  $delete_node
    ->execute();
  parent::delete($only_this_version);
}