Quiz multiple choice question import: Choices are vanished

Quiz multiple choice question import: Choices are vanished

por Mohammad H. Javaheryzadeh -
Número de respostas: 3

I have tried both GIFT and Moodle XML formats to import multiple choice questions to a quiz (Moodle 3.5.2). But when I open any of the questions after import, all of choices are empty. Here is the entire process:

  • I have an Excel file containing all the questions and their answers with fields containing choice grades and other settings per question.
  • I have created a mail merge in Word to bulk-create questions in GIFT or Moodle XML formats
  • I copy-paste the entire text from Word to notepad, save it as a UTF-8 encoded file and use Notepad++ to convert all CrLfs to Lf (this last attempt is a test to see if it works. I have tried without this too)
  • I upload GIFT or Moodle XML format file to Moodle, absolutely no errors are displayed and import is successful
  • I go to question bank and see all the questions are there
  • I open one of the questions in random, all the choices are empty! (Before complete load of page, as displayed in attachment, choices are there. But when page is loaded completely, they go!)
  • I check page source, nothing there
  • I export the questions to original format I imported from, all the questions and choices are there! (Proving that original file is imported with no problem)
  • When I preview a question, no choices are displayed, instead some deformed elements on the page (Picture attached)

What's wrong with my Moodle?!

Anexo before complete load.jpg
Anexo question preview.jpg
Media de puntuacións: -
En resposta a Mohammad H. Javaheryzadeh

Re: Quiz multiple choice question import: Choices are vanished

por Eoin Campbell -
Imaxe de Core developers Imaxe de Particularly helpful Moodlers Imaxe de Plugin developers
This sounds like a problem with your Moodle theme, rather than with the questions themselves. I suggest you choose Arabic as the Moodle interface language (you seem to be using English in the question preview), and choose the Clean or Boost theme for the course, and see if that looks better.
En resposta a Eoin Campbell

Re: Quiz multiple choice question import: Choices are vanished

por Mohammad H. Javaheryzadeh -

Dear Eoin

Sorry for long delay as I was extremely busy with my course. Many thanks for your reply, but the problem was from resulting file. I finally ended in a custom solution which I will post as the answer.

Regards


En resposta a Mohammad H. Javaheryzadeh

Re: Quiz multiple choice question import: Choices are vanished

por Mohammad H. Javaheryzadeh -
I finally created the solution. In fact, the problem was from mail merge result. It contained some hidden characters (which I could not figure out) causing the problem. So I wrote a simple Windows application using VS 2013/VB.Net which created a clean XML file for upload and it worked perfect. Of course this program is case-specific and can create XML files for my own situation (Only four choices per question, single choice, 100% grade per correct choice, shuffled answers per question, etc.), but if you are a .Net developer, you can expand it as you want to work in other cases. It also doesn't support images inside questions and you will have to upload images after question import.