Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'MDL-28612_21' of git://github.com/timhunt/moodle into M…

…OODLE_21_STABLE
  • Loading branch information...
commit cf7daeae7ea5fee712a0f082dd75c01d66b946cf 2 parents 62bdb79 + 788e2b3
@samhemelryk samhemelryk authored
View
12 mod/quiz/report/statistics/responseanalysis.php
@@ -98,12 +98,18 @@ public function has_response_classes() {
/**
* @return bool whether this analysis has a response class more than one
- * different acutal response.
+ * different acutal response, or if the actual response is different from
+ * the model response.
*/
public function has_actual_responses() {
foreach ($this->responseclasses as $subpartid => $partclasses) {
- foreach ($partclasses as $responseclassid => $notused) {
- if (count($this->responses[$subpartid][$responseclassid]) > 1) {
+ foreach ($partclasses as $responseclassid => $modelresponse) {
+ $numresponses = count($this->responses[$subpartid][$responseclassid]);
+ if ($numresponses > 1) {
+ return true;
+ }
+ $actualresponse = key($this->responses[$subpartid][$responseclassid]);
+ if ($numresponses == 1 && $actualresponse != $modelresponse->responseclass) {
return true;
}
}
View
2  question/type/questionbase.php
@@ -454,7 +454,7 @@ public function __construct($responseclassid, $response, $fraction) {
}
public static function no_response() {
- return new question_classified_response(null, null, null);
+ return new question_classified_response(null, get_string('noresponse', 'question'), null);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.