function _quiz_check_num_random in Quiz 6.4
Same name and namespace in other branches
- 8.4 quiz.module \_quiz_check_num_random()
- 7.6 quiz.module \_quiz_check_num_random()
- 7 quiz.module \_quiz_check_num_random()
- 7.4 quiz.module \_quiz_check_num_random()
- 7.5 quiz.module \_quiz_check_num_random()
If a quiz is saved as not randomized we should make sure all random questions are converted to always.
Parameters
$node: Quiz node.
2 calls to _quiz_check_num_random()
- quiz_insert in ./
quiz.module - Implementation of hook_insert().
- quiz_update in ./
quiz.module - Implementation of hook_update().
File
- ./
quiz.module, line 3750 - Quiz Module
Code
function _quiz_check_num_random(&$node) {
if ($node->randomization == 2) {
return;
}
$sql = 'DELETE FROM {quiz_node_relationship}
WHERE question_status = %d
AND parent_vid = %d';
db_query($sql, QUESTION_RANDOM, $node->vid);
}