Exemple #1
0
$template->addGlobal('glossary_extra_tools', api_get_setting('glossary.show_glossary_in_extra_tools'));
$fixLinkSetting = api_get_configuration_value('lp_fix_embed_content');
$fixLink = '';
if ($fixLinkSetting) {
    $fixLink = '{type:"script", id:"_fr10", src:"' . api_get_path(WEB_LIBRARY_PATH) . 'javascript/fixlinks.js"}';
}
$template->addGlobal('fix_link', $fixLink);
$template->addGlobal('glossary_tool_availables', ['true', 'lp', 'exercise_and_lp']);
// If the global gamification mode is enabled...
$gamificationMode = api_get_setting('platform.gamification_mode');
// ...AND this learning path is set in gamification mode, then change the display
$gamificationMode = $gamificationMode && $learnPath->seriousgame_mode;
$template->addGlobal('show_glossary_in_documents', api_get_setting('document.show_glossary_in_documents'));
$template->addGlobal('jquery_web_path', api_get_jquery_web_path());
$template->addGlobal('jquery_ui_js_web_path', api_get_jquery_ui_js_web_path());
$template->addGlobal('jquery_ui_css_web_path', api_get_jquery_ui_css_web_path());
$template->addGlobal('is_allowed_to_edit', $is_allowed_to_edit);
$template->addGlobal('gamification_mode', $gamificationMode);
$template->addGlobal('breadcrumb', $breadcrumb);
$template->addGlobal('button_home_url', $buttonHomeUrl);
$template->addGlobal('button_home_text', $buttonHomeText);
$template->addGlobal('navigation_bar', $navigation_bar);
$template->addGlobal('progress_bar', $progress_bar);
$template->addGlobal('show_audio_player', $show_audioplayer);
$template->addGlobal('media_player', $mediaplayer);
$template->addGlobal('toc_list', $get_toc_list);
$template->addGlobal('teacher_toc_buttons', $get_teacher_buttons);
$template->addGlobal('iframe_src', $src);
$template->addGlobal('navigation_bar_bottom', $navigation_bar_bottom);
if ($gamificationMode == 1) {
    $template->addGlobal('gamification_stars', $learnPath->getCalculateStars($sessionId));
Exemple #2
0
$template->assign('glossary_extra_tools', api_get_setting('show_glossary_in_extra_tools'));
$fixLinkSetting = api_get_configuration_value('lp_fix_embed_content');
$fixLink = '';
if ($fixLinkSetting) {
    $fixLink = '{type:"script", id:"_fr10", src:"' . api_get_path(WEB_LIBRARY_PATH) . 'javascript/fixlinks.js"}';
}
$template->assign('fix_link', $fixLink);
$template->assign('glossary_tool_availables', ['true', 'lp', 'exercise_and_lp']);
// If the global gamification mode is enabled...
$gamificationMode = api_get_setting('gamification_mode');
// ...AND this learning path is set in gamification mode, then change the display
$gamificationMode = $gamificationMode && $_SESSION['oLP']->seriousgame_mode;
$template->assign('show_glossary_in_documents', api_get_setting('show_glossary_in_documents'));
$template->assign('jquery_web_path', api_get_jquery_web_path());
$template->assign('jquery_ui_js_web_path', api_get_jquery_ui_js_web_path());
$template->assign('jquery_ui_css_web_path', api_get_jquery_ui_css_web_path());
$template->assign('is_allowed_to_edit', $is_allowed_to_edit);
$template->assign('gamification_mode', $gamificationMode);
$template->assign('breadcrumb', $breadcrumb);
$template->assign('button_home_url', $buttonHomeUrl);
$template->assign('button_home_text', $buttonHomeText);
$template->assign('navigation_bar', $navigation_bar);
$template->assign('progress_bar', $progress_bar);
$template->assign('show_audio_player', $show_audioplayer);
$template->assign('media_player', $mediaplayer);
$template->assign('toc_list', $get_toc_list);
$template->assign('teacher_toc_buttons', $get_teacher_buttons);
$template->assign('iframe_src', $src);
$template->assign('navigation_bar_bottom', $navigation_bar_bottom);
if ($gamificationMode == 1) {
    $template->assign('gamification_stars', $_SESSION['oLP']->getCalculateStars($sessionId));