You are here

public function DDLinesQuestion::getNodeProperties in Quiz 7.4

Implementation of getNodeProperties

Overrides QuizQuestion::getNodeProperties

See also

QuizQuestion#getNodeProperties()

File

question_types/quiz_ddlines/quiz_ddlines.classes.inc, line 234
The main classes for the drag and drop with lines question type.

Class

DDLinesQuestion
Extension of QuizQuestion.

Code

public function getNodeProperties() {
  if (isset($this->nodeProperties) && !empty($this->nodeProperties)) {
    return $this->nodeProperties;
  }
  $props = parent::getNodeProperties();
  $res_a = db_query('SELECT feedback_enabled, hotspot_radius, ddlines_elements, execution_mode FROM {quiz_ddlines_node} WHERE nid = :nid AND vid = :vid', array(
    ':nid' => $this->node->nid,
    ':vid' => $this->node->vid,
  ))
    ->fetchAssoc();
  if (is_array($res_a)) {
    $props = array_merge($props, $res_a);
  }
  $this->nodeProperties = $props;
  return $props;
}