From a6b691d84d459f96e635fbd2fbd71924e491e426 Mon Sep 17 00:00:00 2001 From: tjhunt Date: Thu, 29 Mar 2007 16:05:55 +0000 Subject: [PATCH] Add developer debugging to something that should not happen, and fix one instance of it. --- lib/questionlib.php | 1 + mod/quiz/attempt.php | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/questionlib.php b/lib/questionlib.php index 0ea1b4c0c0..f641d8191b 100644 --- a/lib/questionlib.php +++ b/lib/questionlib.php @@ -1073,6 +1073,7 @@ function question_process_responses(&$question, &$state, $action, $cmoptions, &$ // If $action->event is not set that implies saving if (! isset($action->event)) { + debugging('Ambiguous action in question_process_responses.' , DEBUG_DEVELOPER); $action->event = QUESTION_EVENTSAVE; } // If submitted then compare against last graded diff --git a/mod/quiz/attempt.php b/mod/quiz/attempt.php index f38e46dfa2..26c22e9f3e 100644 --- a/mod/quiz/attempt.php +++ b/mod/quiz/attempt.php @@ -371,6 +371,7 @@ foreach($questionidarray as $i) { if (!isset($actions[$i])) { $actions[$i]->responses = array('' => ''); + $actions[$i]->event = QUESTION_EVENTSAVE; } $actions[$i]->timestamp = $timestamp; question_process_responses($questions[$i], $states[$i], $actions[$i], $quiz, $attempt); -- 2.39.5