You are here

function quiz_load in Quiz 5

Same name and namespace in other branches
  1. 5.2 quiz.module \quiz_load()
  2. 6.6 quiz.module \quiz_load()
  3. 6.2 quiz.module \quiz_load()
  4. 6.3 quiz.module \quiz_load()
  5. 6.4 quiz.module \quiz_load()
  6. 6.5 quiz.module \quiz_load()
  7. 7.6 quiz.module \quiz_load()
  8. 7 quiz.module \quiz_load()
  9. 7.4 quiz.module \quiz_load()
  10. 7.5 quiz.module \quiz_load()

Implementation of hook_load().

File

./quiz.module, line 435
Quiz Module

Code

function quiz_load($node) {
  $additions = db_fetch_object(db_query('SELECT * FROM {quiz} WHERE nid = %d', $node->nid));
  $results = db_query('SELECT * FROM {quiz_questions} WHERE quiz_nid = %d', $node->nid);
  while ($question = db_fetch_object($results)) {
    $additions->question_status[$question->question_nid] = $question->question_status;
  }
  return $additions;
}