MDL-67175 mod_scorm: fixing js eslint errors
This commit is contained in:
@@ -508,6 +508,7 @@ function AICCapi(def, cmiobj, scormauto, cfgwwwroot, scormid, scoid, attempt, vi
|
||||
}
|
||||
|
||||
function StoreData(data,storetotaltime) {
|
||||
var datastring = '';
|
||||
if (storetotaltime) {
|
||||
if (cmi.core.lesson_mode == 'normal') {
|
||||
if (cmi.core.credit == 'credit') {
|
||||
@@ -531,9 +532,8 @@ function AICCapi(def, cmiobj, scormauto, cfgwwwroot, scormid, scoid, attempt, vi
|
||||
datastring = CollectData(data,'cmi');
|
||||
}
|
||||
|
||||
//popupwin(datastring);
|
||||
var myRequest = NewHttpReq();
|
||||
result = DoRequest(myRequest,datamodelurl,datamodelurlparams + datastring);
|
||||
var result = DoRequest(myRequest, datamodelurl, datamodelurlparams + datastring);
|
||||
|
||||
if (result === false) {
|
||||
return false;
|
||||
|
||||
@@ -619,6 +619,7 @@ function SCORMapi1_2(def, cmiobj, cmiint, cmistring256, cmistring4096, scormdebu
|
||||
}
|
||||
|
||||
function StoreData(data,storetotaltime) {
|
||||
var datastring = '';
|
||||
if (storetotaltime) {
|
||||
if (cmi.core.lesson_status == 'not attempted') {
|
||||
cmi.core.lesson_status = 'completed';
|
||||
@@ -647,7 +648,7 @@ function SCORMapi1_2(def, cmiobj, cmiint, cmistring256, cmistring4096, scormdebu
|
||||
|
||||
var myRequest = NewHttpReq();
|
||||
//alert('going to:' + "<?php p($CFG->wwwroot) ?>/mod/scorm/datamodel.php" + "id=<?php p($id) ?>&a=<?php p($a) ?>&sesskey=<?php echo sesskey() ?>"+datastring);
|
||||
result = DoRequest(myRequest,datamodelurl,datamodelurlparams + datastring);
|
||||
var result = DoRequest(myRequest, datamodelurl, datamodelurlparams + datastring);
|
||||
|
||||
if (result === false) {
|
||||
return false;
|
||||
|
||||
@@ -1216,7 +1216,7 @@ function SCORMapi1_3(def, cmiobj, cmiint, cmicommentsuser, cmicommentslms, scorm
|
||||
datastring += navrequest;
|
||||
|
||||
var myRequest = NewHttpReq();
|
||||
result = DoRequest(myRequest, datamodelurl, datamodelurlparams + datastring);
|
||||
var result = DoRequest(myRequest, datamodelurl, datamodelurlparams + datastring);
|
||||
|
||||
if (result === false) {
|
||||
return false;
|
||||
|
||||
@@ -466,7 +466,6 @@ M.mod_scorm.init = function(Y, nav_display, navposition_left, navposition_top, h
|
||||
// what the outcome actually was.
|
||||
result = {};
|
||||
} else {
|
||||
mod_scorm_seq = encodeURIComponent(result);
|
||||
result = Y.JSON.parse(result);
|
||||
}
|
||||
|
||||
@@ -506,7 +505,6 @@ M.mod_scorm.init = function(Y, nav_display, navposition_left, navposition_top, h
|
||||
// what the outcome actually was.
|
||||
result = {};
|
||||
} else {
|
||||
mod_scorm_seq = encodeURIComponent(result);
|
||||
result = Y.JSON.parse(result);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user