Learnpath : enabling all item type to be followed even if in a scorm LP -refs BT#20309

pull/4448/head
Nicolas Ducoulombier 3 years ago
parent 2220dc5748
commit 8fbc9c53c0
  1. 12
      main/lp/scorm_api.php

@ -261,7 +261,7 @@ $(function() {
}); });
// This code was moved inside LMSInitialize() // This code was moved inside LMSInitialize()
if (olms.lms_lp_type == 1 || olms.lms_item_type == 'asset' || olms.lms_item_type == 'document' || olms.lms_item_type == 'link') { if (olms.lms_item_type != 'sco') {
xajax_start_timer(); xajax_start_timer();
} }
@ -349,7 +349,7 @@ function LMSInitialize() {
$("#tab-iframe").addClass("tab-content iframe_"+olms.lms_item_type); $("#tab-iframe").addClass("tab-content iframe_"+olms.lms_item_type);
} }
if (olms.lms_lp_type == 1 || olms.lms_item_type == 'asset' || olms.lms_item_type == 'document' || olms.lms_item_type == 'link') { if (olms.lms_item_type != 'sco') {
xajax_start_timer(); xajax_start_timer();
} }
@ -1148,7 +1148,7 @@ function addListeners(){
return; return;
} }
//assign event handlers to objects //assign event handlers to objects
if (olms.lms_lp_type==1 || olms.lms_item_type=='asset' || olms.lms_item_type == 'document' || olms.lms_item_type == 'link') { if (olms.lms_item_type != 'sco') {
logit_lms('Chamilo LP or asset'); logit_lms('Chamilo LP or asset');
//if this path is a Chamilo learnpath, then start manual save //if this path is a Chamilo learnpath, then start manual save
//when something is loaded in there //when something is loaded in there
@ -1212,7 +1212,7 @@ function lms_save_asset() {
olms.execute_stats = true; olms.execute_stats = true;
} }
if (olms.lms_lp_type == 1 || olms.lms_item_type == 'asset' || olms.lms_item_type == 'document' || olms.lms_item_type == 'link') { if (olms.lms_item_type != 'sco') {
logit_lms('lms_save_asset'); logit_lms('lms_save_asset');
logit_lms('execute_stats :'+ olms.execute_stats); logit_lms('execute_stats :'+ olms.execute_stats);
xajax_save_item( xajax_save_item(
@ -1724,7 +1724,7 @@ function switch_item(current_item, next_item)
<?php <?php
} ?> } ?>
if (olms.lms_lp_type==1 || olms.lms_item_type == 'asset' || olms.lms_item_type == 'document' || olms.lms_item_type == 'link') { if (olms.lms_item_type != 'sco') {
xajax_start_timer(); xajax_start_timer();
} }
@ -1907,7 +1907,7 @@ function xajax_save_item(
params += '&userNavigatesAway='+userNavigatesAway; params += '&userNavigatesAway='+userNavigatesAway;
params += '&statusSignalReceived='+statusSignalReceived; params += '&statusSignalReceived='+statusSignalReceived;
if (olms.lms_lp_type == 1 || item_type == 'document' || item_type == 'link' || item_type == 'asset') { if (item_type != 'sco') {
logit_lms('xajax_save_item with params:' + params, 3); logit_lms('xajax_save_item with params:' + params, 3);
return $.ajax({ return $.ajax({
type:"POST", type:"POST",

Loading…
Cancel
Save