Hot Potatoes attempt record could not be accessed

Hot Potatoes attempt record could not be accessed

by Scott McGlynn -
Number of replies: 10

Gordon,

I see that this thread is a couple of years old but it pertains directly to an issue that has cropped up for me this week as I've been using HotPot to give finals for my students as our term ends.

I've been using HotPot and these exact same jqz, jmatch, and jclz files for over a year on a couple of different moodle installations and have never had any of these problems before. This week, I've seen all the issues this thread discusses. In particular:

This morning, I took a quiz myself. No other users are on line and I got this error when submitting a jmatch:

Hot Potatoes attempt record 516 could not be accessed:

This appears to be the db overload issue you discussed, but nothing else is going on in MySQL right now except for my single HotPot Quiz. I've had 45 students taking a quiz at one time and never seen this before.

Yesterday, I watched several students finish a quiz, show the 'results have been saved screen' and my HotPot report show that their quiz is 'in progress'. More importantly, the details of their attempt will only show some random percentage of the total questions. So out of 48 questions, the attempt record will show only 20 or so and that perhaps the student has answered only 15 of those. This is after I clearly watched them finish the entire test. I also saw scores change with time. For example, I watched a student finish and get a score of 94. However, my report would show perhaps and 82, but then five minutes later show maybe a 79. After about 10 minutes the scores finally stablized and stopped changing. I think MySQL has Alzheimer's.

Out of approximately 74 attempts this week, my reports show only 3 completed. I know that all the attempts were completed because I set up my jqz so that EVERY answer is correct (wrong answers score 0%) so that students won't get 'trapped' in the quiz because they had wrong answers. Even with this protection, some times students still forget to answer questions and I have walk through the entire quiz with them to find whatever is holding them back. I'm very keen on making sure my students don't close the quiz window when they think they are done. I instruct them to wait for it to kick them back to the main moodle class page or their test will be invalid.

Clearly something unhealthy is going on with my MySQL db, but what could it be? This server has been running smoothly for about year and has had no recent configuration changes. I did a restart last night in hopes that might make a change, but I still got the above mentioned error. The error log for MySQL is completely empty.

As a side note, when I set up all these quizzes two or three weeks ago and tested them myself, they worked fine. I also had one student do a linked series of five files (quiz, match, cloze, cross, and quiz) and it worked flawlessly. This was the same set of files that failed on me this morning.

I'm running Moodle 1.9.8 Build 20100325

(Edited by Gordon Bateson - original submission Wednesday, 9 June 2010, 06:52 AM)

Average of ratings: -
In reply to Scott McGlynn

Re: Hot Potatoes attempt record could not be accessed

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hello Scott,
I have split this thread into its own discussion because I think it deserves special attention.

It seems your DB is struggling. My first guess is that either is has become a little corrupted, or its allotted disk space is close to being used up.

You can often identify and fix a slightly corrupt or inefficiently organized database by "optimize"-ing the database. This is easy to do if you have a DB management tool such as phpMyAdmin (for MySQL). On phpMyAdmin you go to the "Structure" tab for the database, select all the tables and then select "Check tables" from the action menu at the bottom of the page (see attached screenshot).

If your "hotpot_details" table is very large, then you can usually safely "Empty" that, to get some space back. You should be aware that by emptying that table, you will lose the ability to regrade the HotPot attempts at a later date, should a bug be discovered in the scoring functions of the HotPot module. However, I personally think new scoring bugs are unlikely to appear now as the HotPot module has been used on live sites for over seven years now and can reasonably be said to be mature, robust and stable.

It would also be interesting to look at the error logs on your server. In particular the web server (Apache?) log and the php error log. If I were you, I would additionally enable Moodle debugging (Site administration -> Server -> Debugging) so that problems are reported immediately on the students screens too.

Please let us know how your investigations proceed, what solutions you tried and how you get on.

thanks
Gordon
Attachment pma.check.tables.JPG
In reply to Gordon Bateson

Re: Hot Potatoes attempt record could not be accessed

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
By the way Scott, what was the answer to the riddle you posed over on the following thread:
There are several people over there who have a similar problem. Please help them out if you can.

Gordon
In reply to Gordon Bateson

Re: Hot Potatoes attempt record could not be accessed

by Scott McGlynn -
How can I check to see if the allotted disk space is running low? I know just enough to be dangerous using MySQL

I checked the tables as described in your post and everything came back okay.

My HotPot _details table is about 4 mbytes. That doesn't seem all that large to me, but it does appear to be one of my largest moodle tables.

I am running Apache under UbuntuServer.

The error log wasn't enabled on MySQL. It is now (but wasn't this morning during today's testing).

The syslog shows nothing unusual.

The Apache error log shows nothing related to these errors.There are some 404 errors, but nothing related to Moodle or the HotPot module.

I did have another student test today and I tried a couple things and I have some more interesting information to add:


