function matching_questions_list in Quiz 6.6
1 call to matching_questions_list()
- MatchingUnitTest::unitTestCheckMatchingQuestionsList in question_types/
matching/ matching.test - Check that question exists in DB.
File
- question_types/
matching/ matching.module, line 107 - Matching question type for quiz module
Code
function matching_questions_list() {
$questions = array();
$type = 'matching';
$sql = "SELECT nid, title FROM {node} WHERE type = '%s'";
$results = db_query($sql, $type);
while ($result = db_fetch_object($results)) {
$questions[$result->nid] = check_plain($result->title);
}
return $questions;
}