|
|
|
|
@ -124,7 +124,7 @@ $htmlHeadXtra[] = api_get_css_asset('qtip2/jquery.qtip.min.css'); |
|
|
|
|
$htmlHeadXtra[] = api_get_asset('qtip2/jquery.qtip.min.js'); |
|
|
|
|
$htmlHeadXtra[] = '<script type="text/javascript" src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.frameready.js"></script>'; |
|
|
|
|
$htmlHeadXtra[] = '<script> |
|
|
|
|
$(function() { |
|
|
|
|
$(function() { |
|
|
|
|
$("div#log_content_cleaner").bind("click", function() { |
|
|
|
|
$("div#log_content").empty(); |
|
|
|
|
}); |
|
|
|
|
@ -135,34 +135,34 @@ var chamilo_xajax_handler = window.oxajax; |
|
|
|
|
$allowLpItemTip = api_get_configuration_value('hide_accessibility_label_on_lp_item') === false; |
|
|
|
|
if ($allowLpItemTip) { |
|
|
|
|
$htmlHeadXtra[] = '<script> |
|
|
|
|
$(function() { |
|
|
|
|
$(function() { |
|
|
|
|
$(".scorm_item_normal").qtip({ |
|
|
|
|
content: { |
|
|
|
|
text: function(event, api) { |
|
|
|
|
var item = $(this); |
|
|
|
|
var item = $(this); |
|
|
|
|
var itemId = $(this).attr("id"); |
|
|
|
|
itemId = itemId.replace("toc_", ""); |
|
|
|
|
var textToShow = ""; |
|
|
|
|
$.ajax({ |
|
|
|
|
type: "GET", |
|
|
|
|
url: "'.$ajaxUrl.'&item_id="+ itemId, |
|
|
|
|
async: false |
|
|
|
|
url: "'.$ajaxUrl.'&item_id="+ itemId, |
|
|
|
|
async: false |
|
|
|
|
}) |
|
|
|
|
.then(function(content) { |
|
|
|
|
.then(function(content) { |
|
|
|
|
if (content == 1) { |
|
|
|
|
textToShow = "'.addslashes(get_lang('LPItemCanBeAccessed')).'"; |
|
|
|
|
api.set("style.classes", "qtip-green qtip-shadow"); |
|
|
|
|
api.set("style.classes", "qtip-green qtip-shadow"); |
|
|
|
|
} else { |
|
|
|
|
textToShow = content; |
|
|
|
|
textToShow = content; |
|
|
|
|
api.set("style.classes", "qtip-red qtip-shadow"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return textToShow; |
|
|
|
|
}); |
|
|
|
|
return textToShow; |
|
|
|
|
return textToShow; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
</script>'; |
|
|
|
|
} |
|
|
|
|
@ -212,11 +212,11 @@ if ($debug) { |
|
|
|
|
|
|
|
|
|
$get_toc_list = $lp->get_toc(); |
|
|
|
|
$get_teacher_buttons = $lp->get_teacher_toc_buttons(); |
|
|
|
|
$itemType = ''; |
|
|
|
|
|
|
|
|
|
$type_quiz = false; |
|
|
|
|
foreach ($get_toc_list as $toc) { |
|
|
|
|
if ($toc['id'] == $lp_item_id && $toc['type'] == 'quiz') { |
|
|
|
|
$type_quiz = true; |
|
|
|
|
if ($toc['id'] == $lp_item_id) { |
|
|
|
|
$itemType = $toc['type']; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -290,7 +290,6 @@ $autostart = 'true'; |
|
|
|
|
// Update status, total_time from lp_item_view table when you finish the exercises in learning path. |
|
|
|
|
|
|
|
|
|
if ($debug) { |
|
|
|
|
error_log('$type_quiz: '.$type_quiz); |
|
|
|
|
error_log('$_REQUEST[exeId]: '.intval($_REQUEST['exeId'])); |
|
|
|
|
error_log('$lp_id: '.$lp_id); |
|
|
|
|
error_log('$_GET[lp_item_id]: '.intval($_GET['lp_item_id'])); |
|
|
|
|
@ -630,7 +629,15 @@ $template->assign( |
|
|
|
|
) |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$frameReady = Display::getFrameReadyBlock('#content_id, #content_id_blank'); |
|
|
|
|
$frameReady = Display::getFrameReadyBlock( |
|
|
|
|
'#content_id, #content_id_blank', |
|
|
|
|
$itemType, |
|
|
|
|
'function () { |
|
|
|
|
var arr = ["link", "sco", "xapi"]; |
|
|
|
|
|
|
|
|
|
return $.inArray(olms.lms_item_type, arr) !== -1; |
|
|
|
|
}' |
|
|
|
|
); |
|
|
|
|
$template->assign('frame_ready', $frameReady); |
|
|
|
|
|
|
|
|
|
// Ofaj |
|
|
|
|
|