1. All my previous tests this week were a single large jqz file. One test was 48 questions and the other was 95. Neither has any video or audio, but both have several small jpgs in the questions.

2. Today, I did a quiz chain that included cloze, jmatch, jcross, jquiz formats in five HotPot elements total. The jquiz file was 40 questions and failed miserably like the others this week. Only 2 of 15 tests showed completed and I watched the other 13 scores change over time during the 5 minutes following the close of the test. The details of these 13 attempts also showed random missing questions even though the student had 'completed' the quiz (the 'saving results' screen displayed).

3. The jmatch and jcross elements worked almost flawlessly. Out of a total of 60 attempts for those elements (4 sections x 15 students) only 2 attempts showed up as 'in progress' while all the rest showed 'complete. All the scores and attempt details stayed accurate and intact for these 58 attempts.

4. One other interesting note is that I have the attempts limit set to one so a student can't restart the test. I've had a couple of students get the 'no more attempts allowed' message show up on their first attempt. When I go in to delete that attempt, it isn't there. So, they are blocked from making an attempt even though my admin page for attempts doesn't even show that they've made one (and they hadn't yet at that point). In all cases when this has happened, having the student wait or move on to another section seemed to cure the problem. It's almost like a lockout timing out that eventually lets them in.

5. I imported the HotPot jqz today into a Moodle quiz and had my 15 students retake the test with that module. Worked flawlessly (except that my cool hybrid questions default to multiple choice on the import. We need a way to batch edit MC questions to short answer and vice versa. I've found a way to do it in excel, but it's tedious)
In reply to Scott McGlynn

Re: Hot Potatoes attempt record could not be accessed

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

From what you say it seems your server is struggling. Something there has changed over the last year.

If you are near the end of term and very busy then you probably do not have time to spend on investigating this problem "scientifically", but I think that is what you need to do to isolate what is not working as well on your system.

It may help you to understand a little more about how the HotPot module works.

Every time you click something in a Hot Potatoes quiz delivered by the HotPot module in Moodle, *all* the information about *all* the questions is gathered up, encoded as XML and sent to Moodle, where it is decoded and stored in the database. That happens *every* time the Check, Hint or Clue buttons are clicked. Obviously, the more questions you have the more data is sent.

In JQuiz there is a lot of clicking to do, so that means a lot of data is sent to Moodle. With 40 students doing a JQuiz with 95 questions the server is working very hard. I would be intertested to see the CPU usage during one of your classes.

JCross and JMatch generally have fewer questions and a slower click rate, so the fact that these exercises work OK on your system, and the 40-100 question JQuizzes do not, also suggests that it is the volume of network traffic from JQuiz that is swamping either your network or your server.

You can reduce the amount of data being transferred in several ways, but my strongest recommendation is to try installing and using the QuizPort module.

The QuizPort module is the successor to the HotPot module. One of the things that the QuizPort module was designed to do was generate far less network traffic than the HotPot module. The QuizPort module only sends data back to the server once - either when the Hot Potatoes exercise is completed or when the students navigates away from the exercise.

The QuizPort module does many other things better than the HotPot module.

For example, it caches the pre-processed version of the exercise so it can be dispatched to the browser more quickly and with less work from the server than the HotPot module can manage.

Because you are near the end of term, you may not feel inclined to start installing and exerimenting with new Moodle modules, but that is my recommendation as a first step in this case.

If you are simply wondering how to administer your final test, I would suggest importing your JQuiz in Moodle's Quiz module as you have done.

Gordon

Average of ratings: Useful (1)
In reply to Gordon Bateson

Re: Hot Potatoes attempt record could not be accessed

by Scott McGlynn -

This is very helpful. I suspected that the length of the quiz may have had an impact, but I didn't realize the entire quiz gets zipped up and sent back for each click. That's a lot of data for each round trip.

I saw some info about the QuizPort module being the successor to HotPot but it wasn't clear to me the significantly different structural approach that it uses to minimize data transfer. I look forward to using it because I really like the hybrid question type that the jquiz module offers. Eventually I'll likely get all my tests properly ported to the moodle quiz module, but that's a project for another time when I can make SA questions and add useful feedback to each response.

Thanks for all the help. I have two more rounds of testing next week and I'm going to make sure I have applicable data logs turned on for review. In particular, I'll make sure I CPU, network traffic, and sql errors logged. One of my help files indicated that turning on the general log for MySQL would cause a significant performance penalty so I'll leave that one off. Do you have any suggestions for other data to log?

Scott McGlynn

In reply to Scott McGlynn

Re: Hot Potatoes attempt record could not be accessed

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
> Do you have any suggestions for other data to log?

The biggest single aid for me to investigating issues with Moodle is Site Administration -> Server -> Debugging
  • Debug message: DEVELOPER
  • Display debug messages: checked
  • XML strict headers: unchecked
You may be interested to select the "Performance info" setting on this page too, although it requires you to use the "Standard" Moodle theme.

