MDL-45660 question statistics: fix regression added by MDL-44981.

Also, make comparison more robust.
This commit is contained in:
Tim Hunt
2014-05-22 16:16:03 +01:00
parent ba05f573ca
commit 7d99d3e9c4
2 changed files with 2 additions and 2 deletions
@@ -84,7 +84,7 @@ class analysis_for_actual_response {
}
public function response_matches($response) {
return $response == $this->response;
return (string)$response === (string)$this->response;
}
/**
@@ -107,7 +107,7 @@ class analysis_for_class {
return true;
} else if (count($this->actualresponses) == 1) {
$onlyactualresponse = reset($this->actualresponses);
return (string)$onlyactualresponse != $this->modelresponse;
return !$onlyactualresponse->response_matches($this->modelresponse);
}
return false;
}