Problems viewing Hot Potatoes results

Problems viewing Hot Potatoes results

by Eric Schewe -
Number of replies: 7

We are having problems viewing results from attempts on Hot Potatoes activities. I can go to the list of Hot Potatoes activities and see in the far right column something like "View reports for 24 attempts (15 Users)". When I click on the link I am then given the report generator. I select 'this course', 'all participants', 'all attempts' and I get a white page returned to me. I still get the Moodle header and everything but no results are returned. Any combination of those drop down menus return the same thing, a blank white page with no results.

Another thing to note, there are over 50 Hot Potatoes activities so when clicking 're-grade all' it fails because it can't finish re-grading within 30 seconds and the query times out.

I pulled the course down onto another server and started deleting things and eventually got it so re-grading will work but I still can't pull reports.

Anyone else had any similar problems?

We are using:
Moodle 1.5.3+
Hot Potatoes 2005031420

Redhat Enterprise Linux 4 AS
Apache 2.0.55
PHP 5.1.2
MySQL 5.0.15

Average of ratings: -
In reply to Eric Schewe

Re: Problems viewing Hot Potatoes results

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi Eric,
I had similar problems with HotPot v2.0 smile

I found that when I had a lot of quizzes and attempts at quizzes I couldn't run the "Regrade All" option because the script ran out of time - just as yours is doing.

There were several reasons for the slowness:
  • the script attempts to regrade ALL atempts to ALL quizzes in one fell swoop
  • the tables for HotPot v2.0 (which you are using) do not have indexes on them
  • several SQL database queries are used when they could be combined into more complex but more efficient queries
These problems are fixed in HotPot v2.1. As far as I know this version of the module is stable and I believe it will cope much better than the current module with your situation.

At the moment your HotPot tables are in some disarray because of the fact that the "Regrade All" did not complete. The "hotpot_attempts" table shows that attempts were taken, but the "hotpot_responses" table does not have details of the responses used in those attempts, so the reports are empty.

I think you can fix the HotPot tables, if you install HotPot v2.1 and then regrade the quizzes individually, which HotPot v2.1 allows you to do.

You can download HotPot v2.1 from here:
http://download.moodle.org/download.php/modules/hotpot.zip

Put the zip file in the "mod" folder on your Moodle site and unzip it there so that it overwrites the current "mod/hotpot" folder.

You will also need the HotPot messages file:
http://cvs.sourceforge.net/viewcvs.py/moodle/moodle/lang/en_utf8/hotpot.php
Put the messages file "lang/en/hotpot.php" in your Moodle 1.5 site.

If you want the help files you can download them from here:
http://cvs.sourceforge.net/viewcvs.py/moodle/moodle/lang/en_utf8/help/hotpot/
The help files go in the "lang/en/help/hotpot/" folder in your Moodle 1.5 site.

Before attempting to install HotPot v2.1, please backup your entire Moodle database, so that you can quickly get back to your current position if something goes amiss. I wouldn't want you to blame me for losing a lot of time or data. Of course, if everything goes OK I'll be happy to take the credit smile

If anything is not clear, please let me know

all the best
Gordon
In reply to Gordon Bateson

Re: Problems viewing Hot Potatoes results

by Eric Schewe -
Thanks for the reply! I gave it a shot, performed the upgrade and all the results were gone for all the Hot Potatoes activities. So what I tried to do is restore a backup of the course that had all its Hot Potatoes data and then restore it with the new Hot Potatoes Mod installed. All I get is a ton of these errors:

  • Details record could not be updated: attempt=1
  • Details record could not be updated: attempt=3
  • Details record could not be updated: attempt=2
  • Details record could not be updated: attempt=3
  • Details record could not be updated: attempt=4

I'm guessing the version we were using isn't compatible with the new version of Hot Potatoes?
In reply to Eric Schewe

Re: Problems viewing Hot Potatoes results

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Oh dear, this is gettng messy quickly surprise

I would like to go back a few steps and check what happend.
  • did you take a backup of your entire Moodle database?
  • did you get any messages (good or bad) when you installed HotPot v2.1?
  • when you say "all the results were gone for all the Hot Potatoes activities", do you mean that on the "Hot Potatoes quizzes" index page, all the activities were listed, but there were no links saying "view reports for XX attempts (YY users)"? Or maybe you can see these links, but on the next page there are no details of the attempts?
