public function MultichoiceQuestion::delete in Quiz 7.5
Same name and namespace in other branches
- 6.4 question_types/multichoice/multichoice.classes.inc \MultichoiceQuestion::delete()
- 7.6 question_types/multichoice/multichoice.classes.inc \MultichoiceQuestion::delete()
- 7 question_types/multichoice/multichoice.classes.inc \MultichoiceQuestion::delete()
- 7.4 question_types/multichoice/multichoice.classes.inc \MultichoiceQuestion::delete()
Implementation of delete().
Overrides QuizQuestion::delete
See also
File
- question_types/
multichoice/ multichoice.classes.inc, line 313 - Multichoice classes.
Class
- MultichoiceQuestion
- Extension of QuizQuestion.
Code
public function delete($only_this_version = FALSE) {
$delete_properties = db_delete('quiz_multichoice_properties')
->condition('nid', $this->node->nid);
$delete_answers = db_delete('quiz_multichoice_answers')
->condition('question_nid', $this->node->nid);
if ($only_this_version) {
$delete_properties
->condition('vid', $this->node->vid);
$delete_answers
->condition('question_vid', $this->node->vid);
}
$delete_properties
->execute();
$delete_answers
->execute();
parent::delete($only_this_version);
}