You are here

public function ShortAnswerQuestion::saveNodeProperties in Quiz 7.5

Same name and namespace in other branches
  1. 6.4 question_types/short_answer/short_answer.classes.inc \ShortAnswerQuestion::saveNodeProperties()
  2. 7.6 question_types/short_answer/short_answer.classes.inc \ShortAnswerQuestion::saveNodeProperties()
  3. 7 question_types/short_answer/short_answer.classes.inc \ShortAnswerQuestion::saveNodeProperties()
  4. 7.4 question_types/short_answer/short_answer.classes.inc \ShortAnswerQuestion::saveNodeProperties()

Implementation of saveNodeProperties().

Overrides QuizQuestion::saveNodeProperties

See also

QuizQuestion::saveNodeProperties()

File

question_types/short_answer/short_answer.classes.inc, line 34
Short answer classes.

Class

ShortAnswerQuestion
Extension of QuizQuestion.

Code

public function saveNodeProperties($is_new = FALSE) {
  db_merge('quiz_short_answer_node_properties')
    ->key(array(
    'nid' => $this->node->nid,
    'vid' => $this->node->vid,
  ))
    ->fields(array(
    'nid' => $this->node->nid,
    'vid' => $this->node->vid,
    'correct_answer' => $this->node->correct_answer,
    'correct_answer_evaluation' => $this->node->correct_answer_evaluation,
  ))
    ->execute();
}