MDL-20296 adding help button for unit multiplier

This commit is contained in:
Pierre Pichet 2010-05-13 13:27:59 +00:00
parent 6b0b57294d
commit 638406cb81
2 changed files with 6 additions and 0 deletions

View File

@ -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.<br/>
<p> The first unit (Unit1) has a default multiplier of 1. </p>
<p> 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.</p>
<p> If you add the unit kW with a multiplier of 0.001, this will add a Correct response of 5 kW. </p><p>This means that the answers 5500, 5500W or 5.5kW would all be marked correct.</p><p> Note that the accepted error is also multiplied, so an allowed error of 100W would become an error of 0.1kW.</p>';
$string['onlynumerical'] = 'Only NUMERICAL ANSWER will be graded' ;
$string['rightexample'] = 'RIGHT as 1.00cm' ;
$string['selectunits'] = 'Select units' ;

View File

@ -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'));
}
}
/**