diff --git a/main/css/base.css b/main/css/base.css index 52ec7d46fe..d710ab3dea 100644 --- a/main/css/base.css +++ b/main/css/base.css @@ -361,20 +361,14 @@ p, blockquote, ol, ul { border-radius: 10px; background-color:#F9F9F9; padding:5px 10px 5px 10px; - height:40px; - margin:5px; - padding:15px; + margin:0px 0px 10px 0px; + } .session_box_title { margin-bottom: 7px; } - -.userportal-course-item-title { - font-size:135%; -} - .session_course_item .item_closed, .userportal-course-item-title .item_closed { font-size:80%; } @@ -1134,14 +1128,13 @@ button.next.disabled, .a_button.disabled { .bread li { color: #777777; float: left; - line-height: 25px; -/*line-height: 20px; might show better in IE7 & 8 */ + } .bread span { display: block; font-size:11px; - padding: 0px 15px 0 9px; + padding: 4px 15px 0 9px; } .bread a { @@ -1167,9 +1160,8 @@ button.next.disabled, .a_button.disabled { } .bread .home { - padding:5px 15px 4px 8px; - height: 17px; -/* padding:0px 15px 4px 8px; might show better in IE7 & 8 */ + padding:0px 15px 4px 8px; + height: 22px; } /* Warning and error messages to the user */ diff --git a/main/css/base_chamilo.css b/main/css/base_chamilo.css index c83a332bbb..7cef4025fb 100755 --- a/main/css/base_chamilo.css +++ b/main/css/base_chamilo.css @@ -193,17 +193,6 @@ ul#navigation .student-connect a { padding: 6px 0 8px 6px; } -/* for content section in main index.php file modified: to fit img and blocks in home page */ -.maincontent { - width: 60%; - float: left; - padding: 0 20px 0 20px; - /* padding: 0px;*/ - min-height: 333px; - margin-top:8px; - margin-bottom:30px; -} - #center { margin: 0 190px 0 0; padding: 10px 0 40px 0; diff --git a/main/css/chamilo/default.css b/main/css/chamilo/default.css index 2c53dec4c3..501c2510e4 100644 --- a/main/css/chamilo/default.css +++ b/main/css/chamilo/default.css @@ -24,7 +24,7 @@ a:active { } #header1 { - background-image:url(images/bg-header1.gif); + /* background-image:url(images/bg-header1.gif); */ } .subnav-fixed { diff --git a/main/inc/lib/course.lib.php b/main/inc/lib/course.lib.php index 72b9a9f1c0..38da3dc992 100644 --- a/main/inc/lib/course.lib.php +++ b/main/inc/lib/course.lib.php @@ -2805,6 +2805,7 @@ class CourseManager { } } } + /** * Display courses (without special courses) as several HTML divs * of course categories, as class userportal-catalog-item. @@ -2814,20 +2815,17 @@ class CourseManager { * @return void */ function display_courses($user_id, $load_dirs = false) { - - global $_user, $_configuration; - - // Building an array that contains all the id's of the user defined course categories. - // Initially this was inside the display_courses_in_category function but when we do it here we have fewer - // sql executions = performance increase. - $all_user_categories = self :: get_user_course_categories(); + $user_id = intval($user_id); + if (empty($user_id)) { + $user_id = api_get_user_id(); + } // Step 0: We display the course without a user category. self :: display_courses_in_category(0, $load_dirs); // Step 1: We get all the categories of the user. $tucc = Database::get_user_personal_table(TABLE_USER_COURSE_CATEGORY); - $sql = "SELECT id, title FROM $tucc WHERE user_id='".$_user['user_id']."' ORDER BY sort ASC"; + $sql = "SELECT id, title FROM $tucc WHERE user_id='".$user_id."' ORDER BY sort ASC"; $result = Database::query($sql); while ($row = Database::fetch_array($result)) { // We simply display the title of the category. @@ -2844,7 +2842,7 @@ class CourseManager { echo ''; echo ''; } - } + } /** * Display courses inside a category (without special courses) as HTML dics of * class userportal-course-item. @@ -2852,14 +2850,13 @@ class CourseManager { * @param bool Whether to show the document quick-loader or not * @return void */ - function display_courses_in_category($user_category_id, $load_dirs = false) { - + function display_courses_in_category($user_category_id, $load_dirs = false) { global $_user; // Table definitions $TABLECOURS = Database :: get_main_table(TABLE_MAIN_COURSE); $TABLECOURSUSER = Database :: get_main_table(TABLE_MAIN_COURSE_USER); $TABLE_ACCESS_URL_REL_COURSE = Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE); - $TABLE_USER_COURSE_CATEGORY = Database :: get_user_personal_table(TABLE_USER_COURSE_CATEGORY); + //$TABLE_USER_COURSE_CATEGORY = Database :: get_user_personal_table(TABLE_USER_COURSE_CATEGORY); $current_url_id = api_get_current_access_url_id(); // Get course list auto-register @@ -2887,10 +2884,12 @@ class CourseManager { // Use user's classification for courses (if any). $sql_select_courses .= " ORDER BY course_rel_user.user_course_cat, course_rel_user.sort ASC"; $result = Database::query($sql_select_courses); - $number_of_courses = Database::num_rows($result); + //$number_of_courses = Database::num_rows($result); $key = 0; $status_icon = ''; + echo '
'; + // Browse through all courses. while ($course = Database::fetch_array($result)) { // Get notifications. @@ -2905,7 +2904,7 @@ class CourseManager { // New code displaying the user's status in respect to this course. $status_icon = Display::return_icon('blackboard.png', get_lang('Course'), array('width' => '48px')); - echo '
'; + echo '
'; if (api_is_platform_admin()) { echo '
'; @@ -2928,8 +2927,7 @@ class CourseManager { echo ''.Display::return_icon('folder.png', get_lang('Documents'), array('align' => 'absmiddle'),ICON_SIZE_SMALL).''; echo Display::div('', array('id' => 'document_result_'.$course['id'].'_0', 'class'=>'document_preview_container')); } - echo '
'; - + echo '
'; } // Function logic - act on the data (check if the course is virtual, if yes change the link). @@ -2987,7 +2985,9 @@ class CourseManager { echo '
'; $key++; } + echo '
'; } + /** * Retrieves the user defined course categories * @author Patrick Cool , Ghent University diff --git a/main/inc/lib/userportal.lib.php b/main/inc/lib/userportal.lib.php index 39d67fb1c3..cd9d15be52 100644 --- a/main/inc/lib/userportal.lib.php +++ b/main/inc/lib/userportal.lib.php @@ -1083,13 +1083,12 @@ class IndexManager { } $list = ''; - foreach ($personal_course_list as $my_course) { - - $thisCourseDbName = $my_course['db']; + foreach ($personal_course_list as $my_course) { + //$thisCourseDbName = $my_course['db']; $thisCourseSysCode = $my_course['k']; $thisCoursePublicCode = $my_course['c']; $thisCoursePath = $my_course['d']; - $sys_course_path = api_get_path(SYS_COURSE_PATH); + //$sys_course_path = api_get_path(SYS_COURSE_PATH); $dbname = $my_course['k']; $status = array(); $status[$dbname] = $my_course['s']; diff --git a/main/template/default/layout/layout_1_col.tpl b/main/template/default/layout/layout_1_col.tpl index c793258d5c..47153c5b8b 100644 --- a/main/template/default/layout/layout_1_col.tpl +++ b/main/template/default/layout/layout_1_col.tpl @@ -19,9 +19,10 @@ {* Notifications*} {$message} - +
{* Main content *} {$content} +
{/block} {* Footer *} diff --git a/main/template/default/layout/layout_2_col.tpl b/main/template/default/layout/layout_2_col.tpl index c84c4c3858..4ab55da592 100644 --- a/main/template/default/layout/layout_2_col.tpl +++ b/main/template/default/layout/layout_2_col.tpl @@ -12,35 +12,44 @@ {include file="default/layout/sniff.tpl"} {/if} -
+
- {* Course plugin block*} + {* Course plugin block*} +
{$plugin_courses_block} +
{* ?? *} +
{$home_page_block} +
{* ?? *} {$sniff_notification} {* Show messages*} +
{$message} +
{* Main content*} +
{$content} +
{* Announcements *} +
{$announcements_block} +
{* Hot courses template *} - +
{include file="default/layout/hot_courses.tpl"} - - +
{* Right column *} -