You are here

public function ScaleQuestion::load in Quiz 6.6

Implementation of load

(non-PHPdoc)

Overrides QuizQuestion::load

See also

sites/all/modules/quiz-HEAD/question_types/quiz_question/QuizQuestion#load()

File

question_types/scale/scale.classes.inc, line 262
The main classes for the scale question type.

Class

ScaleQuestion
Implementation of QuizQuestion.

Code

public function load() {
  $to_return = array();
  $sql = '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 = %d AND vid = %d';
  $res = db_query($sql, $this->node->nid, $this->node->vid);
  while ($res_o = db_fetch_object($res)) {
    $to_return[] = $res_o;
  }
  return $to_return;
}