Aiken import Unicode

Aiken import Unicode

von Andrea Cavalleri -
Anzahl Antworten: 6

Hi all,

I am trying to import an ASCII Unicode file with questions in hungarian but it fails:

There are no questions in this file!


Error occurred during processing!

Do you know if there are limittion in importing Unicode data ?

Thanks

Andrea

Als Antwort auf Andrea Cavalleri

Re: problems importing Unicode quiz questions

von Paul Shew -
I'm guessing that your Moodle server is not set to ASCII Unicode. If not, this could be the problem.

Import files must be in the same character-set as the Moodle installation. You can try using an HTML editor to convert character sets. I use Adobe GoLive and Mozilla to convert files to the proper character-set before importing.

This is not specific to the Aiken format. It's true of all quiz question import formats, including GIFT.
Als Antwort auf Paul Shew

Re: problems importing Unicode quiz questions

von Andrea Cavalleri -

Hi Paul,

thank your for the help.

I have created manually the question using Hungarian characters and everything was good. The problem is only in importing a file.

Andrea

Als Antwort auf Andrea Cavalleri

Re: problems importing Unicode quiz questions

von Christian Borowski -
Hi Andrea;

if you are using a *nix you can use recode to make a correct import file.

the syntax is like: recode UTF-8..ISO8859-1 FILENAME
with recode -l you can see the supported charsets

regrads

Christian
Als Antwort auf Paul Shew

Re: problems importing Unicode quiz questions

von Dave Harris -

Paul,

Sorry to follow up reply with another question. I'm experiencing the same import quiz questions issue with our installation of Moodle as experienced by Andrea. In your reply you stated that the server needs to be 'set to ASCII Unicode' - Where in moodle or the server do you modify this feature/setting?

Any assistance would be greatly appreciated.

David Harris

Als Antwort auf Dave Harris

Re: problems importing Unicode quiz questions

von Howard Miller -
Nutzerbild von Core developers Nutzerbild von Documentation writers Nutzerbild von Particularly helpful Moodlers Nutzerbild von Peer reviewers Nutzerbild von Plugin developers
See my reply to Andrea. Essentially your import files need to be in the same encoding as Moodle is using. The encodings are mapped to the language - the easiest way to check if you are not sure is to view the source of any Moodle page (in your language). You should see a line something like...

<meta http-equiv="content-type" content="text/html; charset=iso-8859-2" />

You need to ensure that your import file encoding is the same (iso-8859-2 in this case). In many/most cases you won't need to worry about it, but note that Unicode, in particular, will not work.
Als Antwort auf Andrea Cavalleri

Re: Aiken import Unicode

von Howard Miller -
Nutzerbild von Core developers Nutzerbild von Documentation writers Nutzerbild von Particularly helpful Moodlers Nutzerbild von Peer reviewers Nutzerbild von Plugin developers
No it won't work. PHP does not really understand Unicode natively and quiz import/export has not been specifically coded to recognise it.

If you are using the Hungarian language setting in moodle - you need to convert your file to ISO-8859-2 (*not* ISO-8859-1 as has been suggested). That way all your character encodings match up and it should be ok. As has been suggested, you can use 'recode' or 'iconv' from a Unix/Linux command line to do the change. Alternatively some editors will do this for you too!