public function MatchingQuestion::load in Quiz 6.5
Same name and namespace in other branches
- 6.6 question_types/matching/matching.classes.inc \MatchingQuestion::load()
- 6.3 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 67 - 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['answer'][] = array(
'match_id' => $result->match_id,
'question' => $result->question,
'answer' => $result->answer,
'feedback' => $result->feedback,
);
}
return $rows;
}