public function MatchingQuestion::delete in Quiz 7.5
Same name and namespace in other branches
- 6.6 question_types/matching/matching.classes.inc \MatchingQuestion::delete()
- 6.3 question_types/matching/matching.classes.inc \MatchingQuestion::delete()
- 6.4 question_types/matching/matching.classes.inc \MatchingQuestion::delete()
- 6.5 question_types/matching/matching.classes.inc \MatchingQuestion::delete()
- 7.6 question_types/matching/matching.classes.inc \MatchingQuestion::delete()
- 7 question_types/matching/matching.classes.inc \MatchingQuestion::delete()
- 7.4 question_types/matching/matching.classes.inc \MatchingQuestion::delete()
Implementation of delete().
Overrides QuizQuestion::delete
See also
File
- question_types/
matching/ matching.classes.inc, line 103 - Matching classes.
Class
- MatchingQuestion
- Extension of QuizQuestion.
Code
public function delete($only_this_version = FALSE) {
parent::delete($only_this_version);
$delete_properties = db_delete('quiz_matching_properties')
->condition('nid', $this->node->nid);
if ($only_this_version) {
$delete_properties
->condition('vid', $this->node->vid);
db_delete('quiz_matching_node')
->condition('nid', $this->node->nid)
->condition('vid', $this->node->vid)
->execute();
}
else {
db_delete('quiz_matching_node')
->condition('nid', $this->node->nid)
->execute();
}
$delete_properties
->execute();
}