]> git.mjollnir.org Git - moodle.git/commitdiff
Add developer debugging to something that should not happen, and fix one instance...
authortjhunt <tjhunt>
Thu, 29 Mar 2007 16:05:55 +0000 (16:05 +0000)
committertjhunt <tjhunt>
Thu, 29 Mar 2007 16:05:55 +0000 (16:05 +0000)
lib/questionlib.php
mod/quiz/attempt.php

index 0ea1b4c0c0e01753aca2cbcbe2422da04505d725..f641d8191b662ab9efc8608548b0f2ba6ed4b766 100644 (file)
@@ -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
index f38e46dfa256cf2d843f165ff0c5c5c0c2dfd1fc..26c22e9f3e035fbd94767c7d5a7fe7d3cfb9ade9 100644 (file)
         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);