I have spent the last couple of days in a Mac room, investigating reports that HotPots don't run on Safari. The main symptoms were incorrect scores (400% and more!) and a freezing of the browser when clicking the check button.
It turns out there were some big problems. The root cause is that on Safari the function.toString() does not return a valid function. In particular:
- myString.replace(/search expression/, 'replacement string');
changes to
myString.replace(search expression, 'replacement string');
i.e. the slashes, "/", are removed - for (var i=0; i<i_max; i++) { }
changes to
for (i=0; i<i_max; i++) { }
i.e. the local variable "i", becomes a global variable - (x-y)/z
changes to
x-y/z
i.e. the parentheses are removed from mathematical expressions. FYI x-y/z = x-(y/z) which is usually not the same as (x-y)/z. For example, if x=4, y=0 and z=4, then (x-y)/z = (4-0)/4 = 1, but x-(y/z) = 4 - (0/4) = 4.
After much trail and tribulation, I was finally able to work out what was going on and fix the HotPot Javascript to work around this curious Safari behavior. Currently, I have updated Moodle 1.6, and will make similar changes to 1.7, 1.8 and HEAD in the next few days.
While, I was at it, I incorporated the "source" templates from Hot Potatoes 6.2 into the HotPot module, and modified the HotPot javascript, to take account of the fact that the delimiter used to separate student guesses has been standardized to " | ". Previously, the delimiter had been "," or "|". The change in delimiter was the reason that "ignored" values were not being currently extracted and returned to Moodle.
all the best!
Gordon
P.S. On re-reading this post, I think I may not have explained things particularly clearly, but the long and the short of it is that Moodle 1.6 now uses Hot Potatoes 6.2 templates and is compatible with Safari (as well as all other modern browsers known to me). Moodle 1.7, 1.8 and HEAD will be updated soon.