LPs: Add sleep() when saving scorm status completed WIP BT#17835

pull/3565/head
Julio Montoya 6 years ago
parent ad6063fc87
commit cc4ae51f1b
  1. 12
      main/lp/scorm_api.php

@ -1985,6 +1985,10 @@ function xajax_save_item_scorm(
}
}
if (1 == statusSignalReceived && 'completed' == olms.lesson_status) {
scormSleep(3000);
}
if (is_interactions == 'true') {
interact_string = '';
temp = '';
@ -2548,3 +2552,11 @@ function update_chronometer(text_hour, text_minute, text_second)
return true;
}
function scormSleep(milliseconds) {
var date = Date.now();
var currentDate = null;
do {
currentDate = Date.now();
} while (currentDate - date < milliseconds);
}

Loading…
Cancel
Save