public function ScaleQuestion::getNodeProperties in Quiz 7.6
Same name and namespace in other branches
- 8.6 question_types/quiz_scale/src/Plugin/quiz/QuizQuestion/ScaleQuestion.php \ScaleQuestion::getNodeProperties()
- 8.5 question_types/quiz_scale/src/Plugin/quiz/QuizQuestion/ScaleQuestion.php \ScaleQuestion::getNodeProperties()
- 6.4 question_types/scale/scale.classes.inc \ScaleQuestion::getNodeProperties()
- 7 question_types/scale/scale.classes.inc \ScaleQuestion::getNodeProperties()
- 7.4 question_types/scale/scale.classes.inc \ScaleQuestion::getNodeProperties()
- 7.5 question_types/scale/scale.classes.inc \ScaleQuestion::getNodeProperties()
Implementation of getNodeProperties
Overrides QuizQuestion::getNodeProperties
See also
QuizQuestion#getNodeProperties()
File
- question_types/
scale/ scale.classes.inc, line 308 - The main classes for the scale question type.
Class
- ScaleQuestion
- Extension of QuizQuestion.
Code
public function getNodeProperties() {
if (isset($this->nodeProperties)) {
return $this->nodeProperties;
}
$props = parent::getNodeProperties();
$res = db_query('SELECT id, answer, a.answer_collection_id
FROM {quiz_scale_node_properties} p
JOIN {quiz_scale_answer} a ON (p.answer_collection_id = a.answer_collection_id)
WHERE nid = :nid AND vid = :vid
ORDER BY a.id', array(
':nid' => $this->node->nid,
':vid' => $this->node->vid,
));
foreach ($res as $res_o) {
$props[] = $res_o;
}
$this->nodeProperties = $props;
return $props;
}