MDL-32188 question CBM: alter score handling.
[moodle.git] / question / behaviour / deferredcbm / renderer.php
index 25d3d72..1f33df3 100644 (file)
@@ -87,15 +87,18 @@ class qbehaviour_deferredcbm_renderer extends qbehaviour_renderer {
                     question_cbm::get_string($qa->get_last_behaviour_var('_assumedcertainty'))));
         }
 
-        if ($options->marks >= question_display_options::MARK_AND_MAX) {
-            $a = new stdClass();
-            $a->rawmark = format_float($qa->get_last_behaviour_var('_rawfraction') *
-                    $qa->get_max_mark(), $options->markdp);
-            $a->mark = $qa->format_mark($options->markdp);
-            $feedback .= html_writer::tag('p',
-                    get_string('markadjustment', 'qbehaviour_deferredcbm', $a));
-        }
-
         return $feedback;
     }
+
+    public function marked_out_of_max(question_attempt $qa, core_question_renderer $qoutput,
+            question_display_options $options) {
+        return get_string('basemark', 'qbehaviour_deferredcbm', $qa->format_fraction_as_mark(
+                question_cbm::adjust_fraction(1, question_cbm::default_certainty()),
+                $options->markdp));
+    }
+
+    public function mark_out_of_max(question_attempt $qa, core_question_renderer $qoutput,
+            question_display_options $options) {
+        return get_string('cbmmark', 'qbehaviour_deferredcbm', $qa->format_mark($options->markdp));
+    }
 }
\ No newline at end of file