MDL-36800 SCORM: Fix Yui().use calls - thanks to Nancy Cheng for the fix
authorDan Marsden <dan@danmarsden.com>
Thu, 31 Jan 2013 22:33:54 +0000 (11:33 +1300)
committerDan Marsden <dan@danmarsden.com>
Sun, 3 Feb 2013 07:21:16 +0000 (20:21 +1300)
mod/scorm/datamodels/aicc.js.php
mod/scorm/datamodels/callback.js.php
mod/scorm/datamodels/scorm_12.js.php
mod/scorm/datamodels/scorm_13.js.php

index a5dd434..8a76338 100644 (file)
@@ -246,7 +246,7 @@ require_once($CFG->dirroot.'/mod/scorm/datamodels/callback.js.php');
                 // trigger TOC update
                 var sURL = "<?php echo $CFG->wwwroot; ?>" + "/mod/scorm/prereqs.php?a=<?php echo $scorm->id ?>&scoid=<?php echo $scoid ?>&attempt=<?php echo $attempt ?>&mode=<?php echo $mode ?>&currentorg=<?php echo $currentorg ?>&sesskey=<?php echo sesskey(); ?>";
                 var callback = this.connectPrereqCallback;
-                YUI.use('yui2-connection', function(Y) {
+                YUI().use('yui2-connection', function(Y) {
                     Y.YUI2.util.Connect.asyncRequest('GET', sURL, callback, null);
                 });
                 return "true";
index a51fc44..520f22b 100644 (file)
@@ -18,7 +18,7 @@
    this.connectPrereqCallback = {
 
         success: function(o) {
-            YUI.use('yui2-treeview', 'yui2-layout', function(Y) {
+            YUI().use('yui2-treeview', 'yui2-layout', function(Y) {
                 scorm_tree_node = Y.YUI2.widget.TreeView.getTree('scorm_tree');
                 if (o.responseText !== undefined) {
                     //alert('got a response: ' + o.responseText);
index f8b6963..f2623b1 100644 (file)
@@ -236,7 +236,7 @@ function SCORMapi1_2() {
                 // trigger TOC update
                 var sURL = "<?php echo $CFG->wwwroot; ?>" + "/mod/scorm/prereqs.php?a=<?php echo $scorm->id ?>&scoid=<?php echo $scoid ?>&attempt=<?php echo $attempt ?>&mode=<?php echo $mode ?>&currentorg=<?php echo $currentorg ?>&sesskey=<?php echo sesskey(); ?>";
                 var callback = this.connectPrereqCallback;
-                YUI.use('yui2-connection', function(Y) {
+                YUI().use('yui2-connection', function(Y) {
                     Y.YUI2.util.Connect.asyncRequest('GET', sURL, callback, null);
                 });
                 return result;
index a4ad5db..0d6dd23 100644 (file)
@@ -367,7 +367,7 @@ function SCORMapi1_3() {
                     // trigger TOC update
                     var sURL = "<?php echo $CFG->wwwroot; ?>" + "/mod/scorm/prereqs.php?a=<?php echo $scorm->id ?>&scoid=<?php echo $scoid ?>&attempt=<?php echo $attempt ?>&mode=<?php echo $mode ?>&currentorg=<?php echo $currentorg ?>&sesskey=<?php echo sesskey(); ?>";
                     var callback = this.connectPrereqCallback;
-                    YUI.use('yui2-connection', function(Y) {
+                    YUI().use('yui2-connection', function(Y) {
                         Y.YUI2.util.Connect.asyncRequest('GET', sURL, callback, null);
                     });
                 } else {