Issue Details (XML | Word | Printable)

Key: MDL-15899
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Piers Harding
Reporter: Andrea Bicciolo
Votes: 0
Watchers: 4
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

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

Created: 31/Jul/08 10:58 PM   Updated: 06/Aug/08 05:45 AM
Return to search
Component/s: SCORM
Affects Version/s: 1.8.7, 1.9.3, 2.0
Fix Version/s: 1.8.7, 1.9.3, 2.0

Database: MySQL
Participants: Andrea Bicciolo, Dan Marsden and Piers Harding
Security Level: None
QA Assignee: Petr Skoda
Resolved date: 05/Aug/08
Affected Branches: MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE
Fixed Branches: MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE


 Description  « Hide
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



 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Dan Marsden added a comment - 01/Aug/08 04:38 AM
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


Piers Harding added a comment - 01/Aug/08 05:23 AM
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


Dan Marsden added a comment - 01/Aug/08 06:20 AM
thanks Piers - Patch looks good to me, go ahead and push to 18Stable and 19Stable

Piers Harding added a comment - 01/Aug/08 06:35 AM
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.


Andrea Bicciolo added a comment - 01/Aug/08 04:37 PM
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 ?

Piers Harding added a comment - 02/Aug/08 02:34 AM
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.


Andrea Bicciolo added a comment - 04/Aug/08 05:53 PM
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

Andrea Bicciolo added a comment - 04/Aug/08 05:54 PM
Reopening, the fix need to rename every existing SCORM activity.

Piers Harding added a comment - 05/Aug/08 03:03 AM
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.


Andrea Bicciolo added a comment - 05/Aug/08 04:29 PM
Thanks Piers! Tested the new patch and works fine. Resolving.