-
Bug
-
Resolution: Fixed
-
Minor
-
2.3
-
MOODLE_23_STABLE
-
MOODLE_23_STABLE
-
master_
MDL-34755 -
Due to some odd behaviour in old versions of IE, the JS that binds the onsubmit code fails in IE7 and IE8 in compatibility mode.
To reproduce:
1. Create a SCORM activity
2. Set display package to "New Window"
3. View the activity in IE8 (compatibility mode off)
4. Click "Enter" - activity will open in a new window (as expected)
5. Turn on IE8 compatibility mode
6. Click "Enter" - activity will open in the current window (not expected)
For more details see:
http://stackoverflow.com/questions/95731/why-does-an-onclick-property-set-with-setattribute-fail-to-work-in-ie/
http://msdn.microsoft.com/en-us/library/ie/dd347148(v=vs.85).aspx
The problem line is in mod/scorm/view.js L18.
Initially I tried using the YUI Events library to bind the onsubmit event, thinking that it would abstract away any differences but that didn't seem to work for me.
What did work was to change from using YUI:
var scormform = Y.one('#scormviewform');
to plain javascript:
var scormform = document.getElementById('scormviewform');
and then replacing the setAttribute call:
scormform.setAttribute('onsubmit', "window.open('','Popup','"poptions"'); this.target='Popup';");
with:
scormform.onsubmit = function()
{window.open('', 'Popup', poptions); this.target='Popup';};
that fixed it for me in IE while it still works in Firefox, Chrome and IE8 with compatibility off.
- blocks
-
MDL-33755 Enable direct launch of scorm activities from the course overview page
-
- Closed
-