From 988f1a05e72c630c4aa6de1ec92698a6072fbd38 Mon Sep 17 00:00:00 2001 From: Joseph Rezeau Date: Mon, 4 Jul 2011 15:49:53 +0100 Subject: [PATCH] MDL-27716 qtype_multianswer make the work 'Close' in the overlib popup translatable. --- question/type/multianswer/questiontype.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/question/type/multianswer/questiontype.php b/question/type/multianswer/questiontype.php index d6734011f0c59..8a953834d1a6e 100644 --- a/question/type/multianswer/questiontype.php +++ b/question/type/multianswer/questiontype.php @@ -324,6 +324,7 @@ function print_question_formulation_and_controls(&$question, &$state, $cmoptions $feedback = '' ; $correctanswer = ''; $strfeedbackwrapped = $strfeedback; + $strclosewindow = get_string('close', 'editor'); $testedstate = clone($state); if ($correctanswers = $QTYPES[$wrapped->qtype]->get_correct_responses($wrapped, $state)) { if ($options->readonly && $options->correct_responses) { @@ -390,7 +391,7 @@ function print_question_formulation_and_controls(&$question, &$state, $cmoptions }else { $strfeedbackwrapped = get_string('feedback', 'quiz'); } - $popup = " onmouseover=\"return overlib('$feedback', STICKY, MOUSEOFF, CAPTION, '$strfeedbackwrapped', FGCOLOR, '#FFFFFF');\" ". + $popup = " onmouseover=\"return overlib('$feedback', STICKY, MOUSEOFF, CAPTION, '$strfeedbackwrapped', FGCOLOR, '#FFFFFF', CLOSETEXT, '$strclosewindow');\" ". " onmouseout=\"return nd();\" "; } @@ -406,7 +407,7 @@ function print_question_formulation_and_controls(&$question, &$state, $cmoptions if ($feedback !='' && $popup == ''){ $strfeedbackwrapped = get_string('correctanswer', 'qtype_multianswer'); $feedback = s(str_replace(array("\\", "'"), array("\\\\", "\\'"), $feedback)); - $popup = " onmouseover=\"return overlib('$feedback', STICKY, MOUSEOFF, CAPTION, '$strfeedbackwrapped', FGCOLOR, '#FFFFFF');\" ". + $popup = " onmouseover=\"return overlib('$feedback', STICKY, MOUSEOFF, CAPTION, '$strfeedbackwrapped', FGCOLOR, '#FFFFFF', CLOSETEXT, '$strclosewindow');\" ". " onmouseout=\"return nd();\" "; }