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

This commit is contained in:
tjhunt
2006-11-28 18:43:44 +00:00
parent af5f09db42
commit 3b117ede45
+3 -1
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;