October 2004 version now available

October 2004 version now available

by Thomas Robb -
Number of replies: 10
Hi everyone,

Here is a long-promised update to the Hotpot module which fixes problems with the recording of grades in a number of the hot potatoes modules, particularly Match.

Please download it from my own site:

http://tomrobb.com/hotpotOct04.zip

If you have any problems with it, please post a message here. It should work for all hot potatoes modules (except Masher), TexToys and Quandry.
Average of ratings: -
In reply to Thomas Robb

Re: October 2004 version now available

by Przemyslaw Stencel -
Great! Thanks, Tom big grin

Just one request - could you post it on the modules page? This is where people look for modules. Browsing the forum here looking for the newest version may be very confusing (not only for new Moodle users smile)
In reply to Thomas Robb

Re: October 2004 version now available

by John Rodgers -

Hello Mr. Robb:

Thank you for your hard work on this module.

Our grades are still being recorded as 0, irrespective of score.  After the install the module upgraded ( or created? I'm not sure) a table. Is there something we're doing wrong?  We are currently using moodle 1.4 (2004083100). 

Thank you for any help.

In reply to John Rodgers

Re: October 2004 version now available

by Victor Villoria -

i have the same problem. otherwise the file delinstance.php is not in the module and we have a mistake when we try to delete.

has anybody a solution?

Thans for your work, Robb

In reply to Victor Villoria

Re: October 2004 version now available

by Thomas Robb -
One important thing that I didn't realize that I should mention: Once you have the new hotpot version installed, you will need to edit each hotpot quiz that is currently not recording correctly and then save it again. This will cause the new version to rewrite the code. Otherwise the code for all previous modules will still remain the same.

I hope this fixes your problem!
In reply to Thomas Robb

Re: October 2004 version now available

by Colin McQueen -

Thanks for the recent upgrade. However I too get 0 scores being added to the hotpot_events table and the hotpot table says 0 attempts made??

I have redone the hotpot resource several times.

In reply to Colin McQueen

Re: October 2004 version now available

by Colin McQueen -

Hi Tom

Thanks for the version to cope with my file.  Its worked (JCloze2 marker appeared).  Hurrah! big grin I also had to clear the cache as suggested.  I have sent an email reply but I'm not on the right ISP connection here to be able to send reply just yet.  It will go tonight when I get home.

Thanks again

BTW I wonder if all my HotPot modules have bits missing.  I am using version 5.5 .....  HEY I've just thought of something. wide eyes There is a version 6 preview in the potatoes and I have been using that for output...  THAT may be why your original hotpot converter couldn't find the usual string.  It says in the HP help files that version 6 will be different. Does that help? thoughtful

I've now download version 6.0.3 of Hot Potatoes and its output files are not working sad.  I'll attach the example file which has been changed.  BTW the JCloze2 marker didn't appear this time.

In reply to Thomas Robb

Re: October 2004 version now available

by John Rodgers -

Hello Thomas:

The problem seems to persist in newly processed files.  I'm really new to this, and don't know much about the code, so bear with me.  On my local install, the files seems to have had the following form variables appended to them:

<DIV >
<form name='hotout' method='post' action='http://BBayserver/moodle/mod/hotpot/hotpot2db.php' target='dummy'>
<INPUT type='hidden' name=hotpotid        value='0'>
<INPUT type='hidden' name=userid        value='0'>
<INPUT type='hidden' name=course        value='9'>
<INPUT type='hidden' name=score        value='0'>
<INPUT type='hidden' name=wrong        value='0'>
<INPUT type='hidden' name=starttime        value='0'>
<INPUT type='hidden' name=endtime        value='0'>
<INPUT type='hidden' name=event        value='0'>
</form>
</DIV>

This seems consistent with the hotpot.php script, which appears to add them in the insertforms function:

 $action ="$CFG->wwwroot/mod/hotpot/hotpot2db.php";
    fwrite($handle,"<DIV >$cr");
    fwrite($handle,"<form name='hotout' method='post' action='$action' target='dummy'>$cr");
    /*
    fwrite($handle,"<INPUT type='hidden' name=hotpotid        value='$form->hotpotid'>$cr");
    fwrite($handle,"<INPUT type='hidden' name=userid        value='0'>$cr");
    fwrite($handle,"<INPUT type='hidden' name=course        value='$form->course'>$cr");
    fwrite($handle,"<INPUT type='hidden' name=score        value='$form->score'>$cr");
    fwrite($handle,"<INPUT type='hidden' name=wrong        value='$form->wrong'>$cr");
    fwrite($handle,"<INPUT type='hidden' name=starttime        value='$form->starttime'>$cr");
    fwrite($handle,"<INPUT type='hidden' name=endtime        value='$form->endtime'>$cr");
    fwrite($handle,"<INPUT type='hidden' name=event        value='$form->event'>$cr");
    */
    fwrite($handle,"<INPUT type='hidden' name=hotpotid        value='0'>$cr");
    fwrite($handle,"<INPUT type='hidden' name=userid        value='0'>$cr");
    fwrite($handle,"<INPUT type='hidden' name=course        value='$course->id'>$cr");
    fwrite($handle,"<INPUT type='hidden' name=score        value='0'>$cr");
    fwrite($handle,"<INPUT type='hidden' name=wrong        value='0'>$cr");
    fwrite($handle,"<INPUT type='hidden' name=starttime        value='0'>$cr");
    fwrite($handle,"<INPUT type='hidden' name=endtime        value='0'>$cr");
    fwrite($handle,"<INPUT type='hidden' name=event        value='0'>$cr");
    fwrite($handle,"</form>$cr");
    fwrite($handle,"</DIV>$cr");
    return;

The code which would append the appropriate variables appears to be commented out, but I'm not terribly familiar with php.  Is there place where the appropriate code is appended in some circumstances?

Thanks

In reply to John Rodgers

Re: October 2004 version now available

by Thomas Robb -
There is one more place in the rewritten hotpot file than might not be getting the new code inserted. This place varies from module to module which is why there is a problem. If you look at the mod/hotpot/hotpot.php code you will see a bunch of 'if' statements like:

if ((strpos($alldata[$i],"AllDone == true)||") > 0) && ($qtype == "JMATCH" || $qtype == "JQUIZ"))

which looks for code that is invoked when that particular module has ended and triggers the writing out of the score and other data. It seems that the appropriate statement isn't there for the file that you are trying to use.

If you could you please send me the raw html file privately and I'll check to see what is happening.
In reply to Thomas Robb

Re: October 2004 version now available

by John Rodgers -

Here is one of the files I've tried.  Perhaps its a problem with the configuration settings.

Thank you very much for your help.  My French teachers are looking forward to recording the scores.

In reply to Thomas Robb

Re: October 2004 version now available

by Mei Ho -

The version of my moodle is 1.4.1+ now.  I have tried to install your HotPot hotfixes in my moodle, however, it doesn't work.  It always shows a error message that about cannot find ../../config.php, etc.

Would you mind telling me how to solve the installation problems?  Thanks.