public function LongAnswerQuestion::saveNodeProperties in Quiz 6.4
Same name and namespace in other branches
- 7.6 question_types/long_answer/long_answer.classes.inc \LongAnswerQuestion::saveNodeProperties()
- 7 question_types/long_answer/long_answer.classes.inc \LongAnswerQuestion::saveNodeProperties()
- 7.4 question_types/long_answer/long_answer.classes.inc \LongAnswerQuestion::saveNodeProperties()
- 7.5 question_types/long_answer/long_answer.classes.inc \LongAnswerQuestion::saveNodeProperties()
Implementation of saveNodeProperties
Overrides QuizQuestion::saveNodeProperties
See also
QuizQuestion#saveNodeProperties($is_new)
File
- question_types/
long_answer/ long_answer.classes.inc, line 20 - Long answer classes.
Class
- LongAnswerQuestion
- Extension of QuizQuestion.
Code
public function saveNodeProperties($is_new = FALSE) {
if (!isset($this->node->feedback)) {
$this->node->feedback = '';
}
if ($is_new || $this->node->revision == 1) {
$sql = "INSERT INTO {quiz_long_answer_node_properties}\n (nid, vid, rubric)\n VALUES (%d, %d, '%s')";
db_query($sql, $this->node->nid, $this->node->vid, $this->node->rubric);
}
else {
$sql = "UPDATE {quiz_long_answer_node_properties}\n SET rubric = '%s'\n WHERE nid = %d AND vid = %d";
db_query($sql, $this->node->rubric, $this->node->nid, $this->node->vid);
}
}