-
Notifications
You must be signed in to change notification settings - Fork 16
Description
Hi Guys,
Thank you for this plugin. I am trying to add multiple language to my Moodle and there was an issue with the rendering and the processing of the "Select the missing word" question type.
I am using multi-lang v2 for my multi-language filter. Maybe the solution works with the v1 too.
Here are the changes I made:
/question/type/gapselect/rendererbase.php
Line 99
$choice->text) . ']';
and change it to:
format_string($choice->text)) . ']';
/question/type/gapselect/renderer.php
Line 60
$selectoptions[$orderedchoicevalue] = $orderedchoice->text;
and change it to:
$selectoptions[$orderedchoicevalue] = format_string($orderedchoice->text);
/question/type/gapselect/renderertypebase.php
Line 158
$bits = preg_split('/[[(\d+)]]/', $question->questiontext, null, PREG_SPLIT_DELIM_CAPTURE);
and change it to:
$formatedQuestionText = format_string($question->questiontext);
$bits = preg_split('/[[(\d+)]]/', $formatedQuestionText, null, PREG_SPLIT_DELIM_CAPTURE);
Any suggestion to better the code?
Thank you to Iñaki Arenaza for fixing the rendering. See comments section of https://moodle.org/plugins/filter_multilang2
I hope this helps
Keep the good work!
Thank you