Skip to content
Snippets Groups Projects
Commit cb46c898 authored by falcon's avatar falcon
Browse files

#830452: Fixed: max_score is quiz_node_properties is not always updated...

parent 81d3381d
No related branches found
No related tags found
No related merge requests found
......@@ -1084,7 +1084,7 @@ function quiz_form(&$node) {
'#value' => $num_rand,
);
$max_score_for_random = (isset($node->max_score_for_random)) ? $node->max_score_for_random : 0;
$form['number_of_random_questions'] = array(
$form['max_score_for_random'] = array(
'#type' => 'value',
'#value' => $max_score_for_random,
);
......@@ -3282,7 +3282,10 @@ function quiz_has_been_answered($node) {
*/
function _quiz_check_num_random(&$node) {
if ($node->randomization == 2) return;
$node->number_of_random_questions = 0;
$sql = 'DELETE FROM {quiz_node_relationship}
WHERE question_status = %d
AND parent_vid = %d';
db_query($sql, QUESTION_RANDOM, $node->vid);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment