diff --git a/main/lp/scorm_api.php b/main/lp/scorm_api.php index 59049d343a..3413210a01 100755 --- a/main/lp/scorm_api.php +++ b/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);