function multichoice_list_questions in Quiz 6.2
Same name and namespace in other branches
- 5.2 multichoice.module \multichoice_list_questions()
- 5 multichoice.module \multichoice_list_questions()
- 6.6 question_types/multichoice/multichoice.module \multichoice_list_questions()
- 6.3 question_types/multichoice/multichoice.module \multichoice_list_questions()
- 6.5 question_types/multichoice/multichoice.module \multichoice_list_questions()
List all multiple choice questions.
Return value
Array of questions.
File
- ./
multichoice.module, line 873 - Multiple choice question type for the Quiz module.
Code
function multichoice_list_questions() {
$result = db_query("SELECT nid, body, format FROM {node} WHERE type= '%s'", 'multichoice');
$questions = array();
while ($node = db_fetch_object($result)) {
$question = new stdClass();
$question->question = check_markup($node->body, $node->format);
$question->nid = $node->nid;
$questions[] = $question;
}
return $questions;
}