mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-7720 - non-unicode-safe case-insensitive string comparison in shortanswer question type. Merged from MOODLE_17_STABLE.
This commit is contained in:
parent
2962ad61e4
commit
485349ddf2
1 changed files with 3 additions and 1 deletions
|
@ -190,7 +190,9 @@ class question_shortanswer_qtype extends default_questiontype {
|
|||
if ($question->options->usecase) {
|
||||
return strcmp($state->responses[''], $teststate->responses['']) == 0;
|
||||
} else {
|
||||
return strcasecmp($state->responses[''], $teststate->responses['']) == 0;
|
||||
$textlib = textlib_get_instance();
|
||||
return strcmp($textlib->strtolower($state->responses['']),
|
||||
$textlib->strtolower($teststate->responses[''])) == 0;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue