} if ($show_web_odf) { $execute_iframe = false; } $is_freemind_available = $pathinfo['extension'] == 'mm' && api_get_setting('enable_freemind') == 'true'; if ($is_freemind_available) { $execute_iframe = false; } $is_nanogong_available = $pathinfo['extension'] == 'wav' && preg_match('/_chnano_.wav/i', $file_url_web) && api_get_setting('enable_nanogong') == 'true'; if ($is_nanogong_available) { $execute_iframe = false; } if (!$jplayer_supported && $execute_iframe) { $htmlHeadXtra[] = '<script type="text/javascript"> <!-- var jQueryFrameReadyConfigPath = \'' . api_get_jquery_web_path() . '\'; --> </script>'; $htmlHeadXtra[] = '<script type="text/javascript" src="' . api_get_path(WEB_LIBRARY_PATH) . 'javascript/jquery.frameready.js"></script>'; $htmlHeadXtra[] = '<script> var updateContentHeight = function() { my_iframe = document.getElementById("mainFrame"); if (my_iframe) { //this doesnt seem to work in IE 7,8,9 new_height = my_iframe.contentWindow.document.body.scrollHeight; my_iframe.height = my_iframe.contentWindow.document.body.scrollHeight + "px"; } }; // Fixes the content height of the frame window.onload = function() {
} $template = \Chamilo\CoreBundle\Framework\Container::getTwig(); $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);
} $template = new Template('title', false, false, true, true, false); $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);