You are here

public function MatchingQuestion::load in Quiz 6.3

Same name and namespace in other branches
  1. 6.6 question_types/matching/matching.classes.inc \MatchingQuestion::load()
  2. 6.5 question_types/matching/matching.classes.inc \MatchingQuestion::load()

Retrieve information about the question and add it to the node.

Overrides QuizQuestion::load

File

question_types/matching/matching.classes.inc, line 74
quiz_directions.classes

Class

MatchingQuestion
Implementation of Matching.

Code

public function load() {
  $rows = $result = array();
  $sql = "SELECT match_id, question, answer, feedback FROM {quiz_matching_node} WHERE nid = %d AND vid = %d";
  $results = db_query($sql, $this->node->nid, $this->node->vid);
  while ($result = db_fetch_object($results)) {
    $rows['match'][] = (array) $result;
  }
  return $rows;
}