';
$introduction_section .= $form->return_form();
$introduction_section .= '
';
}
$thematic_description_html = '';
if ($tool == TOOL_COURSE_HOMEPAGE && !isset($_GET['intro_cmdEdit'])) {
// Only show this if we're on the course homepage and we're not currently editing
$thematic = new Thematic();
$displayMode = api_get_course_setting('display_info_advance_inside_homecourse');
$class1 = '';
if ($displayMode == '1') {
// Show only the current course progress step
// $information_title = get_lang('InfoAboutLastDoneAdvance');
$last_done_advance = $thematic->get_last_done_thematic_advance();
$thematic_advance_info = $thematic->get_thematic_advance_list($last_done_advance);
$subTitle1 = get_lang('CurrentTopic');
$class1 = ' current';
} else if($displayMode == '2') {
// Show only the two next course progress steps
// $information_title = get_lang('InfoAboutNextAdvanceNotDone');
$last_done_advance = $thematic->get_next_thematic_advance_not_done();
$next_advance_not_done = $thematic->get_next_thematic_advance_not_done(2);
$thematic_advance_info = $thematic->get_thematic_advance_list($last_done_advance);
$thematic_advance_info2 = $thematic->get_thematic_advance_list($next_advance_not_done);
$subTitle1 = $subTitle2 = get_lang('NextTopic');
} else if($displayMode == '3') {
// Show the current and next course progress steps
// $information_title = get_lang('InfoAboutLastDoneAdvanceAndNextAdvanceNotDone');
$last_done_advance = $thematic->get_last_done_thematic_advance();
$next_advance_not_done = $thematic->get_next_thematic_advance_not_done();
$thematic_advance_info = $thematic->get_thematic_advance_list($last_done_advance);
$thematic_advance_info2 = $thematic->get_thematic_advance_list($next_advance_not_done);
$subTitle1 = get_lang('CurrentTopic');
$subTitle2 = get_lang('NextTopic');
$class1 = ' current';
}
if (!empty($thematic_advance_info)) {
$thematic_advance = get_lang('CourseThematicAdvance');
$thematicScore = $thematic->get_total_average_of_thematic_advances() . '%';
$thematicUrl = api_get_path(WEB_CODE_PATH) .
'course_progress/index.php?action=thematic_details&'.api_get_cidreq();
$thematic_info = $thematic->get_thematic_list(
$thematic_advance_info['thematic_id']
);
$thematic_advance_info['start_date'] = api_get_local_time(
$thematic_advance_info['start_date']
);
$thematic_advance_info['start_date'] = api_format_date(
$thematic_advance_info['start_date'],
DATE_TIME_FORMAT_LONG
);
$userInfo = $_SESSION['_user'];
$courseInfo = api_get_course_info();
$thematic_description_html = '
';
if (!empty($thematic_advance_info)) {
$introduction_section .= '
';
$introduction_section .= $thematic_description_html;
$introduction_section .= '
';
}
$editIconButton = '';
if (api_is_allowed_to_edit() && empty($session_id)) {
$editIconButton = Display::url(
'
',
api_get_path(WEB_CODE_PATH).'course_info/tools.php?'.api_get_cidreq(),
['class' => 'btn btn-default', 'title' => get_lang('CustomizeIcons') ]
);
}
$toolbar = '';
$textIntro = '';
if ($intro_dispCommand) {
if (empty($intro_content)) {
// Displays "Add intro" commands
$toolbar = '
';
} else {
// Displays "edit intro && delete intro" commands
$toolbar .= '
';
if (!empty ($GLOBALS['_cid'])) {
$toolbar .=
'
';
$toolbar .= $editIconButton;
$toolbar .="
";
} else {
$toolbar .=
'
"';
$toolbar .= $editIconButton;
$toolbar .= "
";
}
$toolbar .= "
";
// Fix for chrome XSS filter for videos in iframes - BT#7930
$browser = api_get_navigator();
if (strpos($introduction_section, '