Skip to content

Commit

Permalink
Fix error when flash is not loaded and SCO is not started BT#14944
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Oct 11, 2018
1 parent d88715b commit da2d7f7
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion main/lp/scorm_api.php
Expand Up @@ -1434,7 +1434,16 @@ function reinit_updatable_vars_list() {
* @param string This parameter can be a string specifying the next
* item (like 'next', 'previous', 'first' or 'last') or the id to the next item
*/
function switch_item(current_item, next_item){
function switch_item(current_item, next_item) {
if (olms.lms_initialized == 0) {
// Fix error when flash is not loaded and SCO is not started BT#14944
olms.G_LastError = G_NotInitialized;
olms.G_LastErrorMessage = G_NotInitializedMessage;
logit_scorm('Error '+ G_NotInitialized + G_NotInitializedMessage, 0);
window.location.reload(false);
return false;
}

// backup these params
var orig_current_item = current_item;
var orig_next_item = next_item;
Expand Down

0 comments on commit da2d7f7

Please sign in to comment.