function quiz_get_quiz_options in Quiz 6.4
Same name and namespace in other branches
- 7.6 quiz.module \quiz_get_quiz_options()
- 7 quiz.module \quiz_get_quiz_options()
- 7.4 quiz.module \quiz_get_quiz_options()
Returns an array with quiz titles keyed with quiz node ids.
Return value
array Options suitable for a form, in which the value is nid.
File
- ./
quiz.module, line 3653 - Quiz Module
Code
function quiz_get_quiz_options() {
$options = array();
$results = db_query(db_rewrite_sql("SELECT n.nid, n.title, n.type FROM {node} n WHERE n.type = 'quiz'"));
while ($result = db_fetch_object($results)) {
$options[$result->nid] = drupal_substr(check_plain($result->title), 0, 30);
}
return $options;
}