Permalink
Browse files

MDL-40773 mod_scorm: convert yui2 -> yui3

  • Loading branch information...
1 parent 50ff861 commit 0264b3eaacf361ed3476fa6e93469949b4d05efb @mayankgupta mayankgupta committed with danmarsden Jul 19, 2013
Showing with 13 additions and 9 deletions.
  1. +3 −2 mod/scorm/datamodels/aicc.js.php
  2. +7 −5 mod/scorm/datamodels/scorm_12.js.php
  3. +3 −2 mod/scorm/datamodels/scorm_13.js.php
View
5 mod/scorm/datamodels/aicc.js.php
@@ -239,8 +239,9 @@ function LMSFinish (param) {
// 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 = M.mod_scorm.connectPrereqCallback;
- YUI().use('yui2-connection', function(Y) {
- Y.YUI2.util.Connect.asyncRequest('GET', sURL, callback, null);
+ YUI().use('io-base', function(Y) {
+ Y.on('io:complete', callback.success, Y);
+ Y.io(sURL);
});
return "true";
} else {
View
12 mod/scorm/datamodels/scorm_12.js.php
@@ -231,8 +231,9 @@ function LMSFinish (param) {
// 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 = M.mod_scorm.connectPrereqCallback;
- YUI().use('yui2-connection', function(Y) {
- Y.YUI2.util.Connect.asyncRequest('GET', sURL, callback, null);
+ YUI().use('io-base', function(Y) {
+ Y.on('io:complete', callback.success, Y);
+ Y.io(sURL);
});
return result;
} else {
@@ -430,8 +431,9 @@ function LMSCommit (param) {
// 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 = M.mod_scorm.connectPrereqCallback;
- YUI().use('yui2-connection', function(Y) {
- Y.YUI2.util.Connect.asyncRequest('GET', sURL, callback, null);
+ YUI().use('io-base', function(Y) {
+ Y.on('io:complete', callback.success, Y);
+ Y.io(sURL);
});
<?php
if (scorm_debugging($scorm)) {
@@ -445,7 +447,7 @@ function LMSCommit (param) {
?>
result = ('true' == result) ? 'true' : 'false';
errorCode = (result =='true')? '0' : '101';
- <?php
+ <?php
if (scorm_debugging($scorm)) {
echo 'LogAPICall("LMSCommit", "result", result, 0);';
echo 'LogAPICall("LMSCommit", "errorCode", errorCode, 0);';
View
5 mod/scorm/datamodels/scorm_13.js.php
@@ -360,8 +360,9 @@ function Terminate (param) {
// 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 = M.mod_scorm.connectPrereqCallback;
- YUI().use('yui2-connection', function(Y) {
- Y.YUI2.util.Connect.asyncRequest('GET', sURL, callback, null);
+ YUI().use('io-base', function(Y) {
+ Y.on('io:complete', callback.success, Y);
+ Y.io(sURL);
});
} else {
diagnostic = "Failure calling the Terminate remote callback: the server replied with HTTP Status " + AJAXResult;

0 comments on commit 0264b3e

Please sign in to comment.