function quiz_update in Quiz 7.5
Same name and namespace in other branches
- 5.2 quiz.module \quiz_update()
- 5 quiz.module \quiz_update()
- 6.6 quiz.module \quiz_update()
- 6.2 quiz.module \quiz_update()
- 6.3 quiz.module \quiz_update()
- 6.4 quiz.module \quiz_update()
- 6.5 quiz.module \quiz_update()
- 7.6 quiz.module \quiz_update()
- 7 quiz.module \quiz_update()
- 7.4 quiz.module \quiz_update()
Implements hook_update().
File
- ./
quiz.module, line 757 - quiz.module Main file for the Quiz module.
Code
function quiz_update($node) {
// Quiz node vid (revision) was updated.
if (isset($node->revision) && $node->revision) {
// Create new quiz-question relation entries in the quiz_node_relationship
// table.
quiz_update_quiz_question_relationship($node->old_vid, $node->vid, $node->nid);
drupal_set_message(t('Some of the updated settings may not apply to quiz being taken already. To see all changes in action you need to start again.'), 'warning');
}
// Update an existing row in the quiz_node_properties table.
_quiz_common_presave_actions($node);
quiz_update_defaults($node);
_quiz_update_resultoptions($node);
_quiz_check_num_random($node);
_quiz_check_num_always($node);
quiz_update_max_score_properties(array(
$node->vid,
));
}