Learnpath: prevent re-init suspenddata on fonction get_local_suspend_data when logout in scorm_api.php - refs BT#18229

pull/3844/head
Damien Renou 4 years ago committed by Yannick Warnier
parent 9eff304670
commit ad6b2ae803
  1. 7
      public/main/lp/scorm_api.php

@ -2528,8 +2528,6 @@ function get_local_suspend_data()
var final_suspend_data = olms.suspend_data;
var idSuspendData = olms.lms_item_id + 'suspenddata' + olms.lms_view_id + 'u' + olms.lms_user_id;
if (olms.suspend_data.indexOf("ICPLAYER_") != -1) {
final_suspend_data = "";
try {
if (localStorage) {
mem_suspend_data = window.localStorage.getItem(idSuspendData);
@ -2543,12 +2541,13 @@ function get_local_suspend_data()
mem_suspend_data = "";
}
if (mem_suspend_data!="") {
if (olms.suspend_data.indexOf("ICPLAYER_")!=-1||mem_suspend_data.indexOf("ICPLAYER_")!=-1) {
final_suspend_data = "";
final_suspend_data = mem_suspend_data;
//console.log('recovery suspend_data' + mem_suspend_data);
}
}
} catch(err) {}
}
return final_suspend_data;
}

Loading…
Cancel
Save