Quiz answers appear in wrong language

Quiz answers appear in wrong language

by Eric Fichtl -
Number of replies: 4
Hello everyone,

I've created a course in Russian, and noticed that in my true/false quizzes, the answer options appear in English rather than Russian. Please see attachment for example...

This may be because when I first made the quiz and added questions to it, I was working in English (I do not speak Russian).

Has anyone got a workaround to get these strings to work in the proper language?

I've already tried the following to no avail:
  • Select Russian as language on site homepage
  • Select Russian as preferred language in user profile
What's odd is that so far everything else that should be in Russian is! But it's critical that the quizzes be fair to students who do not read Latin script/understand English.

Please help!

Thanks,
Eric

Edit: PS, forgot to mention that I did one fake quiz while in Russian to see if responses would also be in Russian, and they were. It seems like a glitch that answers would be locked in by the language the designer/teacher worked in at a particular point, rather than following the language selection/preference options.
Attachment russianquestion_englishanswers.jpg
Average of ratings: -
In reply to Eric Fichtl

Re: Quiz answers appear in wrong language

by Eric Fichtl -
Hi again,

I answered my own question. This has been reported several times under names that didn't occur to me while searching for help! (http://tracker.moodle.org/browse/MDL-11384)

For those who encounter this problem, here's the basic solution I discovered:

The true/false answer options will display in the language you use to create the quiz (as an admin/teacher). That is, as you add the question and answers, if you're using English as the language of interaction with the site, then you'll get True/False even if the question you've posted was in Russian, French, etc.

What I did to get my true/false prompts to display correctly in the appropriate language was to switch my admin language (using the homepage language drop-down) to Russian. I then entered the quizzes and edited the questions in each true/false quiz again. Merely by opening each question while in Russian and saving it again (not as a new question, just a regular save), the answer prompts then appeared in Russian. I didn't actually make any edit -- merely opened each question and resaved.

I should point out I'm not using the multilanguage tags in my course. I've designed one course in English and then another identical, Russian-language version as its own course. I don't know what impact this workaround would have in multilanguage...

Hope this helps the next person who encounters this issue.
Eric
In reply to Eric Fichtl

Re: Quiz answers appear in wrong 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
All I can really say is "sorry". I know this is a really stupid bug, and it is still not fixed in Moodle 2.0. I will get fixed one day, I promise, but until then you will have to live with your work-around. Tim (quiz maintainer).
In reply to Eric Fichtl

Re: Quiz answers appear in wrong language

by Jazael Martinez -

This is probably not the best way to fix the issue but in:

/question/type/truefalse/questiontype.php

around line 160

I added:

/*Transform $trueanswer to correct language (hack):*/
$trueanswer->answer = get_string("true", "quiz");
$falseanswer->answer = get_string("false", "quiz");
/*end hack*/

Right before:

$correctanswer = ($trueanswer->fraction == 1) ? $trueanswer : $falseanswer;

and that seems to work. I'm using English and Spanish and it works. Now of course that doesn't fix the answers inserted into the database just what appears on the web page.

(This is in moodle 1.9)

Average of ratings: Useful (2)