The main Moodle site at my school is on a Windows machine, so if I suspect a heavy server load, I login to it remotely during class and monitor the CPU usage via the Windows Task Manager. Probably UNIX has some other way to monitor the CPU.

On a commercially hosted Moodle site I maintain, I can monitor CPU usage via the control panel, Plesk. This control panel also gives me access to the Apache and PHP error logs, as well as giving me a report of when the server was maxed out on memory, CPU or disk space. These aids were very useful to me when I first took control of the server, as the Apache server had been setup with everything enabled and was demanding a lot of memory. I trimmed down the Apache modules and can now run QuizPort comfortably with 100+ simultaneous users, where initially we were struggling to cope with 40.

What you monitor and how you monitor it will depend rather on your individual setup, your expertise, and the support available from people you are connected to.

When you are ready to try it out, you can download the QuizPort module from here:
all the best
Gordon
Average of ratings: Useful (1)
In reply to Gordon Bateson

Re: Hot Potatoes attempt record could not be accessed

by Scott McGlynn -
I installed Quizport and gave two HotPot quizzes with it. No database server choking occurred. However, I am unable to delete attempts and I also have odd things happen when I try to make quizport edits. For example, changing the closing time doesn't stick. Or, creating a brand new quizport using the same jqiz file will 'inherit' settings (like a specific closing time and date when it should default to disabled) from the other quizport. This doesn't seem like it should be happening. I get one line of debugging info that flashes for a split second on that editing so I can't copy it here. However, here's the detailed debugging info that I get when trying to delete attempts of any kind:


Unknown column 'scoreignore' in 'field list'

SELECT id,unitid,timelimit,allowresume,attemptlimit,scoremethod,scoreignore,scorelimit,scoreweighting FROM mdl_quizport_quizzes WHERE id IN (3) ORDER BY id
line 686 of lib/dmllib.php: call to debugging()
line 609 of lib/dmllib.php: call to get_recordset_sql()
line 930 of lib/dmllib.php: call to get_recordset_select()
line 119 of mod/quizport/legacy/mdl_19.php: call to get_records_select()
line 3660 of mod/quizport/class.php: call to moodle_database->get_records_select()
line 3464 of mod/quizport/class.php: call to mod_quizport->clean_selected()
line 22 of mod/quizport/index.php: call to mod_quizport->delete_selected_attempts()
Unknown column 'gradeignore' in 'field list'

SELECT id,parenttype,parentid,timelimit,allowresume,attemptlimit,attemptgrademethod,grademethod,gradeignore,gradelimit,gradeweighting FROM mdl_quizport_units WHERE id IN (3) AND parenttype=0 ORDER BY id
line 686 of lib/dmllib.php: call to debugging()
line 609 of lib/dmllib.php: call to get_recordset_sql()
line 930 of lib/dmllib.php: call to get_recordset_select()
line 119 of mod/quizport/legacy/mdl_19.php: call to get_records_select()
line 3675 of mod/quizport/class.php: call to moodle_database->get_records_select()
line 3464 of mod/quizport/class.php: call to mod_quizport->clean_selected()
line 22 of mod/quizport/index.php: call to mod_quizport->delete_selected_attempts()


Any thoughts on what's happening here? I did a check and optimize of my db tables. I also uninstalled and reinstalled quizport and I still have this issue.
In reply to Scott McGlynn

Re: Hot Potatoes attempt record could not be accessed

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi Scott,
glad to hear that QuizPort appears to fix the network/server overload, but sorry to hear about the error.

I know what the problem is and will make a fix for it tomorrow - maybe earlier.

cheers
Gordon
In reply to Gordon Bateson

Re: Hot Potatoes attempt record could not be accessed

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hello again Scott,
please could you download, install and trigger the update (Site Administration -> Notifications) of the QuizPort module on your site.
That should fix the error message about missing fields. I will respond to your other points tomorrow.

Gordon
In reply to Gordon Bateson

Re: Hot Potatoes attempt record could not be accessed

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

> However, I am unable to delete attempts ...
> here's the detailed debugging info ...

I believe that updating to the latest version of QuizPort will fix this problem. Please update and let me know if deletion of attempts then works OK.

> when I try to make quizport edits ...
> changing the closing time doesn't stick

This is probably also related to the missing database fields and so should be fixed by updating your QuizPort module. I tested on my own Moodle site and can confirm that changes I made to a QuizPort's open and close dates were updated, i.e. they did "stick", and were effective.

> creating a brand new quizport using the same jqiz file will 'inherit' settings
> (like a specific closing time and date when it should default to disabled)
> from the other quizport.

This is by design. The last settings you used for QuizPort units quizzes will be used as defaults for new QuizPort units and quizzes that you create in the future.

> I get one line of debugging info that flashes for a split second

If you are able to get a hold of that message, I will certainly look into it, but I have a strong hunch that it is related to the missing database fields, and so will not appear once you have updated your QuizPort module.

Please let me know how you get on after updating your QuizPort module.

regards
Gordon