Arabic choices not written in Arabic language

Arabic choices not written in Arabic language

by Edmund Evangelista -
Number of replies: 6

I created a quiz in a course which was configured to run in Arabic. However, when I preview the quiz - the options are still written in English. Is there any way to solve this? Language for the sitewide is also in Arabic.


Average of ratings: -
In reply to Edmund Evangelista

Re: Arabic choices not written in Arabic language

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi Edmund,

Those options are set when you create the multiple choice question. You can set a question to show lowercase abc, uppercase ABC, numbers 123, lowercase roman numerals, uppercase roman numerals, or none. They are all hard coded in the multiple choice question renderer.php file in a switch case function, down around line 160.

In your case, probably the easiest thing to do would be switch to "none" for each of your questions. You might try to change at least one of those possible cases, or add a case, to use the Arabic alphabet, but that requires changing Moodle core code. That is not recommended. However, since I have multiple Moodle's set up for testing various things, I tried to do it with Arabic and Hebrew and could not get either one to work. I believe it's due to ord supposedly works only with ASCII and not UTF8.

In reply to AL Rachels

Re: Arabic choices not written in Arabic language

by Edmund Evangelista -

Thanks Al for pointing out the file and line number to be modified. I have tried using none, but I might as well try modifying the source code and provide additional cases. Again, thank you.

In reply to Edmund Evangelista

Re: Arabic choices not written in Arabic language

by Germán Valero -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

The same issue is seen in Japanese, Hebrew and other languages that should have the A,B,C,D characters translated .

The  'answernumberingABCD | qtype_multichoice' strings have been translated in AMOS for many languages, but it seems that the qtype_multichoice plugin is not using these string variables as it should.

show origin of strings in MCQ

This issue is likely to need the expertise of Tim Hunt smile

In reply to Germán Valero

Re: Arabic choices not written in Arabic language

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

You will find the following example on https://moodleformulas.org:

Formulas201803281717.png

In reply to Dominique Bauer

Re: Arabic choices not written in Arabic language

by Edmund Evangelista -

Thanks for the information Dominique. I will surely try this. Cheers.

In reply to Edmund Evangelista

Re: Arabic choices not written in Arabic language

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

There is an option for what sort of numbering to use, including an option for no numbering. Edit the question and choose that. (The answernumberingABCD string in the language pack is the name of the option that is displayed in the editing form. Those values are not intended to be used when printing the question.)

Also, there is a setting for admins to control what type of numbering is used by default when a new multiple choice question is created.

Average of ratings: Useful (2)