Chad
Hi Chad,
Please could you attach a sample JCloze file (jcl) to your next post to this forum.
Thanks,
Gordon
I have attached it. Please note this is a sample medical report for OBGYN, but not from an actual patient. it is for a medical class.
I believe this was created about 2 years ago and has not been changed since. The display only changes when we upgraded moodle and hotpot.
Thank you for any help.
Ugh, the display on Moodle 3.5 is a terrible mess.
I'll investigate and let you know what I find out.

Unfortunately, Moodle's XML parser, which is required to extract info from the Hot Potatoes files (a JCL file in this case) has changed in Moodle 3.5 and behaves differently from the XML parser in Moodle 3.4. Grrr!
Specifically, when XML tags, e.g. tags to define a "gap" in a JCloze exercise, occur embedded in open text, as they do in a JCL file, the snippets of open text, technically known as CDATA, get concatenated into one long chuck of text. Hence the result that you reported.
It'll take a while to sort out.
If you are able to hack the source code of your Moodle site, you can implement the following fix:
- open lib/xmlize.php with you favorite text editor
- locate the "characterdata" function (around line 159)
- change the following line of code (around line 170):
- OLD: if (is_int(key($current[$level]))) {
- NEW: if (false && is_int(key($current[$level]))) {
- save the modified file
That will fix your JCloze activities, but it may break something else, I don't recommend doing it. If you do decide to do it, do so at your own risk.
Thank you for you patience while I investigate a more long-term solution.
Chad (and other users of Moodle 3.5),
This issue is now fixed in the latest version of the HotPot module, i.e. release: 2018-05-25 (16)
The issue also affect the TaskChain module, and the Hot Potatoes question import plugin. Those plugins have been fixed too.
Anyone using any of those plugins on Moodle 3.5, is encouraged to upgrade the plugins at the next convenient opportunity.
Thanks again for bringing this issue to my attention
Best regards,
Gordon
Gordon,
You are a genius. Thank you so much.
Chad Sines, DBA