mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
Question session state logic improvement - if students have not yet entered an answer, don't do an EVENT_SAVE.
This commit is contained in:
parent
7dc22930f7
commit
47cdbd1f64
@ -1064,8 +1064,10 @@ function question_process_responses(&$question, &$state, $action, $cmoptions, &$
|
||||
|
||||
// Check for unchanged responses (exactly unchanged, not equivalent).
|
||||
// We also have to catch questions that the student has not yet attempted
|
||||
$sameresponses = !$state->last_graded->event == QUESTION_EVENTOPEN &&
|
||||
$QTYPES[$question->qtype]->compare_responses($question, $action, $state);
|
||||
$sameresponses = $QTYPES[$question->qtype]->compare_responses($question, $action, $state);
|
||||
if ($state->last_graded->event == QUESTION_EVENTOPEN && question_isgradingevent($action->event)) {
|
||||
$sameresponses = false;
|
||||
}
|
||||
|
||||
// If the response has not been changed then we do not have to process it again
|
||||
// unless the attempt is closing or validation is requested
|
||||
|
Loading…
x
Reference in New Issue
Block a user