You are here

function short_answer_questions_list in Quiz 6.6

1 call to short_answer_questions_list()
ShortAnswerUnitTest::unitTestShortAnswerQuestionsList in question_types/short_answer/short_answer.test
Check that question exists in DB.

File

question_types/short_answer/short_answer.module, line 203
The main file for short_answer.

Code

function short_answer_questions_list() {
  $questions = array();
  $type = 'short_answer';
  $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;
}