Refactoring code to fix IExplorer support

pull/4260/head
Juan Cortizas Ponte 4 years ago committed by Angel Fernando Quiroz Campos
parent 76f80ab0ee
commit 3bd6b6e29c
  1. 12
      main/lp/scorm_api.php

@ -874,10 +874,10 @@ function SetValue(param, val) {
/**
* Saves the current data from JS memory to the LMS database
*/
function savedata(item_id, forceIframeSave) {
if (!forceIframeSave) {
forceIframeSave = 0;
}
function savedata(item_id) {
var forceIframeSave = arguments.length > 1 && arguments[1] !== undefined
? arguments[1]
: 0;
// Origin can be 'commit', 'finish' or 'terminate' (depending on the calling function)
logit_lms('function savedata(' + item_id + ')', 3);
@ -887,10 +887,6 @@ function savedata(item_id, forceIframeSave) {
//olms.updatable_vars_list['cmi.core.lesson_status'] = true;
}
if (typeof(forceIframeSave) == 'undefined') {
forceIframeSave = 0;
}
old_item_id = olms.info_lms_item[0];
var item_to_save = olms.lms_item_id;
logit_lms('item_to_save (original value): ' + item_to_save, 3);

Loading…
Cancel
Save