public function ClozeQuestion::getNodeProperties in Quiz 8.4
Implementation of getNodeProperties()
Overrides QuizQuestion::getNodeProperties
See also
QuizQuestion#getNodeProperties()
File
- question_types/
cloze/ lib/ Drupal/ cloze/ ClozeQuestion.php, line 99 - The main classes for the multichoice question type.
Class
- ClozeQuestion
- Extension of QuizQuestion.
Namespace
Drupal\clozeCode
public function getNodeProperties() {
if (isset($this->nodeProperties)) {
return $this->nodeProperties;
}
$props = parent::getNodeProperties();
$res_a = db_query('SELECT learning_mode FROM {quiz_cloze_node_properties} WHERE nid = :nid AND vid = :vid', array(
':nid' => $this->node
->id(),
':vid' => $this->node
->getRevisionId(),
))
->fetchAssoc();
$this->nodeProperties = is_array($res_a) ? array_merge($props, $res_a) : $props;
return $this->nodeProperties;
}