You are here

public function ClozeQuestion::getNodeProperties in Cloze 7

Same name and namespace in other branches
  1. 6 cloze.classes.inc \ClozeQuestion::getNodeProperties()

Implementation of getNodeProperties()

See also

QuizQuestion#getNodeProperties()

File

./cloze.classes.inc, line 75
The main classes for the cloze question type. These inherit or implement code found in quiz_question.classes.inc.

Class

ClozeQuestion
Extension of QuizQuestion.

Code

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->nid,
    ':vid' => $this->node->vid,
  ))
    ->fetchAssoc();
  $this->nodeProperties = is_array($res_a) ? array_merge($props, $res_a) : $props;
  return $this->nodeProperties;
}