Moodle

JavaScript error In IE7 when opening SCORM content in a new window

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 1.8.7, 1.9.3, 2.0
  • Fix Version/s: 1.8.7, 1.9.3, 2.0
  • Component/s: SCORM
  • Labels:
    None
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE

Description

When trying to open a a SCORM content in a new window using IE7, new windows fails to open with JavaScript error:

Line: 158
Char: 29
Error: Invalid argument
Code: 0
URL: http://yourdomain.tld/mod/scorm/player.php?a=1&scoid=2

Error does not appears when using Firefox 2. Problem appeared just after the weekly update with build 20080730, previous weekly build was not affected.

To reproduce:
1. add a new SCORM activity int a Moodle course
2. set window size, and set SCORM to be opened in a new window. Allow window to be resized and scrolled.
3. try access the SCORM form the course: in FF2 new window opens, in IE7 new window fails with JavaScript error

Activity

Hide
Dan Marsden added a comment -

Thanks Andrea - Piers is looking at this now.

I'm pretty sure the code that would have caused this has been in HEAD for quite a while! - and we spent quite a bit of time testing it, - unfortunately looks like we missed this! - any chance you might be able to do some more testing for us before we commit stuff to stable trees?

Dan

Show
Dan Marsden added a comment - Thanks Andrea - Piers is looking at this now. I'm pretty sure the code that would have caused this has been in HEAD for quite a while! - and we spent quite a bit of time testing it, - unfortunately looks like we missed this! - any chance you might be able to do some more testing for us before we commit stuff to stable trees? Dan
Hide
Piers Harding added a comment -

OK - I have tested this, and the only problem that I can come up with so far under IE7 is that it doesn't like the use of spaces in the window.open() name parameter for the popup code. As a temporary fix, please try changing the name of your SCORM activity to a single word with no spaces eg. Sample2004 or Sample_2004. Try this and let me know how you go, in the meantime I will work on a proper fix.

Please, in future, add screen shots of browser/JavaScript problems as it helps gretly with the problem resolution.

Thanks,
Piers Harding

Show
Piers Harding added a comment - OK - I have tested this, and the only problem that I can come up with so far under IE7 is that it doesn't like the use of spaces in the window.open() name parameter for the popup code. As a temporary fix, please try changing the name of your SCORM activity to a single word with no spaces eg. Sample2004 or Sample_2004. Try this and let me know how you go, in the meantime I will work on a proper fix. Please, in future, add screen shots of browser/JavaScript problems as it helps gretly with the problem resolution. Thanks, Piers Harding
Hide
Dan Marsden added a comment -

thanks Piers - Patch looks good to me, go ahead and push to 18Stable and 19Stable

Show
Dan Marsden added a comment - thanks Piers - Patch looks good to me, go ahead and push to 18Stable and 19Stable
Hide
Piers Harding added a comment -

OK - this has been patched in HEAD, 1.9 STABLE and 1.8 STABLE - Andrea, please test this and let me know if there are any further problems.

Cheers,
Piers Harding.

Show
Piers Harding added a comment - OK - this has been patched in HEAD, 1.9 STABLE and 1.8 STABLE - Andrea, please test this and let me know if there are any further problems. Cheers, Piers Harding.
Hide
Andrea Bicciolo added a comment -

Thanks for so a fast fix. Just to be sure I'm testing correctly, when you say about Activity Name, you mean the Moodle SCORM activity name or the name of the SCORM packet as it appear on the file system ?

Show
Andrea Bicciolo added a comment - Thanks for so a fast fix. Just to be sure I'm testing correctly, when you say about Activity Name, you mean the Moodle SCORM activity name or the name of the SCORM packet as it appear on the file system ?
Hide
Piers Harding added a comment -

Yes - it is the Moodle SCORM activity name. If you able to test against the current 1.9 or 1.8 stable branches, then you do not need to change anything.

Cheers,
Piers Harding.

Show
Piers Harding added a comment - Yes - it is the Moodle SCORM activity name. If you able to test against the current 1.9 or 1.8 stable branches, then you do not need to change anything. Cheers, Piers Harding.
Hide
Andrea Bicciolo added a comment -

Hi Piers, thanks for the clarification.
If I correctly understand, then the fix you committed will need to rename every already existing SCORM activities, in other words we are breaking what is in already in place and working prior to 20070730 weekly release. Not sure if it is a viable fix, reopening the issue. If I'm wrong, please let me know.
Andrea

Show
Andrea Bicciolo added a comment - Hi Piers, thanks for the clarification. If I correctly understand, then the fix you committed will need to rename every already existing SCORM activities, in other words we are breaking what is in already in place and working prior to 20070730 weekly release. Not sure if it is a viable fix, reopening the issue. If I'm wrong, please let me know. Andrea
Hide
Andrea Bicciolo added a comment -

Reopening, the fix need to rename every existing SCORM activity.

Show
Andrea Bicciolo added a comment - Reopening, the fix need to rename every existing SCORM activity.
Hide
Piers Harding added a comment -

I suggested renaming your SCORM activities as an immediate solution to your problem, until I had provided a patch. That patch has now been commited in HEAD, 1.9 STABLE, and 1.8 STABLE, so if you check out one of these then there is no need to rename your activities.

Have you tried the updated software?

Cheers,
Piers Harding.

Show
Piers Harding added a comment - I suggested renaming your SCORM activities as an immediate solution to your problem, until I had provided a patch. That patch has now been commited in HEAD, 1.9 STABLE, and 1.8 STABLE, so if you check out one of these then there is no need to rename your activities. Have you tried the updated software? Cheers, Piers Harding.
Hide
Andrea Bicciolo added a comment -

Thanks Piers! Tested the new patch and works fine. Resolving.

Show
Andrea Bicciolo added a comment - Thanks Piers! Tested the new patch and works fine. Resolving.

People

Vote (0)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: