diff --git a/main/inc/introductionSection.inc.php b/main/inc/introductionSection.inc.php index 5432b5b181..3ddd9d1015 100755 --- a/main/inc/introductionSection.inc.php +++ b/main/inc/introductionSection.inc.php @@ -162,31 +162,42 @@ if ($intro_dispForm) { echo ''; } -$course_description = new CourseDescription(); -$course_description->set_session_id(api_get_session_id()); -$thematic_description = $course_description->get_data_by_description_type(8); +$style_introduction_section = ''; $thematic_description_html = ''; -if (!empty($thematic_description)) { - $thematic_advance = get_lang('ThematicAdvance').' '.$course_description->get_progress_porcent(false,8); - if (api_is_allowed_to_edit(null,true)) { - $thematic_advance = ''.get_lang('ThematicAdvance').' '.$course_description->get_progress_porcent(false,8).''; - } - $thematic_description_html = '
-
'.Display::return_icon('postit_top.png').'
-
-

'.$thematic_advance.'

- '.$thematic_description['description_title'].' -

'.$thematic_description['description_content'].'

-
-
'.Display::return_icon('postit_bottom.png').'
-
'; +if ($tool==TOOL_COURSE_HOMEPAGE && !isset($_GET['intro_cmdEdit'])) { + + $course_description = new CourseDescription(); + $course_description->set_session_id(api_get_session_id()); + $thematic_description = $course_description->get_data_by_description_type(8); + + if (!empty($thematic_description)) { + + $style_introduction_section = 'style="width:70%;float:left;margin-left:80px;"'; + + $thematic_advance = get_lang('ThematicAdvance').' '.$course_description->get_progress_porcent(false,8); + if (api_is_allowed_to_edit(null,true)) { + $thematic_advance = ''.get_lang('ThematicAdvance').' '.$course_description->get_progress_porcent(false,8).''; + } + + $thematic_description_html = '
+ +
+

'.$thematic_advance.'

+ '.$thematic_description['description_title'].' +

'.$thematic_description['description_content'].'

+
+
'.Display::return_icon('postit_bottom.png').'
+
'; + + } } +echo '
'; if ($intro_dispDefault) { //$intro_content = make_clickable($intro_content); // make url in text clickable $intro_content = text_filter($intro_content); // parse [tex] codes if (!empty($intro_content) || !empty($thematic_description_html)) { - echo "$thematic_description_html
$intro_content
"; + echo "
$intro_content
"; } } @@ -219,4 +230,10 @@ if ($intro_dispCommand) { } } +echo '
'; + +echo $thematic_description_html; + +echo '
'; + ?> diff --git a/user_portal.php b/user_portal.php index 842ca64bac..f50a69daaf 100644 --- a/user_portal.php +++ b/user_portal.php @@ -268,6 +268,7 @@ function get_personal_course_list($user_id) { function display_special_courses ($user_id) { $user_id = intval($user_id); + $user_info = api_get_user_info($user_id); $special_course_list = array(); $tbl_course = Database::get_main_table(TABLE_MAIN_COURSE); @@ -326,7 +327,7 @@ function display_special_courses ($user_id) { if (($course['status'] == 5 && !api_is_coach()) || empty($course['status'])) { $status_icon=Display::return_icon('course.gif', get_lang('Course')).' '.Display::return_icon('students.gif', get_lang('Status').': '.get_lang('Student'),array('style'=>'width:11px; height:11px')); } - $progress_thematic_icon = get_thematic_progress_icon($course['db_name']); + $progress_thematic_icon = ''.get_thematic_progress_icon($course['db_name']).''; echo "\t\n"; echo "\t\t\n"; @@ -462,7 +463,7 @@ function display_courses_in_category($user_category_id) { if (($course['status'] == STUDENT && !api_is_coach()) || empty($course['status'])) { $status_icon=Display::return_icon('course.gif', get_lang('Course')).' '.Display::return_icon('students.gif', get_lang('Status').': '.get_lang('Student'),array('style'=>'width:11px; height:11px')); } - $progress_thematic_icon = get_thematic_progress_icon($course['db_name']); + $progress_thematic_icon = ''.get_thematic_progress_icon($course['db_name']).''; echo "\t\n"; echo "\t\t\n"; @@ -543,8 +544,8 @@ function display_courses_in_category($user_category_id) { $progress = $row['progress']; $image = 'level_'.$progress.'.png'; $title = $row['progress'].'%'; - } - $img = Display::return_icon($image,get_lang('ThematicAdvance'),array('style'=>'vertical-align:middle')).' '.$title; + $img = Display::return_icon($image,get_lang('ThematicAdvance'),array('style'=>'vertical-align:middle')).' '.$title.''; + } return $img; } @@ -784,7 +785,7 @@ function get_logged_user_course_html($course, $session_id = 0, $class='courses') } else { $result .= $course_display_title." "." ".get_lang('CourseClosed').""; } - $progress_thematic_icon = get_thematic_progress_icon($course_database,$session_id); + $progress_thematic_icon = ''.get_thematic_progress_icon($course_database, $session_id).''; $result .= '  '.$progress_thematic_icon.''; // show the course_code and teacher if chosen to display this if (api_get_setting('display_coursecode_in_courselist') == 'true' || api_get_setting('display_teacher_in_courselist') == 'true') {