long time no see !
Is it just this one quiz, or have all the HotPots suddenly stop started misbehaving?
Yes, been a while, because evergything worked so well until now.
In attempts to fix the problem, I deleted the Hotpot module in admin hoping to clear the database, which removed all Hotpot quizzes from all courses, then used notifications to put it back, but the problem remains.
There are no errors in the browsers, only warnings such as from Chrome
Resource interpreted as Script but transferred with MIME type text/html: "http://www.myserver.com/moodle/lib/overlib/overlib.js". /moodle/:22
Firefox and Seamonkey give warnings (plenty for every move made), but no errors. The warnings relate to styles.
I discovered the quizzes work as expected in Chrome, but not in Firefox, Seamonkey, Safari, or IE. The quizzes complete, the final score appears, but clicking OK and things "hang" at that point, the score is not recorded, and the student has to use the back button or navigation links to leave the quiz (it remains open with the final score displayed).
In grades-view-user report quizzes are listed but no scores.
Attempts are recorded and enforced, but status is always in progress. and grade is blank.
Again, it works with Chrome!
Cpanel on the site tells me all is OK with the sql database used by moodle.
I confirmed that the HotPot activity on my Moodle 1.9 site is working fine - that is to say it records results in all browsers in all Hot Potatoes types that I tested. Therefore, there I believe there is something specific about your site that it preventing the results being returned to Moodle.
I would like to come and have a look at your site.
I have created a username on your JMOC site. Could you enrol me in a course (as a student) which has a HotPot that behaves as you describe so that I can come and have a look.
OK, you have been enrolled in Science 9.
thanks for letting me into your site to have a look at the HotPot activities
The name of the file is "hotpot-full.js". Please check to see that it is there in your "mod/hotpot" folder.
If the "hotpot-full.js" file is there, then the server is not sending it for some other reason. I suggest that either the permissions on the file are wrong, or the Apache mod_security settings are too strict.
To fix the permissions, please change them to be the same as those of a file that *is* accessible to the browser, such as the "mod_form.js" file that you will also see in the "mod/hotpot" folder.
More information about the mod_security issue is on the following threads:
If the issue persists, you could also try enabling Moodle debugging (Site adinistration -> Server) or search the webserver (Apache?) error log to see what causes the "500 Internal server error" which occurs when the browser requests the hotpot-full.js file.
Please let us know how you get on, and if you need more help, please don't hesitate to ask.
I checked permissions on the hotpot-full.js file, they are set the same as on the mod_form.js file, 0644.
Still working on it, tried putting an .htaccess file (as per your links) to loosen security in the hotpot folder but it did not have any effect.
I did notice that in Seamonkey's error console I get this message:
Timestamp: 10/19/2012 2:30:23 PM
Error: The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must to be declared in the document or in the transfer protocol.
Source File: http://www.jmoc.ca/moodle/mod/hotpot/hotpot-full.js
I don't know if that is a problem related to the quizzes not working, as the error is generated when I directly access the file from the browser. I get the same error trying to access the mod-form.js file directly.
Finally, I contacted the server's caretakers, and they said they would look into the 500 error and the hotpot-full.js and get back to me.
So, I am waiting. I'll update here when I hear back.
the problem in a nutshell, as I see it, is that the following URL produces a server error:
You said that the quiz works in Chrome, but I suspect that if you cleared your Chrome local cache (Tools -> Clear browsing data) then the quiz would cease to work, because Chrome would not be able to get the js file.
Good luck with your investigations. Please let us know if you find a resolution.
The hotpot quizzes worked in late Setptember, since then I signed up for and implemented Google apps for education for the site, could that have possibly caused the problem?
Also, the techs for the host server asked if there is a php script/code involved when the quiz is started/selected by a student - hey seem to think it might be the source of the internal error.
the problems comes down to the fact that "hotpot-full.js" is not available on your site. Your server refuses to send it out.
There is no PHP involved in just accessing the the URL I gave in my previous post. It is a straightforward request for a plain js file.
The server doesn't send that file out, but it should. That is what the techical support folks on your server need to address.
I suggest you send them that URL I gave, the one for "hotpot-full.js", and ask them to investigate and fix the "500 Internal server error" that it produces. Once that error is fixed, the file will become available to the browsers accessing the Moodle site, and the HotPot activities will start working again.
Still having problems. The server techies haven't yet been much help. In trying to find the error, in the .htaccess file in the Moodle directory, when I put the # in front of the line so errors are displayed, I see the following in Chrome's error console.
Uncaught SyntaxError: Unexpected token <
Just found out that when the .htaccess file in the moodle directory contains:
php_value register_globals 0
php_flag display_errors off
the hotpot quizzes don't work for students or admins,
But when the file is:
php_value register_globals 0
#php_flag display_errors off
the hotpot quizzes work for admin but not for students.
Does that make any sense?
line 2955 of the hotpot-full.js file is as follows:
- hpForm.detail.value = '<?xml version="1.0"?><hpjsresult><fields>'+GetQuestionDetails()+'</fields></hpjsresult>';
If they won't or can't do that, or they tell you they have done so but you still have problems, you could try change that line (2955) in hotpot-full.js to the following:
- hpForm.detail.value = '<'+'?x'+'ml version="1.0"?><hpjsresult><fields>'+GetQuestionDetails()+'</fields></hpjsresult>';
Notice that I have obfuscated the XML tag so that hopefully the server-based parser will not recognize it.
That may be enough to fix the problem. If not continue reading ...
The parser may also be confused by the<html>, <body> and <form> tags in the hotpot-full.js file, in which case please replace your hotpot-full.js with the one attached to this message, in which those tags have also been obfuscated.
I see that the modified version of hotpot-full.js is now installed and accessible on your server and the HotPot activities are working again. Great news !
all the best