Skip to content

Multi language compatible #16

@ndalpe

Description

@ndalpe

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions