MDL-46195 Fix fractionsaddwrong string component in lesson & qformat_webct.

I know. You should not refer to strings from other plugins, but

* qformat_webct is importing multichoice questions in that bit of code.
  I suppose a pedant would say that qformat_webct should declare dependencies
  on all the qtypes it relies on, but that would be silly.

* Lesson should be using the question engine, rather than doing its own thing.
This commit is contained in:
Tim Hunt
2014-09-06 20:20:58 +01:00
parent 457f818026
commit 38cde336ca
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -221,7 +221,7 @@ function lesson_save_question_options($question, $lesson) {
$totalfraction = round($totalfraction,2);
if ($totalfraction != 1) {
$totalfraction = $totalfraction * 100;
$result->notice = get_string("fractionsaddwrong", "quiz", $totalfraction);
$result->notice = get_string("fractionsaddwrong", "qtype_multichoice", $totalfraction);
return $result;
}
}
+1 -1
View File
@@ -518,7 +518,7 @@ class qformat_webct extends qformat_default {
if ($totalfraction != 1) {
$totalfraction = $totalfraction * 100;
$errors[] = "'{$question->name}': ".get_string('wronggrade', 'qformat_webct', $nlinecounter)
.' '.get_string('fractionsaddwrong', 'question', $totalfraction);
.' '.get_string('fractionsaddwrong', 'qtype_multichoice', $totalfraction);
$questionok = false;
}
}