Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-28259 Individual answers Feedback not shown in Cloze questions

  • Loading branch information...
commit 25aa44ea97aadc4d752099228fc5a37b48b7b301 1 parent ce0cb24
@timhunt timhunt authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 question/type/multianswer/renderer.php
View
8 question/type/multianswer/renderer.php
@@ -132,6 +132,10 @@ protected function feedback_popup(question_graded_automatically $subq,
$feedback[] = $state->default_string(true);
}
+ if ($feedbacktext) { // Note $options->feedback is already checked above.
+ $feedback[] = $feedbacktext;
+ }
+
if ($options->rightanswer) {
$feedback[] = get_string('correctansweris', 'qtype_shortanswer', $rightanswer);
}
@@ -144,6 +148,10 @@ protected function feedback_popup(question_graded_automatically $subq,
$feedback[] = get_string('markoutofmax', 'question', $a);
}
+ if (!$feedback) {
+ return '';
+ }
+
return html_writer::tag('span', implode('<br />', $feedback),
array('class' => 'feedbackspan accesshide'));
}
Please sign in to comment.
Something went wrong with that request. Please try again.