Add developer debugging to something that should not happen, and fix one instance of it.

This commit is contained in:
tjhunt 2007-03-29 16:05:55 +00:00
parent cd874e2133
commit a6b691d84d
2 changed files with 2 additions and 0 deletions

View file

@ -1073,6 +1073,7 @@ function question_process_responses(&$question, &$state, $action, $cmoptions, &$
// If $action->event is not set that implies saving // If $action->event is not set that implies saving
if (! isset($action->event)) { if (! isset($action->event)) {
debugging('Ambiguous action in question_process_responses.' , DEBUG_DEVELOPER);
$action->event = QUESTION_EVENTSAVE; $action->event = QUESTION_EVENTSAVE;
} }
// If submitted then compare against last graded // If submitted then compare against last graded

View file

@ -371,6 +371,7 @@
foreach($questionidarray as $i) { foreach($questionidarray as $i) {
if (!isset($actions[$i])) { if (!isset($actions[$i])) {
$actions[$i]->responses = array('' => ''); $actions[$i]->responses = array('' => '');
$actions[$i]->event = QUESTION_EVENTSAVE;
} }
$actions[$i]->timestamp = $timestamp; $actions[$i]->timestamp = $timestamp;
question_process_responses($questions[$i], $states[$i], $actions[$i], $quiz, $attempt); question_process_responses($questions[$i], $states[$i], $actions[$i], $quiz, $attempt);