mirror of
https://github.com/moodle/moodle.git
synced 2025-02-21 09:52:54 +01:00
Matching qestion type was failing to correctly determine wheterh the student had changed their answer - further improvements. Merged from MOODLE_18_STABLE.
This commit is contained in:
parent
2b4f19a9ce
commit
2c89cfb533
@ -369,8 +369,12 @@ class question_match_qtype extends default_questiontype {
|
||||
}
|
||||
|
||||
function compare_responses($question, $state, $teststate) {
|
||||
foreach ($state->responses as $i=>$sr){
|
||||
if(empty($teststate->responses[$i]) || $state->responses[$i] != $teststate->responses[$i]){
|
||||
foreach ($state->responses as $i=>$sr) {
|
||||
if (empty($teststate->responses[$i])) {
|
||||
if (!empty($state->responses[$i])) {
|
||||
return false;
|
||||
}
|
||||
} else if ($state->responses[$i] != $teststate->responses[$i]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user