public function LongAnswerQuestion::delete in Quiz 6.3
Same name and namespace in other branches
- 6.6 question_types/long_answer/long_answer.classes.inc \LongAnswerQuestion::delete()
- 6.4 question_types/long_answer/long_answer.classes.inc \LongAnswerQuestion::delete()
- 6.5 question_types/long_answer/long_answer.classes.inc \LongAnswerQuestion::delete()
- 7.6 question_types/long_answer/long_answer.classes.inc \LongAnswerQuestion::delete()
- 7 question_types/long_answer/long_answer.classes.inc \LongAnswerQuestion::delete()
- 7.4 question_types/long_answer/long_answer.classes.inc \LongAnswerQuestion::delete()
- 7.5 question_types/long_answer/long_answer.classes.inc \LongAnswerQuestion::delete()
Deletes a question from the database.
Parameters
$only_this_version: If the $only_this_version flag is TRUE, then only the particular nid/vid combo should be deleted. Otherwise, all questions with the current nid can be deleted.
Overrides QuizQuestion::delete
File
- question_types/
long_answer/ long_answer.classes.inc, line 47 - Long answer classes.
Class
- LongAnswerQuestion
- Implementation of QuizQuestion.
Code
public function delete($only_this_version = FALSE) {
if ($only_this_version) {
db_query('DELETE FROM {quiz_long_answer_node_properties} WHERE nid = %d AND vid = %d', $this->node->nid, $this->node->vid);
}
else {
db_query('DELETE FROM {quiz_long_answer_node_properties} WHERE nid = %d', $this->node->nid);
}
}