Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-15315 - Error in Item analysis report for short aswer questions t…

…hat use wildcards
  • Loading branch information...
commit 1170f42f3ad0d6358977157524bc885e5ff9b867 1 parent 2054096
tjhunt authored
Showing with 2 additions and 7 deletions.
  1. +2 −7 question/type/shortanswer/questiontype.php
View
9 question/type/shortanswer/questiontype.php
@@ -186,13 +186,8 @@ function check_response(&$question, &$state) {
function compare_responses($question, $state, $teststate) {
if (isset($state->responses['']) && isset($teststate->responses[''])) {
- if ($question->options->usecase) {
- return strcmp($state->responses[''], $teststate->responses['']) == 0;
- } else {
- $textlib = textlib_get_instance();
- return strcmp($textlib->strtolower($state->responses['']),
- $textlib->strtolower($teststate->responses[''])) == 0;
- }
+ return $this->compare_string_with_wildcard(stripslashes_safe($state->responses['']),
+ $teststate->responses[''], !$question->options->usecase);
}
return false;
}
Please sign in to comment.
Something went wrong with that request. Please try again.