function quiz_end_actions in Quiz 5.2
Same name and namespace in other branches
- 8.4 quiz.module \quiz_end_actions()
- 6.6 quiz.module \quiz_end_actions()
- 6.2 quiz.module \quiz_end_actions()
- 6.3 quiz.module \quiz_end_actions()
- 6.4 quiz.module \quiz_end_actions()
- 6.5 quiz.module \quiz_end_actions()
- 7.6 quiz.module \quiz_end_actions()
- 7 quiz.module \quiz_end_actions()
- 7.4 quiz.module \quiz_end_actions()
Actions to take at the end of a quiz.
1 call to quiz_end_actions()
- quiz_take_quiz in ./
quiz.module - Handles quiz taking.
File
- ./
quiz.module, line 1011
Code
function quiz_end_actions($quiz, $rid) {
$score = quiz_calculate_score($quiz, $rid);
db_query("UPDATE {quiz_node_results} " . "SET time_end = %d, score = %d " . "WHERE result_id = %d", time(), $score['percentage_score'], $_SESSION['quiz_' . $quiz->nid]['result_id']);
return $score;
}