diff --git a/question/type/numerical/lang/en/qtype_numerical.php b/question/type/numerical/lang/en/qtype_numerical.php index 6acd2ae362b..769b80b8849 100644 --- a/question/type/numerical/lang/en/qtype_numerical.php +++ b/question/type/numerical/lang/en/qtype_numerical.php @@ -53,6 +53,11 @@ then any number between 25 and 35 will be accepted as correct. Like with short answer questions, different answers, or the same answer with different precisions can be given.'; $string['numericalsummary'] = 'Allows a numerical response, possibly with units, that is graded by comparing against various model answers, possibly with tolerances.'; +$string['numericalmultiplier'] = 'Multiplier'; +$string['numericalmultiplier_help'] = 'The Correct numerical response will be multiplied by the multiplier related to a specific unit to obtain the Correct response in this unit.
+

The first unit (Unit1) has a default multiplier of 1.

+

So, if your Correct numerical response is 5500 and you set W as unit at Unit1 which has 1 as default multiplier, the Correct response is 5500 W.

+

If you add the unit kW with a multiplier of 0.001, this will add a Correct response of 5 kW.

This means that the answers 5500, 5500W or 5.5kW would all be marked correct.

Note that the accepted error is also multiplied, so an allowed error of 100W would become an error of 0.1kW.

'; $string['onlynumerical'] = 'Only NUMERICAL ANSWER will be graded' ; $string['rightexample'] = 'RIGHT as 1.00cm' ; $string['selectunits'] = 'Select units' ; diff --git a/question/type/numerical/questiontype.php b/question/type/numerical/questiontype.php index 8e22867f5d9..30309292ea8 100644 --- a/question/type/numerical/questiontype.php +++ b/question/type/numerical/questiontype.php @@ -777,6 +777,7 @@ class question_numerical_qtype extends question_shortanswer_qtype { $firstunit->freeze(); $firstunit->setValue('1.0'); $firstunit->setPersistantFreeze(true); + $mform->setHelpButton('multiplier[0]', array('numericalmultiplier', get_string('numericalmultiplier', 'qtype_numerical'), 'qtype_numerical')); } } /**