JCloze Image not displayed in 'clue' box

JCloze Image not displayed in 'clue' box

by Susanna Wesson -
Number of replies: 8

Hi,

We've recently upgraded to Moodle 2.9 and I have a minor issue with a JCloze exercise.

I've included an image in the 'clue' box to question 3.7 of my exercise.

While the image displays within the exercise in its .htm file form in my browser, (using Firefox and Chrome), it no longer displays once the file (and the image) are uploaded to Moodle.

The .jcl file in Moodle WILL display the image, so I suppose all the links and codes are correct, but other aspects of Hotpot files will not display correctly now in Moodle 2.9, so I can use only the .htm files in Moodle.

This is not a serious problem, but a picture seemed to be a good way of giving a 'clue'. The only thing I could thinkof  was a size problem? Perhaps you could help.

I have attached my (modified) .htm file and the image.

Thank you,

Susanna

Attachment paris_plage_mist_zone.gif
Average of ratings: -
In reply to Susanna Wesson

Re: JCloze Image not displayed in 'clue' box

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

HI Suzanna,

the imaged you attached is a GIF image, but the HTML file is asking for a JPG image. Does that information help you see what might be wrong?

Gordon

In reply to Gordon Bateson

Re: JCloze Image not displayed in 'clue' box

by Susanna Wesson -

Hi,

Thanks for spending time on this.

There are two images in my exercise: the .jpg is in the left container and displays normally.

The second image is embedded in a clue in question 19. This is the .gif and, although I can't see it in the .htm file, the hotpot file does contain the right extension. (I've attached it and it will show the image in Moodle. However, I can't use the hotpot file because other more important features aren't compatible with Moodle 2.9: page display, virtual pagination, facelift etc).

Susanna

In reply to Susanna Wesson

Re: JCloze Image not displayed in 'clue' box

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

As you have established, the images display as expected when using the jcl file and the standard HotPot JCloze output format in the  HotPot module for Moodle. No problem there.

The issue with the custom HTML files arises because the clues in the HTML file are encoded as Javascript unicode, so the HotPot module cannot detect URLs in the clues and convert them from relative URLs to absolute URLs.

One workaround is to decode the clue that contains the URL, as in the attached file, "Paris_plage_A.fixed.htm". This files displays satisfactorily in Moodle (see attached screenshot).

I used the following tool to decode the javscript unicode:

regards
Gordon

Attachment hotpot.paris.html.png
Average of ratings: Useful (1)
In reply to Gordon Bateson

Re: JCloze Image not displayed in 'clue' box

by Susanna Wesson -

Dear Gordon,

Absolutely brilliant, thank you. I've understood and all works perfectly. 

Many thanks,

Susanna.

In reply to Susanna Wesson

Re: JCloze Image not displayed in 'clue' box

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

Hi Susanna,

I took another look at this issue, and found that the HotPot/Taskchain/QuizPort modules were not detecting JCloze clues at all, and as a result the clues were not being processed as intended. I have fixed all the modules now and released new public versions of them on github.com and moodle.org.

Please update your HotPot module for Moodle 2.x at the next opportunity, and you should find that your original htm file will now display images in the clues, wihout the need for using the decoding tool that I mentioned in my previous post on this thread.

Thank you for bringing this issue to my attention approve

best regards
Gordon 

In reply to Gordon Bateson

Re: JCloze Image not displayed in 'clue' box

by Susanna Wesson -

Hi,

My administrator has updated the Hotpot module but when students click to start the exercise, a blank page appears. (I have tried various types of exercise.) Is there a problem at our end, perhaps?

Susanna


In reply to Susanna Wesson

Re: JCloze Image not displayed in 'clue' box

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

Well I messed up the public release a bit, and for a while there was a defective version, HotPot 2015.09.03 (72), in the wild. Maybe you got of that.

Version 2015.09.03 (73) , the current version, should be OK though. Could you check your version number please?

In reply to Gordon Bateson

Re: JCloze Image not displayed in 'clue' box

by Susanna Wesson -

All is working fine now. It was the previous version we had installed.

Thank you again,


Susanna


Average of ratings: Useful (1)