You are here

public function ClozeQuestion::delete in Cloze 6

Same name and namespace in other branches
  1. 7 cloze.classes.inc \ClozeQuestion::delete()

Implementation of delete

See also

QuizQuestion#delete($only_this_version)

File

./cloze.classes.inc, line 49
The main classes for the short answer question type.

Class

ClozeQuestion
Extension of QuizQuestion.

Code

public function delete($only_this_version = FALSE) {
  parent::delete($only_this_version);
  if ($only_this_version) {
    db_query('DELETE FROM {quiz_cloze_user_answers} WHERE question_nid = %d AND question_vid = %d', $this->node->nid, $this->node->vid);
  }
  else {
    db_query('DELETE FROM {quiz_cloze_user_answers} WHERE question_nid = %d', $this->node->nid);
  }
}