public function LongAnswerQuestion::getNodeProperties in Quiz 8.4
Implementation of getNodeProperties
Overrides QuizQuestion::getNodeProperties
See also
QuizQuestion#getNodeProperties()
File
- question_types/
long_answer/ lib/ Drupal/ long_answer/ LongAnswerQuestion.php, line 92 - Long answer classes.
Class
- LongAnswerQuestion
- Extension of QuizQuestion.
Namespace
Drupal\long_answerCode
public function getNodeProperties() {
if (isset($this->nodeProperties)) {
return $this->nodeProperties;
}
$props = parent::getNodeProperties();
$res_a = db_query('SELECT rubric FROM {quiz_long_answer_node_properties}
WHERE nid = :nid AND vid = :vid', array(
':nid' => $this->node
->id(),
':vid' => $this->node
->getRevisionId(),
))
->fetchAssoc();
if (is_array($res_a)) {
$props = array_merge($props, $res_a);
}
$this->nodeProperties = $props;
return $props;
}