You are here

function quiz_insert in Quiz 5

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

Implementation of hook_insert().

File

./quiz.module, line 407
Quiz Module

Code

function quiz_insert($node) {
  quiz_translate_form_date($node, 'quiz_open');
  quiz_translate_form_date($node, 'quiz_close');
  $sql = "INSERT INTO {quiz} (nid, number_of_questions, shuffle, quiz_open, quiz_close, takes, pass_rate, summary_pass, summary_default, quiz_always)";
  $sql .= " VALUES(%d, %d, %d, %d, %d, %d, %d, '%s', '%s', %d)";
  db_query($sql, $node->nid, $node->number_of_questions, $node->shuffle, $node->quiz_open, $node->quiz_close, $node->takes, $node->pass_rate, $node->summary_pass, $node->summary_default, $node->quiz_always);
}