public function LongAnswerQuestion::delete in OG Quiz 7
Implementation of delete
Overrides QuizQuestion::delete
See also
QuizQuestion#delete($only_this_version)
File
- includes/
og_long_answer.php, line 53 - Long answer classes.
Class
- LongAnswerQuestion
- Extension of QuizQuestion.
Code
public function delete($only_this_version = FALSE) {
if ($only_this_version) {
db_delete('quiz_long_answer_user_answers')
->condition('question_nid', $this->node->nid)
->condition('question_vid', $this->node->vid)
->execute();
db_delete('quiz_long_answer_node_properties')
->condition('nid', $this->node->nid)
->condition('vid', $this->node->vid)
->execute();
}
else {
db_delete('quiz_long_answer_node_properties')
->condition('nid', $this->node->nid)
->execute();
db_delete('quiz_long_answer_user_answers')
->condition('question_nid', $this->node->nid)
->execute();
}
parent::delete($only_this_version);
}