|
A test question in cloze format.
Please see the attached screen shot (unicode.jcl.jpg) of how your quiz appears after it has been imported into the Quiz module on my Moodle 1.9 site.
Everything looks OK to me, so perhaps I have not understood the problem. Please could you show me a screen shot of the problem you are seeing. thanks How did you enter the answer? cut and paste from the web? Maybe you actually entered the html-entity? When I enter the correct answer, "Tromsø" with my norwegian keyboard, it is not accepted as the right answer.
See attached screen shots of how it appears in my system. The first image shows "Tromsø" as wrong answer, the second shows the right answer according to the system( "enter the correct answer" button). Thank you for helping. Shows the right answer according to the system.
> How did you enter the answer? cut and paste ... ?
Yes. I cut and paste the "Tromsø" prompt on the quiz page. > When I enter the correct answer, "Tromsø" with my norwegian keyboard, I don't know why that would be. I further investigated the HotPot import script I added the following line at line 198: This produced the following output on the screen: {1:SHORTANSWER:=Tromsø}Therefore, I am pretty confident that the HotPot import script is doing what it is supposed to do. i.e. it is passing back the "ø" as a unicode character not an HTML entity. I will try to find out how to enter Norwegian so I can replicate what you did, but at the moment I do not think this problem is caused by the HotPot import script. Please could you give details of the OS and browser you are using on your client machine. thanks I found a page telling me how to install the Norwegian input method on Windows XP
http://www.norwegianlanguage.info/resource/keyboard.html Having installed Norwegian keyboard, the above page says I can input a "ø" by pressing the ";" key on my English keyboard. I installed the Norwegian keyboard and then retried the imported version of your JQuiz on my Moodle 1.9 site. I entered "ø" usingthe ";" key on my keyboard, and I confirmed that the quiz was judged to be correct by Moodle. In your initial report you said: > non-ascii characters in the response part will not get converted, but passed on as html entities. Please can you tell me where you saw the HTML entitiy: prøve thanks Hi,
You are really working hard to solve this. Thank you! I've tried both importing and entering "Tromsø" with opera, firefox and IE on Windows XP and firefox on linux. I'va also tried importing the question to other installations. It worked correctly on my test installation. 1.9. beta 3 on Windows XP. My site, however, is on Linux. Could it be a server problem? Importing to 1.8.2 ( on linux) gives me this message: "Warning: cannot yet handle MBCS in html_entity_decode()! in /home/2/n/nuie/www/question/format/hotpot/format.php(488) : regexp code on line 1" I'm attaching a screen shot of the "edit question" window of the imported question. Thank you. This is how the imported question looks when I open it for editing.
> Could it be a server problem?
Yes, I think you have hit the nail on the head there. a Google search for the error your reported, brings up the following page: According to the above page this issue applies to PHP 4. It seems that in certain versions of PHP4, the "html_entity_decode" function cannot decode to UTF-8. This means when Moodle is running on certain PHP4 sites, the HTML entities will not be converted to UTF-8. I am guessing your server uses PHP4 - would that be right? Looking elsewhere in the Moodle codebase I see that there is already a function which seems to handle HTML entity to UTF-8 conversion. The function is in the following Moodle script: Some time next week, I will change the HotPot import script so that it uses the above library and I will let you know when I have done this so that you can verify whether the fix works for you or not. I have modified the HotPot import script in Moodle 1.6 -> 2.0, so that it does not use the html_entity_decode() function, which appears to be broken on PHP4.
Instead the HTML entities will be converted using hotpot_charcode_to_utf8() which is based on the lib/tcpdf/html_entity_decode_php4.php which is available from Moodle 1.7 onwards. I have confirmed that the amended HotPot import script will correctly import your JCloze activity. Please could you check that the new script works on your Moodle site too, and let me know what happens. regards Great work!
I'll tell our systems administrator to update the system, and then I'll let you know if the fix is working. It works!!! Thank you so much! Tormod øøøøøøøøøøøø
Great news! øøøøøøøøøøøø Thanks again for reporting the issue and making the test quiz and screen shots available. I will now close this issue. all the best Fix is confirmed for Moodle 1.6 -> 2.0, so I am closing this issue.
Just fixing the versions
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
If you don't want to make the quiz public, please send it to me via email:
gordon at-sign kanazawa hyphen kanazawa dot ac dot jp
thanks