Skip to content

Commit

Permalink
MDL-67175 mod_scorm: fixing js eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ferranrecio committed Feb 4, 2020
1 parent ede71ae commit 5bd9eaa
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions mod/scorm/datamodels/aicc.js
Expand Up @@ -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') {
Expand All @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion mod/scorm/datamodels/scorm_12.js
Expand Up @@ -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';
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion mod/scorm/datamodels/scorm_13.js
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions mod/scorm/module.js
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 5bd9eaa

Please sign in to comment.