You are here

function quiz_quiz_result_update in Quiz 7.6

Same name and namespace in other branches
  1. 7.5 question_types/quiz_question/quiz_question.module \quiz_quiz_result_update()

Implements hook_quiz_result_update().

File

question_types/quiz_question/quiz_question.module, line 917
Quiz Question module. This module provides the basic facilities for adding quiz question types to a quiz.

Code

function quiz_quiz_result_update($quiz_result) {
  if (!$quiz_result->original->is_evaluated && $quiz_result->is_evaluated) {

    // Quiz is finished!
    $quiz = node_load($quiz_result->nid);

    // Delete old results if necessary.
    _quiz_maintain_results($quiz, $quiz_result->result_id);
  }
}