diff --git a/question/behaviour/deferredcbm/lang/en/qbehaviour_deferredcbm.php b/question/behaviour/deferredcbm/lang/en/qbehaviour_deferredcbm.php index 31bb35fe4f1..a28c25bfaa8 100644 --- a/question/behaviour/deferredcbm/lang/en/qbehaviour_deferredcbm.php +++ b/question/behaviour/deferredcbm/lang/en/qbehaviour_deferredcbm.php @@ -26,8 +26,20 @@ $string['assumingcertainty'] = 'You did not select a certainty. Assuming: {$a}.'; $string['basemark'] = 'Base mark {$a}'; $string['cbmmark'] = 'CBM mark {$a}'; -$string['certainty1'] = 'Not very (less than 67%)'; -$string['certainty2'] = 'Fairly (more than 67%)'; -$string['certainty3'] = 'Very (more than 80%)'; +$string['certainty'] = 'Certainty'; +$string['certainty_help'] = 'Certainty-based marking requires you to indicate how reliable you think your answer is. The available levels are: + +Certainty level | C=1 (Unsure) | C=2 (Mid) | C=3 (Quite sure) +------------------- | ------------ | --------- | ---------------- +Mark if correct | 1 | 2 | 3 +Mark if wrong | 0 | -2 | -6 +Probability correct | <67% | 67-80% | >80% + +Best marks are gained by acknowledging uncertainty. For example, if you think there is more than a 1 in 3 chance of being wrong, you should enter C=1 and avoid the risk of a negative mark. +'; +$string['certainty_link'] = 'qbehaviour/deferredcbm/certainty'; +$string['certainty1'] = 'C=1 (Unsure: <67%)'; +$string['certainty2'] = 'C=2 (Mid: >67%)'; +$string['certainty3'] = 'C=3 (Quite sure: >80%)'; $string['howcertainareyou'] = 'How certain are you? {$a}'; $string['pluginname'] = 'Deferred feedback with CBM'; diff --git a/question/behaviour/deferredcbm/renderer.php b/question/behaviour/deferredcbm/renderer.php index 1f33df3dc3d..f5abbf58e14 100644 --- a/question/behaviour/deferredcbm/renderer.php +++ b/question/behaviour/deferredcbm/renderer.php @@ -55,17 +55,20 @@ class qbehaviour_deferredcbm_renderer extends qbehaviour_renderer { } else { unset($attributes['checked']); } - $choices .= ' ' . html_writer::empty_tag('input', $attributes) . ' ' . - html_writer::tag('label', question_cbm::get_string($certainty), - array('for' => $id)); + $choices .= ' ' . + html_writer::tag('label', html_writer::empty_tag('input', $attributes) . + question_cbm::get_string($certainty), array('for' => $id)); } return $choices; } public function controls(question_attempt $qa, question_display_options $options) { - return html_writer::tag('div', get_string('howcertainareyou', 'qbehaviour_deferredcbm', - $this->certainty_choices($qa->get_behaviour_field_name('certainty'), - $qa->get_last_behaviour_var('certainty'), $options->readonly)), + $a = new stdClass(); + $a->help = $this->output->help_icon('certainty', 'qbehaviour_deferredcbm'); + $a->choices = $this->certainty_choices($qa->get_behaviour_field_name('certainty'), + $qa->get_last_behaviour_var('certainty'), $options->readonly); + + return html_writer::tag('div', get_string('howcertainareyou', 'qbehaviour_deferredcbm', $a), array('class' => 'certaintychoices')); } diff --git a/question/behaviour/deferredcbm/styles.css b/question/behaviour/deferredcbm/styles.css new file mode 100644 index 00000000000..99774ebb9e4 --- /dev/null +++ b/question/behaviour/deferredcbm/styles.css @@ -0,0 +1,6 @@ +.que.deferredcbm .certaintychoices input[type="radio"] { + margin-left: 0.5em; +} +.que.deferredcbm .certaintychoices label { + white-space: nowrap; +}