Beiträge von Joseph Rézeau

Nutzerbild von Core developers Nutzerbild von Plugin developers Nutzerbild von Testers Nutzerbild von Translators

Hi John,

1.- You write "I can remember if I had enabled content AND headings in my remote server, but I have now." I suppose you mean "I can't remember etc."

2.- I've clearly told you that you SHOULD NOT use any multilang filter in the Question names! It will not work. And it serves no use, as the question names are not displayed to the student/end-user.

3.- I know about the display problem of both French and Canadian French, which has been discussed here: https://github.com/iarenaza/moodle-filter_multilang2/issues/25 But in your case you don't need to use fr and en, just use fr_ca and fr_en, that's all!

4.- Now to come back to your orignal problem, you don't say if it has been solved by my last post. If you enable both content and headings in the multi language content v2 filter, does that solve the problem, i.e. are now the draggables choices correctly displayed according the current user's selected language, en_ca or fr_ca? If that's OK, then we can close this discussion.

Nutzerbild von Core developers Nutzerbild von Plugin developers Nutzerbild von Testers Nutzerbild von Translators

Finally understood how to get this multilang filter work in the d & d into text choices fields: you need to set the Multi-language Content (v2) filter to "Content and headings". Try it!

Nutzerbild von Core developers Nutzerbild von Plugin developers Nutzerbild von Testers Nutzerbild von Translators

Hi John,

1.- It's a pity that you posted this just after my post explaining that I had managed to create a working script for your original problem using Moodle 4.1.1 and PHP 7.3! Looks like I laboured in vain for 2 days.

2.- Have you actually tested my hacked file on your remote site? Does it work?

3.- Now I'll reply to your recent post. First of all it's no use using multilang tags in your question name... as you have found out!

4.- Using  the tags {mlang en,en_ca} and {mlang fr,fr_ca} is only needed if your site has all 4 languages installed. If you only have en_ca and fr_ca installed, then the en and fr tags are not needed at all!

5.- In your last screenshot I don't know why you are getting one correct draggable item only, followed by incorrect one(s). I you would export that question of yours, after having removed all multilang tags from its name, of course, I might examine it.

Best,

Joseph

Nutzerbild von Core developers Nutzerbild von Plugin developers Nutzerbild von Testers Nutzerbild von Translators

Hi John,

I have finally managed to produce a script for displaying multilang choices in the drag into text question type, using Moodle 4.1.x and PHP 7.4.x. Please test the attached file and report here.

I have added en to en_ca and fr to fr_ca to the choices text fields so that this will work for any of the student's language settings: en, en_ca, fr and fr_ca.

Nutzerbild von Core developers Nutzerbild von Plugin developers Nutzerbild von Testers Nutzerbild von Translators

Your version of Moodle is: major version 4.1, minor version 4.1.1

See https://moodledev.io/general/releases

As you can see on that site, for Moodle 4.1 General support ended on 11 December 2023 and Security support will end on 8 December 2025.

Is it quite impossible for you to upgrade to a more current version of Moodle? that would imply upgrading your PHP version, which is also outdated.

If that is not possible at the moment I might provide a provisional solution to the problem posted in your original post. Let me know.