-
Bug
-
Resolution: Cannot Reproduce
-
Minor
-
None
-
3.1.4, 3.1.5, 3.1.6, 3.2, 3.2.1, 3.2.2, 3.2.3, 3.3.4, 3.4.1
-
MOODLE_31_STABLE, MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE
-
MDL-58980-master -
Hi Guys,
There is an issue with the rendering and the processing of the "Select the missing word" question type when using a multi-language Moodle website.
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 to make moodle-qtype_gapselect multi-language friendly:
/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