Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

The various review options should be independent.
  • Loading branch information...
commit 6b290a491cbf53a7587f4f1db6fd2c1bda535c8e 1 parent 47dfbd9
Tim Hunt authored November 22, 2012

Showing 1 changed file with 3 additions and 6 deletions. Show diff stats Hide diff stats

  1. 9  question/type/multianswer/renderer.php
9  question/type/multianswer/renderer.php
@@ -118,10 +118,6 @@ public function correct_response(question_attempt $qa) {
118 118
     protected function feedback_popup(question_graded_automatically $subq,
119 119
             $fraction, $feedbacktext, $rightanswer, question_display_options $options) {
120 120
 
121  
-        if (!$options->feedback) {
122  
-            return '';
123  
-        }
124  
-
125 121
         $feedback = array();
126 122
         if ($options->correctness) {
127 123
             if (is_null($fraction)) {
@@ -132,7 +128,7 @@ protected function feedback_popup(question_graded_automatically $subq,
132 128
             $feedback[] = $state->default_string(true);
133 129
         }
134 130
 
135  
-        if ($feedbacktext) { // Note $options->feedback is already checked above.
  131
+        if ($options->feedback && $feedbacktext) {
136 132
             $feedback[] = $feedbacktext;
137 133
         }
138 134
 
@@ -141,7 +137,8 @@ protected function feedback_popup(question_graded_automatically $subq,
141 137
         }
142 138
 
143 139
         $subfraction = '';
144  
-        if ($options->marks >= question_display_options::MARK_AND_MAX && $subq->maxmark > 0) {
  140
+        if ($options->marks >= question_display_options::MARK_AND_MAX && $subq->maxmark > 0
  141
+                && (!is_null($fraction) || $feedback)) {
145 142
             $a = new stdClass();
146 143
             $a->mark = format_float($fraction * $subq->maxmark, $options->markdp);
147 144
             $a->max =  format_float($subq->maxmark, $options->markdp);

0 notes on commit 6b290a4

Please sign in to comment.
Something went wrong with that request. Please try again.