More fixes in the layout

skala
Julio Montoya 14 years ago
parent ba4662bf3d
commit 50796fe949
  1. 20
      main/css/base.css
  2. 11
      main/css/base_chamilo.css
  3. 2
      main/css/chamilo/default.css
  4. 32
      main/inc/lib/course.lib.php
  5. 7
      main/inc/lib/userportal.lib.php
  6. 3
      main/template/default/layout/layout_1_col.tpl
  7. 21
      main/template/default/layout/layout_2_col.tpl
  8. 6
      user_portal.php

@ -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 */

@ -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;

@ -24,7 +24,7 @@ a:active {
}
#header1 {
background-image:url(images/bg-header1.gif);
/* background-image:url(images/bg-header1.gif); */
}
.subnav-fixed {

@ -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 '</ul>';
echo '</div>';
}
}
}
/**
* 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 '<div class="row">';
// 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 '<div class="userportal-course-item">';
echo '<div class="userportal-course-item span8">';
if (api_is_platform_admin()) {
echo '<div style="float:right;">';
@ -2928,8 +2927,7 @@ class CourseManager {
echo '<a id="document_preview_'.$course['id'].'_0" class="document_preview" href="javascript:void(0);">'.Display::return_icon('folder.png', get_lang('Documents'), array('align' => 'absmiddle'),ICON_SIZE_SMALL).'</a>';
echo Display::div('', array('id' => 'document_result_'.$course['id'].'_0', 'class'=>'document_preview_container'));
}
echo '</div>';
echo '</div>';
}
// Function logic - act on the data (check if the course is virtual, if yes change the link).
@ -2987,7 +2985,9 @@ class CourseManager {
echo '</div>';
$key++;
}
echo '</div>';
}
/**
* Retrieves the user defined course categories
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University

@ -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'];

@ -19,9 +19,10 @@
{* Notifications*}
{$message}
<section id="main_content">
{* Main content *}
{$content}
</section>
{/block}
{* Footer *}

@ -12,35 +12,44 @@
{include file="default/layout/sniff.tpl"}
{/if}
<div id="maincontent" class="maincontent">
<div id="maincontent" class="span9">
{* Course plugin block*}
{* Course plugin block*}
<section id="courses_plugin">
{$plugin_courses_block}
</section>
{* ?? *}
<section id="home_page">
{$home_page_block}
</section>
{* ?? *}
{$sniff_notification}
{* Show messages*}
<section id="messages">
{$message}
</section>
{* Main content*}
<section id="main_content">
{$content}
</section>
{* Announcements *}
<section id="announcements_page">
{$announcements_block}
</section>
{* Hot courses template *}
<section id="hot_courses">
{include file="default/layout/hot_courses.tpl"}
</section>
</div>
{* Right column *}
<div id="menu-wrapper">
<div id="menu-wrapper" class="span3">
{*if user is not login show the login form*}
{if $_u.logged == 0}

@ -12,7 +12,6 @@
* @package chamilo.main
* @todo Shouldn't the SCRIPTVAL_ and CONFVAL_ constant be moved to the config page? Has anybody any idea what the are used for?
* If these are really configuration settings then we can add those to the dokeos config settings.
* @todo move display_courses and some other functions to a more appripriate place course.lib.php or user.lib.php
* @todo check for duplication of functions with index.php (user_portal.php is orginally a copy of index.php)
* @todo display_digest, shouldn't this be removed and be made into an extension?
*/
@ -214,7 +213,7 @@ $controller->return_courses_and_sessions($personal_course_list);
$courses_and_sessions = ob_get_contents();
ob_get_clean();
$controller->tpl->assign('content', $courses_and_sessions);
$controller->tpl->assign('content', $courses_and_sessions);
if($_SESSION['sniff_navigator']!="checked") {
$controller->tpl->assign('show_sniff', 1);
@ -235,7 +234,6 @@ if(!empty($some_activex) || !empty($some_plugins)){
$controller->tpl->assign('sniff_notification', $sniff_notification);
}
}
//$controller->tpl->assign('hot_courses', $controller->return_hot_courses());
$controller->tpl->assign('plugin_courses_block', $controller->return_courses_main_plugin());
$controller->tpl->assign('profile_block', $controller->return_profile_block());
@ -249,8 +247,6 @@ $controller->tpl->assign('classes_block', $controller->return_classes_block(
//if (api_is_platform_admin() || api_is_drh()) {
$controller->tpl->assign('skills_block', $controller->return_skills_links());
//}
$controller->tpl->display_two_col_template();
// Deleting the session_id.

Loading…
Cancel
Save