MDL-7720 - non-unicode-safe case-insensitive string comparison in shortanswer question type. Merged from MOODLE_17_STABLE.

This commit is contained in:
tjhunt 2006-11-28 18:44:18 +00:00
parent 2962ad61e4
commit 485349ddf2

View file

@ -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;