public function LongAnswerQuestion::getNodeProperties in Quiz 7.5
Same name and namespace in other branches
- 6.4 question_types/long_answer/long_answer.classes.inc \LongAnswerQuestion::getNodeProperties()
- 7.6 question_types/long_answer/long_answer.classes.inc \LongAnswerQuestion::getNodeProperties()
- 7 question_types/long_answer/long_answer.classes.inc \LongAnswerQuestion::getNodeProperties()
- 7.4 question_types/long_answer/long_answer.classes.inc \LongAnswerQuestion::getNodeProperties()
Implementation of getNodeProperties().
Overrides QuizQuestion::getNodeProperties
See also
QuizQuestion::getNodeProperties()
File
- question_types/
long_answer/ long_answer.classes.inc, line 68 - Long answer classes.
Class
- LongAnswerQuestion
- Extension of QuizQuestion.
Code
public function getNodeProperties() {
if (isset($this->nodeProperties)) {
return $this->nodeProperties;
}
$props = parent::getNodeProperties();
$res_a = db_query('SELECT rubric as value, rubric_format as format, answer_text_processing FROM {quiz_long_answer_node_properties}
WHERE nid = :nid AND vid = :vid', array(
':nid' => $this->node->nid,
':vid' => $this->node->vid,
))
->fetchAssoc();
if (is_array($res_a)) {
$props['rubric'] = array(
'value' => $res_a['value'],
'format' => $res_a['format'],
);
$props['answer_text_processing'] = $res_a['answer_text_processing'];
}
$this->nodeProperties = $props;
return $props;
}