Regarding what to do next, I would like to have a look at the server myself. Would that be possible? Please could you contact me privately to discuss it. My email address is: gordon at kanazawa hyphen gu dot ac dot jp

many thanks
Gordon
In reply to Gordon Bateson

Re: Problems viewing Hot Potatoes results

by Eric Schewe -
I've found a solution to the problem. It appears HotPot is not compatible with PHP 5.1.2. I downgraded everything back to PHP 5.0.5 and the problem was resolved.
In reply to Eric Schewe

Re: Problems viewing Hot Potatoes results

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Well done Eric! You were spot on approve

When I upgraded to PHP 5.1.2 (from 5.0.x) I got the same problem as you: JCross and JMatch would't work and the Overview report didn't show.

The reason was that apparently in PHP 5.1.2 you are not allowed to assign variables in calls to functions, so some of the HotPot code was not working. (a more detailed explanation is at the end of this message)

I have modified the relevant HotPot code now and tested it on my PHP 5.1.2 server and everything seems to be OK again. You can download the new module form the Moodle downloads page tomorrow. The new version number is HotPot v2.1.15 (or 2005090715)

many thanks!
Gordon

=======================================
assigning variables when calling a function
=======================================

Consider the following PHP function, which is intended to add one to a number:

function add_one(&$number) {
$number = $number + 1;
}

Now let's say the function is used as follows:

add_one ($n=1);
print $n;

In PHP 5.0 (and less) the print statment would print "2", but in PHP 5.1 the $n is unaffected by the function call and stays at 1. The solution is to assign the variable before the call to the function, as follows:

$n = 1;
add_one ($n);
print $n;

In reply to Gordon Bateson

Re: Problems viewing Hot Potatoes results

by Aidan McCanny -

I have recently upgraded Hot potatoes.  The version I had automatically included a hint [?] button beside each gap in the cloze quizzes I had set up even though I had cancelled this feature when I had set the quiz up.  Upgrading has resolved that problem.  However, every time I go to set up a new quiz in Moodle, I now get textsourcefile (with the double square brackets) for the name and similiar double squared bracket suggestions for the other options offered.  This still appears to work though when I now do the quiz, eg multiple choice, the results for a student come up as 'in progress' which then changes to 'abandoned'.  I am then unable to obtain any results from the students.  The same applies to the cloze quizzes.  When I check my answers I get the percentage I got right but when I click on the breadcrumbs to bring me back to the course, the results are not stored but instead the quiz comes up as abandoned.  The multiple choice quizzes were working great before the update.  I don't know what version I had before.  Have you any suggestions?

Thanks

Aidan

In reply to Aidan McCanny

Re: Problems viewing Hot Potatoes results

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

HI Aidan,
I am glad to hear you have regained control of your clue buttons smile

The double brackets are appearing because you have not installed the hotpot messages file yet. Here's a snip from the README.TXT file on how to do that:

   On Moodle 1.5 and earlier:
   (a) download
http://cvs.sourceforge.net/viewcvs.py/moodle/moodle/lang/en_utf8/hotpot.php
       to "lang/en/hotpot.php" on your Moodle site
   (b) download the files in
http://cvs.sourceforge.net/viewcvs.py/moodle/moodle/lang/en_utf8/help/hotpot/
       into "lang/en/help/hotpot/" on your Moodle site

Regarding the status and results of the quizzes, please remember that the results are NOT stored when you click the breadcrumbs. The results are only sent back to Moodle if click buttons in the quiz ("check", "hint" etc).

To verify that Moodle is storing the results of your quizzes, please could you try the following test:

  1. add a short HotPot activity to your course that we can use for this test
  2. attempt the activity and answer all the questions correctly. Please do not click on the breadcrumbs or any navigation links. Allow the quiz return to the course page automatically when the quiz is completed
  3. click on the "Hot Potatoes Quizzes" link in the "Activities" menu on your course page
  4. click on the link which says "View reports for 1 attempts (1 Users)" for the test quiz
  5. verify that the status of your attempt at the test quiz is "Completed" and that there is a link to the results of the test

I am particularly concerned to know what happens in step 2.

best regards
Gordon