MDL-46810 question CBM behaviours: improve the display of marks.

Thanks to Tony Gardner-Medwin for the suggestion.
This commit is contained in:
Tim Hunt 2014-09-07 12:48:10 +01:00
parent 457f818026
commit 0b62cc2ea5
2 changed files with 5 additions and 3 deletions

View File

@ -69,3 +69,4 @@ $string['pluginname'] = 'Deferred feedback with CBM';
$string['slightlyoverconfident'] = 'a bit over-confident';
$string['slightlyunderconfident'] = 'a bit under-confident';
$string['underconfident'] = 'under-confident';
$string['weightx'] = 'Weight {$a}';

View File

@ -95,13 +95,14 @@ class qbehaviour_deferredcbm_renderer extends qbehaviour_renderer {
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(
return get_string('weightx', '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));
return get_string('cbmmark', 'qbehaviour_deferredcbm', $qa->format_mark($options->markdp)) .
'<br>' . $this->marked_out_of_max($qa, $qoutput, $options);
}
}
}