diff --git a/main/inc/lib/introductionSection.inc.php b/main/inc/lib/introductionSection.inc.php index 5f4da9d684..d324460134 100644 --- a/main/inc/lib/introductionSection.inc.php +++ b/main/inc/lib/introductionSection.inc.php @@ -36,7 +36,9 @@ $intro_cmdUpdate = isset($_POST['intro_cmdUpdate']); $intro_cmdDel = empty($_GET['intro_cmdDel']) ? '' : $_GET['intro_cmdDel']; $intro_cmdAdd = empty($_GET['intro_cmdAdd']) ? '' : $_GET['intro_cmdAdd']; -if (!empty ($GLOBALS['_cid'])) { +$courseCode = api_get_course_id(); + +if (!empty($courseCode)) { $form = new FormValidator('introduction_text', 'post', api_get_self().'?'.api_get_cidreq()); } else { $form = new FormValidator('introduction_text'); @@ -157,6 +159,7 @@ $thematic_description_html = ''; if ($tool == TOOL_COURSE_HOMEPAGE && !isset($_GET['intro_cmdEdit'])) { $thematic = new Thematic(); + $thematic->set_course_int_id(api_get_course_int_id()); if (api_get_course_setting('display_info_advance_inside_homecourse') == '1') { $information_title = get_lang('InfoAboutLastDoneAdvance'); $last_done_advance = $thematic->get_last_done_thematic_advance(); @@ -228,7 +231,7 @@ if ($intro_dispCommand) { if (empty($intro_content)) { // Displays "Add intro" commands $introduction_section .= '