Little fix in the grading logic (this should only have affected numerical questions with mre than one answer as can be used in cloze).

This commit is contained in:
mindforge
2005-09-25 21:03:12 +00:00
parent 184e03b294
commit b5ee139f78
@@ -314,7 +314,7 @@ class quiz_numerical_qtype extends quiz_shortanswer_qtype {
$state->raw_grade = 0;
foreach($answers as $answer) {
if($this->test_response($question, $state, $answer)) {
if (empty($state->raw_grade) && $state->raw_grade < $answer->fraction) {
if ($state->raw_grade < $answer->fraction) {
$state->raw_grade = $answer->fraction;
}
}