I found another bug that was causing the Cloze function not to work properly, but first some background info...
The hotpot module works by scanning the code of the .htm file that you have created with Hot Potatoes and adding special code to it. It does this in two steps, 1) the scan attempts to detect which Hot Pot module the file is for. This isn't so easy because the code itself for many modules nowhere explicitly says "This is the JMATCH module" etc. so I've got to find a snippet of code that appears to be unique to that module in order to identify it.
2) After it has determined what module it is working with, then it continues to look further down in the code to find the appropriate place to insert the code for outputting the results. This, too, varies from module to module.
Now, it turns out that the snippet of code that I was using to search for the JMatch module also existed in the JCLOZE module. Thus the .HTM file was wrongly identified and the code never found the appropriate place to insert the Moodle output code.
The file that is attached here goes inside moodle/mod/hotpot. Could some of you who were having problems try this and report back? It works for me, but hey, with computers that often doesn't mean much!
This version workd OK for me. Another 2 problems I find though are:-
- Just viewing the hotpot file and not doing the quiz puts a hotpot event entry in the db which has no entry date/time so produces an error when viewing grades that warns about dates before 1970.
- Trying to delete entries in the view grades screen gives a file not found error. I think the file expected is delinstance.php which I don't seem to have?
Otherwise working OK
I have been trying to install HotPotOct04.
So far I haven't been able to make it work
though, computers... The closest I have been
is getting to a page where attempts were recorded
but not all the data. Before installing delinstance.php
I couldn't clean or delete anything of that viewed
incomplete data. Using the hotpot.php in the zipped archive,
I make attempts and then try "View result" just to get a report
that no attempts are recorded.
Using the most recent hotpot.php I get this:
"Warning main(../../config.php) failed to open stream: no such file or directory in C:\easyphp\www\moodle\lang\en\hotpot.php on line 12"
Cheers, Anders B
Due to poor planning on my part, there are two files called hotpot.php -- have you confused them? One is a dictionary file that goes in moodle/lang/en/ In Moodle 1.4 onwards the file is there already when you install Moodle, so there is no reason to add it.
The other hotpot.php file is the engine that runs the module and goes in moodle/mod/hotpot/
You can try verifying that you've got the right files by opening your moodle/lang/en/hotpot.php file to see if it has language definitions or not.
Could you send me a copy of the .HTM file that you say isn't working for me to look at? I need your ORIGINAL file, not the one that the hotpot module creates.
Oopphs, perhaps I should have read the instructions more carefully.
When I tried with an exercise made with Hot Potaoes 6+ everything
started working well.
Thanks for a great contribution!
Cheers, Anders B
With some of the above noted bugs, the module seems to be recording the highest mark reliably for several types of hotpotatoes, although the duration of the attempts seems to be a little whacky.
Thank you for your hard work on the module. My language teachers will be grateful indeed.