|
|
|
@ -212,11 +212,11 @@ if ($debug) { |
|
|
|
|
|
|
|
|
|
|
|
$get_toc_list = $lp->get_toc(); |
|
|
|
$get_toc_list = $lp->get_toc(); |
|
|
|
$get_teacher_buttons = $lp->get_teacher_toc_buttons(); |
|
|
|
$get_teacher_buttons = $lp->get_teacher_toc_buttons(); |
|
|
|
|
|
|
|
$itemType = ''; |
|
|
|
|
|
|
|
|
|
|
|
$type_quiz = false; |
|
|
|
|
|
|
|
foreach ($get_toc_list as $toc) { |
|
|
|
foreach ($get_toc_list as $toc) { |
|
|
|
if ($toc['id'] == $lp_item_id && $toc['type'] == 'quiz') { |
|
|
|
if ($toc['id'] == $lp_item_id) { |
|
|
|
$type_quiz = true; |
|
|
|
$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. |
|
|
|
// Update status, total_time from lp_item_view table when you finish the exercises in learning path. |
|
|
|
|
|
|
|
|
|
|
|
if ($debug) { |
|
|
|
if ($debug) { |
|
|
|
error_log('$type_quiz: '.$type_quiz); |
|
|
|
|
|
|
|
error_log('$_REQUEST[exeId]: '.intval($_REQUEST['exeId'])); |
|
|
|
error_log('$_REQUEST[exeId]: '.intval($_REQUEST['exeId'])); |
|
|
|
error_log('$lp_id: '.$lp_id); |
|
|
|
error_log('$lp_id: '.$lp_id); |
|
|
|
error_log('$_GET[lp_item_id]: '.intval($_GET['lp_item_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); |
|
|
|
$template->assign('frame_ready', $frameReady); |
|
|
|
|
|
|
|
|
|
|
|
// Ofaj |
|
|
|
// Ofaj |
|
|
|
|