I was the first to tell about the "IE7 support" issue in the forum but... I'll vote for this cleaned proposal, having also read http://yuilibrary.com/yui/docs/json/ - need time to see how it works in Moodle and I'll use this issue as an opportunity to learn something around the way YUI works (not sure where those modules are loaded in Moodle, probably course/dnduploadlib.php via 'json').

Matteo Scaramuccia
added a comment - 18/Apr/13 1:23 PM Added Dan as a watcher.
Nice proposal Davo!
I was the first to tell about the "IE7 support" issue in the forum but... I'll vote for this cleaned proposal, having also read http://yuilibrary.com/yui/docs/json/ - need time to see how it works in Moodle and I'll use this issue as an opportunity to learn something around the way YUI works (not sure where those modules are loaded in Moodle, probably course/dnduploadlib.php via 'json' ).

Dan Marsden
added a comment - 18/Apr/13 9:36 PM Thanks Davo - looks good to me - this is consistent with other Moodle code (using Y.JSON instead of JSON)
only thing missing is testing instructions - feel free to submit for integration once those have been added... feel free to submit patches for other SCORM bugs too...

TO TESTER: if its really hard for you to get an ie7 install then I am OK with you not testing with it (not officially supported, I trust Davo has done it), but we should at least test supported browsers to ensure there are not regressions.

Dan Poltawski
added a comment - 19/Apr/13 2:25 PM Integrated to master and 24 - thanks Davo.
TO TESTER: if its really hard for you to get an ie7 install then I am OK with you not testing with it (not officially supported, I trust Davo has done it), but we should at least test supported browsers to ensure there are not regressions.

Davo Smith
added a comment - 23/Apr/13 5:51 PM Unfortunately, I think this fix has caused a regression on at least one site (the site which the fix was created for in the first place).
In some situations (and I'm not quite sure which situations), the YUI JSON module is not loaded.
It's only a few lines of code to fix - I assume I should create a new issue, rather than updating here?

I'm afraid I was unable to track down why the JSON module was not loaded on the site in question (or, for that matter, exactly why it managed to be loaded when testing locally). It may have been to do with AJAX settings, but I'm not sure.

What I do know, is that when I pushed the attached fix out to the client the problem went away again (as you would expect, given the symptoms).

Davo Smith
added a comment - 23/Apr/13 11:21 PM I'm afraid I was unable to track down why the JSON module was not loaded on the site in question (or, for that matter, exactly why it managed to be loaded when testing locally). It may have been to do with AJAX settings, but I'm not sure.
What I do know, is that when I pushed the attached fix out to the client the problem went away again (as you would expect, given the symptoms).

Matteo Scaramuccia
added a comment - 24/Apr/13 5:33 AM - edited Hi All,
see my comment above, https://tracker.moodle.org/browse/MDL-39219?focusedCommentId=216886&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-216886 , when I was guessing where json is loaded, available for all the YUI code.
Quickly bottom-up from the code: course/lib.php::include_course_ajax => course/dnduploadlib.php::dndupload_add_to_course , the first blocked before including the required YUI modules, json included, when course/lib.php::course_ajax_enabled return false .
I'm with Davo to think about AJAX.