Details
Description
The "short answer" does not display correctly in Item analysis report. The answers wich are verified with wilcard appears as false as you can see on En-2008-06-19_090348.png screenshot.
On the other hand, it works for user reports on the Overview.
It doesn't compare correctly strings with wildcards as we can see on the second screenshot (exemple.png) :
- For the answer "celine" it's correct. 1 user as answer "celine".
- But for the answer "c*line", the user who has answered "caline" must be count or it appears as false. (same problem for the answer "*line" for "aline")
The problem still in Moodle 1.9.1 on windows/Mysql
I've fix the problem : /var/www/moodle184test/question/type/shortanswer/questiontype.php.
I've replace the compare_responses function by :
function compare_responses($question, $state, $teststate) {
if (isset($state->responses['']) && isset($teststate->responses[''])) {
return $this->compare_string_with_wildcard(stripslashes_safe($state->responses['']),
$teststate->responses[''], !$question->options->usecase);
}
return false;
}
Simple fix (provided by Céline Bissler) and tested in 1.8 and 1.9. See attached patch files for Moodle 1.8 and 1.9.
Should probably go to HEAD as well.
However, with this patch, the students' actual responses are not displayed at all, which is a loss of information. Ideally I would like a report which would display a) the Answer's text with correct R. count and b) the students' actual responses with their own R.count too.
Joseph