Permalink
Browse files

MDL-36732 Cloze qtype: review marks should not depend on feedback.

The various review options should be independent.
  • Loading branch information...
1 parent 15b3a43 commit ad6591011925bfdae67fe96a86bc692d89821667 @timhunt timhunt committed Nov 22, 2012
Showing with 3 additions and 6 deletions.
  1. +3 −6 question/type/multianswer/renderer.php
@@ -118,10 +118,6 @@ public function correct_response(question_attempt $qa) {
protected function feedback_popup(question_graded_automatically $subq,
$fraction, $feedbacktext, $rightanswer, question_display_options $options) {
- if (!$options->feedback) {
- return '';
- }
-
$feedback = array();
if ($options->correctness) {
if (is_null($fraction)) {
@@ -132,7 +128,7 @@ protected function feedback_popup(question_graded_automatically $subq,
$feedback[] = $state->default_string(true);
}
- if ($feedbacktext) { // Note $options->feedback is already checked above.
+ if ($options->feedback && $feedbacktext) {
$feedback[] = $feedbacktext;
}
@@ -141,7 +137,8 @@ protected function feedback_popup(question_graded_automatically $subq,
}
$subfraction = '';
- if ($options->marks >= question_display_options::MARK_AND_MAX && $subq->maxmark > 0) {
+ if ($options->marks >= question_display_options::MARK_AND_MAX && $subq->maxmark > 0
+ && (!is_null($fraction) || $feedback)) {
$a = new stdClass();
$a->mark = format_float($fraction * $subq->maxmark, $options->markdp);
$a->max = format_float($subq->maxmark, $options->markdp);

0 comments on commit ad65910

Please sign in to comment.