public function TrueFalseQuestion::getNodeProperties in Quiz 7.6
Same name and namespace in other branches
- 6.4 question_types/truefalse/truefalse.classes.inc \TrueFalseQuestion::getNodeProperties()
- 7 question_types/truefalse/truefalse.classes.inc \TrueFalseQuestion::getNodeProperties()
- 7.4 question_types/truefalse/truefalse.classes.inc \TrueFalseQuestion::getNodeProperties()
- 7.5 question_types/truefalse/truefalse.classes.inc \TrueFalseQuestion::getNodeProperties()
Implementation of getNodeProperties
Overrides QuizQuestion::getNodeProperties
See also
QuizQuestion#getNodeProperties()
File
- question_types/
truefalse/ truefalse.classes.inc, line 77 - Defines the classes necessary for a True/False quiz.
Class
- TrueFalseQuestion
- Extension of QuizQuestion.
Code
public function getNodeProperties() {
if (isset($this->nodeProperties)) {
return $this->nodeProperties;
}
$props = parent::getNodeProperties();
$res_a = db_query('SELECT correct_answer FROM {quiz_truefalse_node} WHERE nid = :nid AND vid = :vid', array(
':nid' => $this->node->nid,
':vid' => $this->node->vid,
))
->fetchAssoc();
if (is_array($res_a)) {
$props = array_merge($props, $res_a);
}
$this->nodeProperties = $props;
return $props;
}