Merge branch 'MDL-44981-master' of git://github.com/jamiepratt/moodle

This commit is contained in:
Dan Poltawski 2014-04-11 13:01:38 +08:00
commit 9d1eed69a0
3 changed files with 3 additions and 3 deletions

View File

@ -10,7 +10,7 @@ slot,randq,variant,subpart,modelresponse,actualresponse,totalcount
2,,1,1,[NO MATCH],-0.2,1
2,,1,1,[NO MATCH],-1,1
2,,4,1,{a} + {b} (±0.01 Relative),19.4,2
2,,4,1,"[NO RESPONSE]",,1
2,,4,1,[NO MATCH],0,1
2,,4,1,[NO MATCH],-0.4,1
3,,1,1,frog: amphibian,amphibian,25
3,,1,2,cat: mammal,mammal,24

1 slot randq variant subpart modelresponse actualresponse totalcount
10 2 1 1 [NO MATCH] -0.2 1
11 2 1 1 [NO MATCH] -1 1
12 2 4 1 {a} + {b} (±0.01 Relative) 19.4 2
13 2 4 1 [NO RESPONSE] [NO MATCH] 0 1
14 2 4 1 [NO MATCH] -0.4 1
15 3 1 1 frog: amphibian amphibian 25
16 3 1 2 cat: mammal mammal 24

View File

@ -145,7 +145,7 @@ class analysis_for_class {
return true;
} else if (count($actualresponses) === 1) {
$singleactualresponse = reset($actualresponses);
return $singleactualresponse != $this->modelresponse;
return (string)$singleactualresponse != $this->modelresponse;
}
return false;
}

View File

@ -249,7 +249,7 @@ class qtype_numerical_question extends question_graded_automatically {
}
public function classify_response(array $response) {
if (empty($response['answer'])) {
if (!$this->is_gradable_response($response)) {
return array($this->id => question_classified_response::no_response());
}