A .jqz file that doesn't work

A .jqz file that doesn't work

by Rossana Mandich -
Number of replies: 3

Hi,

me and my colleagues are puzzled. We have a quiz that worked perfetcly on the previous moodle platform (2.6). Now we are on a Moodle 2.7.9 (Build: 20150706)

I'm attaching the quiz that doesn't work. When we upload it , nothing appears, no questions, no intructions, nothing apart from a blank box.

I've uploaded another quiz and it works fine. So my guess is that there must be something wrong with this one. Finding out about the origin of the problem might save us a lot of time in the future, with other quizzes. Thank you!

Average of ratings: -
In reply to Rossana Mandich

Re: A .jqz file that doesn't work

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Rossana,
that file has an character that is not allowed in XML files, ascii 31. You can't see it with the naked eye, but you can find it using an online XML checker such as the following tool:

The character appears in the file as white space, just before the backslash, "/", in the following two tags near the top of the jqz file:

  • <dc:title>
  • <title>

You can fix this file simply by removing the illegal ascii 31 characters as in the attached document.

regards
Gordon


Average of ratings: Useful (1)
In reply to Gordon Bateson

Re: A .jqz file that doesn't work

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hello again Rossana,

after a little more investigation and thought, I decided to modify the HotPot and TaskChain modules so that they will detect and remove any of the ascii control chars that are not allowed in XML files, such as the ascii-31 char that was present in your jqz file.

Also, I noticed the the images in your JQuiz, which use "float: right" CSS to position the images on the right of the question area, overflow the question box, so I added some CSS which should prevent the images overflowing in this way.

As a result, you don't need to change any of your HP exercise files, you simply need to arrange for the HotPot module on your Moodle site to be updated at the next convenient opportunity, and the new functionality will be available to you.

Thanks you for alerting me to this issue, and for providing a file to test on.

best regards
Gordon

Average of ratings: Useful (1)
In reply to Gordon Bateson

Re: A .jqz file that doesn't work

by Rossana Mandich -

Dear Gordon, thank you so much for your help!

It would have taken me weeks to find out where the problem was.

And thank you for fixing the image issue. I had noticed it myself in several exercises, but I had never thought you could find a solution.

We will update our Hotpot plugin and let you know

Thanks again!

Best

Rossana