Hot Potatoes problem in Firefox 17

Hot Potatoes problem in Firefox 17

by Glenys Hanson -
Number of replies: 7

Hi everybody,

Clicking on an exercise in Firefox 17 will cause this irritating pop-up window to appear:

To understand the problem read this discussion in the Hot Potatoes Users group: User agent string in Firefox 17

A solution is given by Stewart Arniel, one of the developers, here: Re: User agent string in Firefox 17

Cheers,

Glenys

Average of ratings: Useful (1)
In reply to Glenys Hanson

Re: Hot Potatoes problem in Firefox 17

by Joseph Rézeau -
Picture of Core developers Picture of Plugin developers Picture of Testers Picture of Translators

Here is a workaround, as I already posted on the French forum.

a) for HP exercises already created locally and exported to HTML, you'll have to remove this line from the HTML file:

if (this.geckoVer < 20020000){this.min = false;}

b) to create new exercices without the bug, locally as well as online in Moodle, you'll have to comment out that same line in the hp6browsercheck.js_ file. I am attaching the modified file to this post. All you have to do is to replace the original file with the one I have attached.

Those files are located:

local : c:\Program Files (x86)\HotPotatoes6\source\hp6browsercheck.js_ (on a Windows box)

on your moodle site: moodle\mod\hotpot\attempt\hp\6\templates\hp6browsercheck.js_

Enjoy!

Joseph

Average of ratings: Useful (1)
In reply to Joseph Rézeau

Re: Hot Potatoes problem in Firefox 17

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

Thanks Glenys and Joseph !

I have modified the QuizPort module (Moodle 1.x), HotPot module (Moodle 2.x) and TaskChain module (Moodle 2.x) to detect and modify the javascript which detects the Firefox browser version.

I noted the fix the Joseph kindly described of commenting out the setting of "this.min", and I also read about Martin's fix of removing the alert message altogether. However, I have opted to simply refine the checking of the Firefox browser so that it first checks the Firefox version number is one of the old style numbers before checks for a minimum version, thus:

if (this.geckoVer > 10000000 && this.geckoVer < 20020000){this.min = false;}

As a result, the new-style Firefox version numbers will not produce the warning message.

This fix will apply to all Hot Potatoes files (xml or html) delivered via any of the above-mentioned modules.

I have not modified the HotPot module for Moodle 1.9 (or earlier), because that version of Moodle is no longer modifiable except for extremely urgent security fixes, which this issue is not. If you are using the HotPot module on Moodle 1.x, I suggest you modify your html files with a search-and-replace (as described in the links Glenys provided), and also modify the "hp6browsercheck.js_" on your Moodle site (as described by Joseph above).

Here are the links to download the updated versions of the modules:

Once you have uploaded the new scripts to your Moodle site, you will need to login as admin to initiate the install which automatically clears out any previously cached versions of the Hot Potatoes files.

enjoy!
Gordon

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

Re: Hot Potatoes problem in Firefox 17

by Glenys Hanson -

Hi Gordon,

Thanks so much for this. I confirm that the fix works on QuizPorts on Moodle 1.9.

I'll still have to do the "find & replace" and all my hundreds of exercises that are not in QuizPorts nor on Moodle 2. Also all my modified source files.

But now I have three clever solutions. If I've understood correctly:

  1. Stewart Arniel suggests for old exercises to find and replace:
    if (this.geckoVer < 20020000){this.min = false;}
    by
    // if (this.geckoVer < 20020000){this.min = false;}
    And make the same change hp6browsercheck.js_ source file to create new exercises.

  2. Joseph Rézeau suggests for old exercises to find and replace:
    if (this.geckoVer < 20020000){this.min = false;}
    by
    (nothing)
    And kindly provides a modified hp6browsercheck.js_ source file to create new exercises.

  3. Gordon Baateson suggests for old exercises to find and replace:
    if (this.geckoVer < 20020000){this.min = false;}
    by
    if (this.geckoVer > 10000000 && this.geckoVer < 20020000){this.min = false;}
    And make the same changes in  hp6browsercheck.js_ source file to create new exercises.

How do I choose between them?

Cheers,

Glenys

In reply to Glenys Hanson

Re: Hot Potatoes problem in Firefox 17

by Stan Bogdanov -

Hi Glenys,

Joseph's hp6browsercheck.js_ source file has that troublesome line commented out, so the choice is between Martin and Stewart's and Gordon's.

I'm also wondering which one is a better implementation in the long run.

Cheers

Stan

In reply to Stan Bogdanov

Re: Hot Potatoes problem in Firefox 17

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

It depends who you think will be viewing your Hot Potatoes exercises.

If you think people with old Firefox/Mozilla browsers will be viewing your Hot Potatoes exercises and you want to show them the "Your browser may not be able to handle this page", then you should go with the Gordon fix.

However, if you think that no old Firefox/Mozilla browsers will ever view your page, then you should use Stewart's fix.

If you never want to see this message again, you should use the Martin fix (here)

I chose the Gordon fix because my general policy is to tweak as little as possible, so that the original intention of the code is preserved as much as possible. Besides, if it turns out that one of the other methods would be more suitable for the Moodle modules, then I will change them accordingly.

HTH smile
Gordon

In reply to Gordon Bateson

Re: Hot Potatoes problem in Firefox 17

by Gerald Grow -

Thanks, Gordon! I was afraid I'd have to change a line in every HotPot, and you have made the fix a simple one.

Allow me to summarize:

Firefox 17 changed something that causes a harmless and meaningless alert to pop up in Hot Potatoes saying, "Your browser may not be able to handle this page."

If you are using HotPots inside Moodle 2+, update to the latest TaskChain and HotPot modules.

If you are using HotPots inside Moodle 1.9+, to the latest QuizPort for 1.9.

This will fix the Firefox alert in all HotPots that appear in Moodle 2+. 

It will also fix the Firefox alert in all HotPots that appear INSIDE QUIZPORTS in Moodle 1.9+.

However, if you are using HotPot quizzes directly as activities in Moodle 1.9+ (not inside QuizPorts), you will need to either (1) put them inside QuizPorts, or (2) modify one line in the code of each HotPot .htm file, as described in Gordon's post above.

Alternately, you could tell your students to just ignore the popup alert and click OK whenever it appears. The warning doesn't mean anything; the browser works fine.

Does that sound about right?

Average of ratings: Useful (1)
In reply to Gerald Grow

Re: Hot Potatoes problem in Firefox 17

by Martin Holmes -

I've released a new version of Windows HotPot that doesn't have that popup line in the source file. I'd recommend downloading the new version (hotpot.uvic.ca). Stewart should be releasing an updated Java version soon, if he hasn't done so already.


Our apologies for the confusion this has caused. The change in Firefox 17 took me by surprise, and to be honest, that browser message should have been removed years ago, because it's not really likely to be useful nowadays.


Cheers,
Martin

Average of ratings: Useful (2)