|
|
@ -32,6 +32,7 @@ $show_learnpath = true; |
|
|
|
api_protect_course_script(); |
|
|
|
api_protect_course_script(); |
|
|
|
|
|
|
|
|
|
|
|
$lp_id = intval($_GET['lp_id']); |
|
|
|
$lp_id = intval($_GET['lp_id']); |
|
|
|
|
|
|
|
$sessionId = api_get_session_id(); |
|
|
|
|
|
|
|
|
|
|
|
// Check if the learning path is visible for student - (LP requisites) |
|
|
|
// Check if the learning path is visible for student - (LP requisites) |
|
|
|
|
|
|
|
|
|
|
@ -51,7 +52,7 @@ $visibility = api_get_item_visibility( |
|
|
|
$lp_id, |
|
|
|
$lp_id, |
|
|
|
$action, |
|
|
|
$action, |
|
|
|
api_get_user_id(), |
|
|
|
api_get_user_id(), |
|
|
|
api_get_session_id() |
|
|
|
$sessionId |
|
|
|
); |
|
|
|
); |
|
|
|
if (!api_is_allowed_to_edit(false, true, false, false) && intval($visibility) == 0) { |
|
|
|
if (!api_is_allowed_to_edit(false, true, false, false) && intval($visibility) == 0) { |
|
|
|
api_not_allowed(true); |
|
|
|
api_not_allowed(true); |
|
|
@ -390,6 +391,12 @@ if (api_get_course_setting('lp_return_link') == 1) { |
|
|
|
$buttonHomeText = get_lang('LearningPathList'); |
|
|
|
$buttonHomeText = get_lang('LearningPathList'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$lpPreviewImagePath = 'unknown_250_100.jpg'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($_SESSION['oLP']->get_preview_image()) { |
|
|
|
|
|
|
|
$lpPreviewImagePath = $_SESSION['oLP']->get_preview_image_path(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$template = new Template('title', false, false, true, true, false); |
|
|
|
$template = new Template('title', false, false, true, true, false); |
|
|
|
$template->assign('glossary_extra_tools', api_get_setting('show_glossary_in_extra_tools')); |
|
|
|
$template->assign('glossary_extra_tools', api_get_setting('show_glossary_in_extra_tools')); |
|
|
|
$template->assign( |
|
|
|
$template->assign( |
|
|
@ -409,12 +416,33 @@ $template->assign('button_home_url', $buttonHomeUrl); |
|
|
|
$template->assign('button_home_text', $buttonHomeText); |
|
|
|
$template->assign('button_home_text', $buttonHomeText); |
|
|
|
$template->assign('navigation_bar', $navigation_bar); |
|
|
|
$template->assign('navigation_bar', $navigation_bar); |
|
|
|
$template->assign('progress_bar', $progress_bar); |
|
|
|
$template->assign('progress_bar', $progress_bar); |
|
|
|
$template->assign('oLP', $_SESSION['oLP']); |
|
|
|
|
|
|
|
$template->assign('show_audio_player', $show_audioplayer); |
|
|
|
$template->assign('show_audio_player', $show_audioplayer); |
|
|
|
$template->assign('media_player', $mediaplayer); |
|
|
|
$template->assign('media_player', $mediaplayer); |
|
|
|
$template->assign('toc_list', $get_toc_list); |
|
|
|
$template->assign('toc_list', $get_toc_list); |
|
|
|
$template->assign('iframe_src', $src); |
|
|
|
$template->assign('iframe_src', $src); |
|
|
|
$template->assign('navigation_bar_bottom', $navigation_bar_bottom); |
|
|
|
$template->assign('navigation_bar_bottom', $navigation_bar_bottom); |
|
|
|
|
|
|
|
$template->assign( |
|
|
|
|
|
|
|
'gamification_stars', |
|
|
|
|
|
|
|
$_SESSION['oLP']->getCalculateStars($sessionId) |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
$template->assign( |
|
|
|
|
|
|
|
'gamification_points', |
|
|
|
|
|
|
|
$_SESSION['oLP']->getCalculateScore($sessionId) |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
$template->assign( |
|
|
|
|
|
|
|
'lp_preview_image', |
|
|
|
|
|
|
|
Display::return_icon( |
|
|
|
|
|
|
|
$lpPreviewImagePath, |
|
|
|
|
|
|
|
null, |
|
|
|
|
|
|
|
['height' => 96, 'width' => 104] |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
$template->assign('lp_author', $_SESSION['oLP']->get_author()); |
|
|
|
|
|
|
|
$template->assign('lp_mode', $_SESSION['oLP']->mode); |
|
|
|
|
|
|
|
$template->assign( |
|
|
|
|
|
|
|
'lp_html_toc', |
|
|
|
|
|
|
|
$_SESSION['oLP']->get_html_toc($get_toc_list) |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
$content = $template->fetch('default/learnpath/view.tpl'); |
|
|
|
$content = $template->fetch('default/learnpath/view.tpl'); |
|
|
|
|
|
|
|
|
|
|
|