You are here

function quiz_update in Quiz 5

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

Implementation of hook_update().

File

./quiz.module, line 418
Quiz Module

Code

function quiz_update($node) {
  quiz_translate_form_date($node, 'quiz_open');
  quiz_translate_form_date($node, 'quiz_close');
  db_query("UPDATE {quiz} SET number_of_questions = %d, shuffle = %d, quiz_open = %d, quiz_close = %d, takes = %d, pass_rate = %d, summary_pass = '%s', summary_default ='%s', quiz_always = %d WHERE nid = %d", $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, $node->nid);
}