MDL-45336 qtype_numerical: use own strings instead of mod_quiz

These strings have already been copied from mod_quiz to qtype_numerical but
in the qtype_numerical plugin code the translations from mod_quiz were used.
Even though the strings were already present we copy the translations.

AMOS BEGIN
 CPY [invalidnumericanswer,mod_quiz],[invalidnumericanswer,qtype_numerical]
 CPY [multiplier,mod_quiz],[qtype_numerical]
 CPY [invalidnumerictolerance,mod_quiz],[qtype_numerical]
AMOS END
This commit is contained in:
Marina Glancy 2014-09-18 14:35:03 +08:00 committed by Eloy Lafuente (stronk7)
parent 5a0221f7c0
commit 8766d1981c
5 changed files with 13 additions and 7 deletions

View file

@ -185,9 +185,9 @@ class qtype_numerical_edit_form extends question_edit_form {
*/
protected function unit_group($mform) {
$grouparray = array();
$grouparray[] = $mform->createElement('text', 'unit', get_string('unit', 'quiz'), array('size'=>10));
$grouparray[] = $mform->createElement('text', 'unit', get_string('unit', 'qtype_numerical'), array('size'=>10));
$grouparray[] = $mform->createElement('text', 'multiplier',
get_string('multiplier', 'quiz'), array('size'=>10));
get_string('multiplier', 'qtype_numerical'), array('size'=>10));
return $grouparray;
}

View file

@ -191,7 +191,7 @@ class qtype_numerical extends question_type {
$answer->answer = $this->apply_unit($answerdata, $units,
!empty($question->unitsleft));
if ($answer->answer === false) {
$result->notice = get_string('invalidnumericanswer', 'quiz');
$result->notice = get_string('invalidnumericanswer', 'qtype_numerical');
}
}
$answer->fraction = $question->fraction[$key];
@ -212,7 +212,7 @@ class qtype_numerical extends question_type {
$options->tolerance = $this->apply_unit($question->tolerance[$key],
$units, !empty($question->unitsleft));
if ($options->tolerance === false) {
$result->notice = get_string('invalidnumerictolerance', 'quiz');
$result->notice = get_string('invalidnumerictolerance', 'qtype_numerical');
}
}
if (isset($options->id)) {