MDL-32188 question CBM: improve display of the certainty choices
Switch to the neutral C=1, 2, 3 mode. Also add a helpicon, and improve line-wrapping.
This commit is contained in:
@@ -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';
|
||||
|
||||
@@ -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'));
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
.que.deferredcbm .certaintychoices input[type="radio"] {
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
.que.deferredcbm .certaintychoices label {
|
||||
white-space: nowrap;
|
||||
}
|
||||
Reference in New Issue
Block a user