Juan Carlos Raña 13 سال پیش
والد
کامیت
a16b6d8f6c
100فایلهای تغییر یافته به همراه1617 افزوده شده و 1899 حذف شده
  1. BIN
      apple-touch-icon-114x114-precomposed.png
  2. BIN
      apple-touch-icon-57x57-precomposed.png
  3. BIN
      apple-touch-icon-72x72-precomposed.png
  4. BIN
      apple-touch-icon-precomposed.png
  5. BIN
      apple-touch-icon.png
  6. 5 0
      documentation/changelog.html
  7. 0 13
      index.php
  8. 1 1
      main/admin/access_url_edit_courses_to_url.php
  9. 1 1
      main/admin/access_url_edit_users_to_url.php
  10. 2 2
      main/admin/access_urls.php
  11. 1 1
      main/admin/career_dashboard.php
  12. 1 1
      main/admin/careers.php
  13. 2 1
      main/admin/course_edit.php
  14. 1 1
      main/admin/course_list.php
  15. 0 28
      main/admin/course_user_list.php
  16. 21 14
      main/admin/index.php
  17. 1 1
      main/admin/promotions.php
  18. 1 1
      main/admin/session_list.php
  19. 456 113
      main/admin/settings.lib.php
  20. 40 371
      main/admin/settings.php
  21. 1 1
      main/admin/skills.php
  22. 1 1
      main/admin/skills_gradebook.php
  23. 0 1
      main/admin/skills_profile.php
  24. 1 1
      main/admin/specific_fields.php
  25. 1 1
      main/admin/specific_fields_add.php
  26. 97 119
      main/admin/user_list.php
  27. 1 3
      main/admin/usergroups.php
  28. 1 3
      main/auth/courses.php
  29. 4 20
      main/auth/inscription.php
  30. 2 2
      main/auth/lostPassword.php
  31. 46 3
      main/auth/my_progress.php
  32. 7 10
      main/auth/profile.php
  33. 0 1
      main/calendar/agenda.php
  34. 0 4
      main/calendar/myagenda.php
  35. 20 19
      main/course_home/activity.php
  36. 2 1
      main/course_home/course_home.php
  37. 0 2
      main/course_info/infocours.php
  38. 0 3
      main/course_progress/index.php
  39. 3 3
      main/create_course/add_course.php
  40. 4 109
      main/css/academica/default.css
  41. BIN
      main/css/academica/images/bg.jpg
  42. 6 119
      main/css/baby_orange/default.css
  43. BIN
      main/css/baby_orange/images/bg.jpg
  44. 338 48
      main/css/base.css
  45. 5 196
      main/css/base_chamilo.css
  46. BIN
      main/css/biggerdot.png
  47. 5 47
      main/css/blue_lagoon/default.css
  48. 44 30
      main/css/bootstrap-responsive.css
  49. 6 26
      main/css/chamilo/default.css
  50. 3 12
      main/css/chamilo_electric_blue/default.css
  51. 3 12
      main/css/chamilo_green/default.css
  52. 3 12
      main/css/chamilo_orange/default.css
  53. 3 12
      main/css/chamilo_red/default.css
  54. 2 8
      main/css/chamilo_sport_red/default.css
  55. 1 28
      main/css/corporate/default.css
  56. 5 40
      main/css/cosmic_campus/default.css
  57. BIN
      main/css/dot.gif
  58. 197 66
      main/css/pre_base.css
  59. 106 85
      main/css/responsive.css
  60. 4 78
      main/css/silver_line/default.css
  61. BIN
      main/css/silver_line/images/bg.jpg
  62. 3 26
      main/document/document.inc.php
  63. 2 4
      main/document/document.php
  64. 1 5
      main/document/document_lite.php
  65. 4 0
      main/document/downloadfolder.inc.php
  66. 0 4
      main/exercice/admin.php
  67. 4 4
      main/exercice/exercice.php
  68. 14 12
      main/exercice/exercise.class.php
  69. 7 4
      main/exercice/exercise.lib.php
  70. 1 1
      main/exercice/exercise_report.php
  71. 0 2
      main/exercice/exercise_submit.php
  72. 2 1
      main/exercice/exercise_submit_modal.php
  73. 1 1
      main/exercice/live_stats.php
  74. 1 1
      main/exercice/matching.class.php
  75. 1 1
      main/exercice/multiple_answer.class.php
  76. 41 24
      main/exercice/overview.php
  77. 23 45
      main/exercice/question.class.php
  78. 1 1
      main/exercice/question_list_admin.inc.php
  79. 2 1
      main/exercice/tests_category.php
  80. 1 1
      main/exercice/unique_answer.class.php
  81. 2 2
      main/exercice/unique_answer_no_option.class.php
  82. 1 1
      main/forum/editpost.php
  83. 6 5
      main/forum/forumfunction.inc.php
  84. 1 1
      main/forum/forumqualify.php
  85. 1 1
      main/forum/forumsearch.php
  86. 14 41
      main/forum/index.php
  87. 3 1
      main/forum/newthread.php
  88. 1 4
      main/forum/reply.php
  89. 3 4
      main/forum/viewforum.php
  90. 2 2
      main/forum/viewforumcategory.php
  91. 1 1
      main/forum/viewpost.php
  92. 1 1
      main/forum/viewthread.php
  93. 2 2
      main/gradebook/gradebook_edit_result.php
  94. 3 3
      main/gradebook/gradebook_view_result.php
  95. 2 3
      main/gradebook/lib/be/evaluation.class.php
  96. 3 4
      main/gradebook/lib/be/result.class.php
  97. 4 8
      main/gradebook/lib/fe/evalform.class.php
  98. 2 0
      main/gradebook/lib/fe/resulttable.class.php
  99. 1 2
      main/gradebook/lib/scoredisplay.class.php
  100. BIN
      main/img/icons/22/all_directions.png

BIN
apple-touch-icon-114x114-precomposed.png


BIN
apple-touch-icon-57x57-precomposed.png


BIN
apple-touch-icon-72x72-precomposed.png


BIN
apple-touch-icon-precomposed.png


BIN
apple-touch-icon.png


+ 5 - 0
documentation/changelog.html

@@ -153,6 +153,11 @@ This version of Chamilo only includes new features:
     <li>Fullcalendar js library version 1.5.2</li>    
 </ul>
 
+<h3>Removals</h3>
+<ul>
+  <li>Removed deprecated "search" plugin (used to work with MnoGoSearch but hasn't been used for years to our knowledge - was successfully replaced by Xapian)</li>
+</ul>
+
 <h1>Chamilo 1.8.8.4 - La Molina, August 2011</h1>
 
 <h3>Release notes - summary</h3>

+ 0 - 13
index.php

@@ -25,7 +25,6 @@ if (!api_is_anonymous()) {
 	$header_title = " ";
 }
 
-$htmlHeadXtra[] = api_get_jquery_ui_js();
 $htmlHeadXtra[] = api_get_jquery_libraries_js(array('bxslider'));
 $htmlHeadXtra[] ='
 <script type="text/javascript">
@@ -123,17 +122,6 @@ if (!empty($_POST['submitAuth'])) {
 	event_open();
 }
 
-
-
-//@todo add this in the template
-// Plugins for loginpage_main AND campushomepage_main.
-if (!api_get_user_id()) {
-	api_plugin('loginpage_main');
-} else {
-	api_plugin('campushomepage_main');
-}
-
-
 //@todo add this in the template
 if (api_get_setting('display_categories_on_homepage') == 'true') {
 	echo '<div class="home_cats">';
@@ -158,7 +146,6 @@ $controller->tpl->assign('hot_courses',             $controller->return_hot_cour
 $controller->tpl->assign('announcements_block', 	$controller->return_announcements());
 $controller->tpl->assign('home_page_block', 		$controller->return_home_page());
 $controller->tpl->assign('notice_block',			$controller->return_notice());
-$controller->tpl->assign('plugin_campushomepage', 	$controller->return_plugin_campushomepage());
 
 if (api_is_platform_admin() || api_is_drh()) {
     $controller->tpl->assign('skills_block',            $controller->return_skills_links());

+ 1 - 1
main/admin/access_url_edit_courses_to_url.php

@@ -114,7 +114,7 @@ if($_POST['form_sent']) {
 Display::display_header($tool_name);
 
 echo '<div class="actions">';
-echo Display::url( Display::return_icon('view_more_stats.gif',get_lang('AddUserToURL'),''), api_get_path(WEB_CODE_PATH).'admin/access_url_add_courses_to_url.php');
+echo Display::url( Display::return_icon('view_more_stats.gif', get_lang('AddUserToURL'),''), api_get_path(WEB_CODE_PATH).'admin/access_url_add_courses_to_url.php');
 echo '</div>';
 
 api_display_tool_title($tool_name);

+ 1 - 1
main/admin/access_url_edit_users_to_url.php

@@ -153,7 +153,7 @@ if (!empty($message)) {
 }
 
 echo '<div class="actions">';
-echo Display::url(Display::return_icon('view_more_stats.gif',get_lang('AddUserToURL'),''), api_get_path(WEB_CODE_PATH).'admin/access_url_add_users_to_url.php">');
+echo Display::url(Display::return_icon('view_more_stats.gif',get_lang('AddUserToURL'),''), api_get_path(WEB_CODE_PATH).'admin/access_url_add_users_to_url.php');
 echo '</div>';
 
 api_display_tool_title($tool_name);

+ 2 - 2
main/admin/access_urls.php

@@ -135,9 +135,9 @@ foreach($sortable_data as $row)  {
     }    
     //Actions
     $url_id = $row['id'];
-    $actions = Display::url(Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_MEDIUM), "access_url_edit.php?url_id='.$url_id.'");
+    $actions = Display::url(Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL), "access_url_edit.php?url_id=$url_id");
     if ($url_id != '1') {
-        $actions .= '<a href="access_urls.php?action=delete_url&amp;url_id='.$url_id.'&amp;sec_token='.$_SESSION['sec_token'].'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES,$charset))."'".')) return false;">'.Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_MEDIUM).'</a>';
+        $actions .= '<a href="access_urls.php?action=delete_url&amp;url_id='.$url_id.'&amp;sec_token='.$_SESSION['sec_token'].'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES,$charset))."'".')) return false;">'.Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL).'</a>';
     }    
     $urls[] = array($url, $description, $status, $actions);
 }

+ 1 - 1
main/admin/career_dashboard.php

@@ -18,7 +18,7 @@ api_protect_admin_script();
 $this_section = SECTION_PLATFORM_ADMIN;
 
 //Adds the JS needed to use the jqgrid
-$htmlHeadXtra[] = api_get_jquery_ui_js(true);
+$htmlHeadXtra[] = api_get_jqgrid_js();
 
 // setting breadcrumbs
 $interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin'));

+ 1 - 1
main/admin/careers.php

@@ -18,7 +18,7 @@ api_protect_admin_script();
 
 
 //Add the JS needed to use the jqgrid
-$htmlHeadXtra[] = api_get_jquery_ui_js(true);
+$htmlHeadXtra[] = api_get_jqgrid_js();
 
 // setting breadcrumbs
 $interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin'));

+ 2 - 1
main/admin/course_edit.php

@@ -101,7 +101,8 @@ $form->add_textfield('visual_code', array(get_lang('CourseCode'), get_lang('Only
 $form->applyFilter('visual_code','strtoupper');
 $form->applyFilter('visual_code','html_filter');
 
-//$form->add_textfield('tutor_name', get_lang('CourseTitular'));
+//$form->addElement('text', tutor_name', get_lang('CourseTitular'));
+
 //$form->addElement('select', 'tutor_name', get_lang('CourseTitular'), $platform_teachers, array('style'=>'width:350px','id'=>'tutor_name_id', 'class'=>'chzn-select'));
 //$form->applyFilter('tutor_name','html_filter');
 

+ 1 - 1
main/admin/course_list.php

@@ -273,7 +273,7 @@ if (isset ($_GET['search']) && $_GET['search'] == 'advanced') {
     $table->set_header(6, get_lang('UnsubscriptionAllowed'), false, 'width="50px"');
 
     //$table->set_header(7, get_lang('Teacher'));
-    $table->set_header(7, get_lang('Action'), false, 'width="160px"');
+    $table->set_header(7, get_lang('Action'), false, 'width="160px"', array('class'=>'td_actions'));
     $table->set_column_filter(7, 'modify_filter');
     $table->set_form_actions(array('delete_courses' => get_lang('DeleteCourse')), 'course');
     $content .= $table->return_table();

+ 0 - 28
main/admin/course_user_list.php

@@ -1,28 +0,0 @@
-<?php
-$language_file = array ('registration');
-require_once '../inc/global.inc.php';
-require_once '../inc/lib/course.lib.php';
-$user_id=intval($_POST['user_id']);
-$list_course_all_info=array();
-$list_course=array();
-$list_course_all_info=CourseManager::get_courses_list_by_user_id($user_id,true);
-for ($i=0;$i<count($list_course_all_info);$i++) {
-	$list_course[]=$list_course_all_info[$i]['title'];
-}
-?>
-<table width="200" border="0" cellspacing="2" cellpadding="2">
-<?php
-if (count($list_course)==0) {
-?>
-<tr>
-	<td><?php echo api_ucfirst((get_lang('HaveNoCourse'))); ?></td>
-</tr>
-<?php
-}
-?>
-<?php for($k=0;$k<count($list_course);$k++) { ?>
-    <tr>
-        <td><?php echo api_convert_encoding($list_course[$k],'UTF-8',$charset);?></td>
-    </tr>
-<?php }?>
-</table>

+ 21 - 14
main/admin/index.php

@@ -24,7 +24,6 @@ $this_section = SECTION_PLATFORM_ADMIN;
 api_protect_admin_script(true);
 
 $nameTools = get_lang('PlatformAdmin');
-$htmlHeadXtra[] = api_get_jquery_ui_js();
 
 // Displaying the header
 $message = '';
@@ -56,7 +55,7 @@ $blocks = array();
 
 /* Users */
 
-$blocks['users']['icon']  = Display::return_icon('members.gif', get_lang('Users'));
+$blocks['users']['icon']  = Display::return_icon('members.gif', get_lang('Users'), array(), ICON_SIZE_SMALL, false);
 $blocks['users']['label'] = api_ucfirst(get_lang('Users'));
 
 if (api_is_platform_admin()) {	
@@ -91,7 +90,7 @@ $blocks['users']['items'] = $items;
 
 if (api_is_platform_admin()) {
 	/* Courses */
-	$blocks['courses']['icon']  = Display::return_icon('course.gif', get_lang('Courses'));
+	$blocks['courses']['icon']  = Display::return_icon('course.gif', get_lang('Courses'), array(), ICON_SIZE_MEDIUM, false);
 	$blocks['courses']['label'] = api_ucfirst(get_lang('Courses'));
 	
 	$search_form = ' <form method="get" action="course_list.php">
@@ -107,8 +106,8 @@ if (api_is_platform_admin()) {
 		$items[] = array('url'=>'course_add.php', 	'label' => get_lang('AddCourse'));
 	} else {
 		$items[] = array('url'=>'course_request_review.php', 	'label' => get_lang('ReviewCourseRequests'));
-		$items[] = array('url'=>'course_request_accepted.php', 	'label' => get_lang('ReviewCourseRequests'));
-		$items[] = array('url'=>'course_request_rejected.php', 	'label' => get_lang('ReviewCourseRequests'));
+		$items[] = array('url'=>'course_request_accepted.php', 	'label' => get_lang('AcceptedCourseRequests'));
+		$items[] = array('url'=>'course_request_rejected.php', 	'label' => get_lang('RejectedCourseRequests'));
 	}
 	
 	$items[] = array('url'=>'course_export.php', 			'label' => get_lang('ExportCourses'));
@@ -125,11 +124,19 @@ if (api_is_platform_admin()) {
     }
     $blocks['courses']['items'] = $items;
     
-    /* Platform */ 
-    
-    $blocks['platform']['icon']  = Display::return_icon('platform.png', get_lang('Platform'), array(), ICON_SIZE_MEDIUM);
+    /* Platform */    
+    $blocks['platform']['icon']  = Display::return_icon('platform.png', get_lang('Platform'), array(), ICON_SIZE_MEDIUM, false);
     $blocks['platform']['label'] = api_ucfirst(get_lang('Platform'));
     
+    
+    $search_form = ' <form method="get" action="settings.php" class="form-search">
+							<input type="text" name="search_field" value="" >
+                            <input type="hidden" value="search_setting" name="category">
+							<button class="search" type="submit">'.get_lang('Search').'</button>
+	            		</form>';
+	$blocks['platform']['search_form'] = $search_form;
+    
+    
     $items = array();
     $items[] = array('url'=>'settings.php', 				'label' => get_lang('PlatformConfigSettings'));
     $items[] = array('url'=>'system_announcements.php', 	'label' => get_lang('SystemAnnouncements'));
@@ -157,7 +164,7 @@ if (api_is_platform_admin()) {
 
 if (api_get_setting('use_session_mode') == 'true') {
 	
-	$blocks['sessions']['icon']  = Display::return_icon('session.png', get_lang('Sessions'), array(), ICON_SIZE_SMALL);
+	$blocks['sessions']['icon']  = Display::return_icon('session.png', get_lang('Sessions'), array(), ICON_SIZE_SMALL, false);
 	$blocks['sessions']['label'] = api_ucfirst(get_lang('Sessions'));
 	
 	$search_form = ' <form method="POST" action="session_list.php">
@@ -188,7 +195,7 @@ if (api_get_setting('use_session_mode') == 'true') {
 } elseif (api_is_platform_admin()) {
 
 	$blocks['classes']['items'] = $items;	
-	$blocks['classes']['icon']  = Display::return_icon('group.gif', get_lang('AdminClasses'));
+	$blocks['classes']['icon']  = Display::return_icon('group.gif', get_lang('AdminClasses'), array(), ICON_SIZE_SMALL, false);
 	$blocks['classes']['label'] = api_ucfirst(get_lang('AdminClasses'));
 	
 	$search_form = ' <form method="POST" action="class_list.php">
@@ -209,7 +216,7 @@ if (api_get_setting('use_session_mode') == 'true') {
 /* Settings */
 if (api_is_platform_admin()) {	
 	
-	$blocks['settings']['icon']  = Display::return_icon('settings.png', get_lang('System'));
+	$blocks['settings']['icon']  = Display::return_icon('settings.png', get_lang('System'), array(), ICON_SIZE_SMALL, false);
 	$blocks['settings']['label'] = api_ucfirst(get_lang('System'));
 	
 	$items = array();
@@ -228,7 +235,7 @@ if (api_is_platform_admin()) {
 
 	/* Extensions */
 	
-	$blocks['extensions']['icon']  = Display::return_icon('visio_meeting.gif', get_lang('ConfigureExtensions'));
+	$blocks['extensions']['icon']  = Display::return_icon('visio_meeting.gif', get_lang('ConfigureExtensions'), array(), ICON_SIZE_SMALL, false);
 	$blocks['extensions']['label'] = api_ucfirst(get_lang('ConfigureExtensions'));
 	
 	$items = array();
@@ -243,7 +250,7 @@ if (api_is_platform_admin()) {
     
     //Skills
     
-    $blocks['skills']['icon']  = Display::return_icon('logo.gif', get_lang('Skills'));
+    $blocks['skills']['icon']  = Display::return_icon('logo.gif', get_lang('Skills'), array(), ICON_SIZE_SMALL, false);
     $blocks['skills']['label'] = get_lang('Skills');
     
     $items = array();
@@ -257,7 +264,7 @@ if (api_is_platform_admin()) {
 	
 	/* Chamilo.org */
 	
-	$blocks['chamilo']['icon']  = Display::return_icon('logo.gif', 'Chamilo.org');
+	$blocks['chamilo']['icon']  = Display::return_icon('logo.gif', 'Chamilo.org', array(), ICON_SIZE_SMALL, false);
 	$blocks['chamilo']['label'] = 'Chamilo.org';
 	
 	$items = array();

+ 1 - 1
main/admin/promotions.php

@@ -18,7 +18,7 @@ $this_section = SECTION_PLATFORM_ADMIN;
 api_protect_admin_script();
 
 //Adds the JS needed to use the jqgrid
-$htmlHeadXtra[] = api_get_jquery_ui_js(true);
+$htmlHeadXtra[] = api_get_jqgrid_js();
 // setting breadcrumbs
 $interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
 $interbreadcrumb[]=array('url' => 'career_dashboard.php','name' => get_lang('CareersAndPromotions'));

+ 1 - 1
main/admin/session_list.php

@@ -10,7 +10,7 @@ $this_section = SECTION_PLATFORM_ADMIN;
 api_protect_admin_script(true);
 
 //Add the JS needed to use the jqgrid
-$htmlHeadXtra[] = api_get_jquery_ui_js(true);
+$htmlHeadXtra[] = api_get_jqgrid_js();
 
 $action = $_REQUEST['action'];
 $idChecked = $_REQUEST['idChecked'];

+ 456 - 113
main/admin/settings.lib.php

@@ -31,101 +31,66 @@ function handle_plugins() {
         event_system(LOG_CONFIGURATION_SETTINGS_CHANGE, LOG_CONFIGURATION_SETTINGS_CATEGORY, $category, api_get_utc_datetime(), $user_id);
         Display :: display_confirmation_message(get_lang('SettingsStored'));
     }
+    
+    $plugin_obj = new AppPlugin();
+    $possible_plugins = $plugin_obj->read_plugins_from_path();    
 
-    //echo get_lang('AvailablePlugins').'<br />';
-    echo '<br />';
-
-    /* We scan the plugin directory. Each folder is a potential plugin. */
-    $pluginpath = api_get_path(SYS_PLUGIN_PATH);
-
-    $handle = @opendir($pluginpath);
-    while (false !== ($file = readdir($handle))) {
-        if ($file != '.' && $file != '..' && is_dir(api_get_path(SYS_PLUGIN_PATH).$file)) {
-            $possibleplugins[] = $file;
-        }
-    }
-    @closedir($handle);
-
-    /*  For each of the possible plugin directories we check whether a file named "plugin.php" exists
-        (it contains all the needed information about this plugin).
-        This "plugin.php" file looks like:
-        $plugin_info['title'] = 'The title of the plugin';
-        $plugin_info['comment'] = 'Some comment about the plugin';
-        $plugin_info['location'] = array('loginpage_menu', 'campushomepage_menu', 'banner'); // The possible locations where the plugins can be used.
-        $plugin_info['version'] = '0.1 alpha'; // The version number of the plugin.
-        $plugin_info['author'] = 'Patrick Cool'; // The author of the plugin.
-    */
-    echo '<form name="plugins" method="post" action="'.api_get_self().'?category='.$_GET['category'].'">';
+    echo '<form name="plugins" method="post" action="'.api_get_self().'?category='.Security::remove_XSS($_GET['category']).'">';
     echo '<table class="data_table">';
     echo '<tr>';
-    echo '<th>';
+    echo '<th width="400px">';
     echo get_lang('Plugin');
     echo '</th><th>';
-    echo get_lang('LoginPageMainArea');
-    echo '</th><th>';
-    echo get_lang('LoginPageMenu');
+    echo get_lang('PluginArea').'';
+    echo '</th>';
+    /*
+    echo get_lang('LoginPageMenu').'<br />(loginpage_menu)';
     echo '</th><th>';
-    echo get_lang('CampusHomepageMainArea');
+    echo get_lang('CampusHomepageMainArea').'<br />(campushomepage_main)';
     echo '</th><th>';
-    echo get_lang('CampusHomepageMenu');
+    echo get_lang('CampusHomepageMenu').'<br />(campushomepage_menu)';
     echo '</th><th>';
-    echo get_lang('MyCoursesMainArea');
+    echo get_lang('MyCoursesMainArea').'<br />(mycourses_main)';
     echo '</th><th>';
-    echo get_lang('MyCoursesMenu');
+    echo get_lang('MyCoursesMenu').'<br />(mycourses_menu)';
     echo '</th><th>';
-    echo get_lang('Header');
+    echo get_lang('Header').'<br />(header)';
     echo '</th><th>';
-    echo get_lang('Footer');
+    echo get_lang('Footer').'<br />(footer)';
     echo '</th><th>';
-    echo get_lang('CourseTool');
+    echo get_lang('CourseTool').'';*/
     echo '</th>';
     echo '</tr>';
-
-    /* We retrieve all the active plugins. */
-    //$sql = "SELECT * FROM $table_settings_current WHERE category='Plugins'";
-    //$result = Database::query($sql);
-    $result = api_get_settings('Plugins');
-    //while ($row = Database::fetch_array($result))
-    foreach ($result as $row) {
-        $usedplugins[$row['variable']][] = $row['selected_value'];
+    
+    /* We display all the possible plugins and the checkboxes */
+    
+    $plugin_list = array();
+    $my_plugin_list = $plugin_obj->get_plugin_blocks();
+    foreach($my_plugin_list as $plugin_item) {
+        $plugin_list[$plugin_item] = $plugin_item;
     }
 
-    /* We display all the possible plugins and the checkboxes */
-    foreach ($possibleplugins as $testplugin) {
-        $plugin_info_file = api_get_path(SYS_PLUGIN_PATH).$testplugin.'/plugin.php';
+    foreach ($possible_plugins as $plugin) {
+        $plugin_info_file = api_get_path(SYS_PLUGIN_PATH).$plugin.'/plugin.php';
+        
         if (file_exists($plugin_info_file)) {
             $plugin_info = array();
-            include ($plugin_info_file);
-
+            require $plugin_info_file;
             echo '<tr>';
-            echo '<td>';
-            foreach ($plugin_info as $key => $value) {
-                if ($key != 'location') {
-                    if ($key == 'title') {
-                        $value = '<strong>'.$value.'</strong>';
-                    }
-                    echo get_lang(ucwords($key)).': '.$value.'<br />';
-                }
-            }
-            if (file_exists(api_get_path(SYS_PLUGIN_PATH).$testplugin.'/readme.txt')) {
-                echo "<a href='".api_get_path(WEB_PLUGIN_PATH).$testplugin."/readme.txt'>readme.txt</a>";
-            }
-            echo '</td>';
-
-            // column: LoginPageMainArea
-            if (empty($usedplugins)) {
-                $usedplugins = array();
+            echo '<td>';            
+            echo '<h3>'.$plugin_info['title'].' <small>v '.$plugin_info['version'].'</small></h3>';
+            echo '<p>'.$plugin_info['comment'].'</p>';
+            echo '<p>'.get_lang('Author').': '.$plugin_info['author'].'</p>';
+            
+            if (file_exists(api_get_path(SYS_PLUGIN_PATH).$plugin.'/readme.txt')) {
+                echo "<a href='".api_get_path(WEB_PLUGIN_PATH).$plugin."/readme.txt'>readme.txt</a>";
             }
-            display_plugin_cell('loginpage_main', $plugin_info, $testplugin, $usedplugins);
-            display_plugin_cell('loginpage_menu', $plugin_info, $testplugin, $usedplugins);
-            display_plugin_cell('campushomepage_main', $plugin_info, $testplugin, $usedplugins);
-            display_plugin_cell('campushomepage_menu', $plugin_info, $testplugin, $usedplugins);
-            display_plugin_cell('mycourses_main', $plugin_info, $testplugin, $usedplugins);
-            display_plugin_cell('mycourses_menu', $plugin_info, $testplugin, $usedplugins);
-            display_plugin_cell('header', $plugin_info, $testplugin, $usedplugins);
-            display_plugin_cell('footer', $plugin_info, $testplugin, $usedplugins);
-            display_plugin_cell('course_tool_plugin', $plugin_info, $testplugin, $usedplugins);
-            echo '</tr>';
+            echo '</td><td>';                        
+            $selected_plugins = $plugin_obj->get_areas_by_plugin($plugin);            
+            
+            echo Display::select('plugin_'.$plugin.'[]', $plugin_list, $selected_plugins, array('multiple' => 'multiple', 'style' => 'width:500px'));
+    
+            echo '</td></tr>';
         }
     }
     echo '</table>';
@@ -388,60 +353,50 @@ function upload_stylesheet($values, $picture) {
  * @todo: A similar function needs to be written to activate or inactivate additional tools.
  * @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
 */
-function store_plugins() {
-    $table_settings_current = Database :: get_main_table(TABLE_MAIN_SETTINGS_CURRENT);
+function store_plugins() { 
     global $_configuration;
 
+    $plugin_obj = new AppPlugin();
+
     // Get a list of all current 'Plugins' settings
-    $installed_plugins = api_get_settings('Plugins','list',$_configuration['access_url']);
+    $installed_plugins = api_get_settings('Plugins','list', $_configuration['access_url']);
     $shortlist_installed = array();
     foreach ($installed_plugins as $plugin) {
         $shortlist_installed[] = $plugin['subkey'];
     }
     $shortlist_installed = array_flip(array_flip($shortlist_installed));
-    // Step 1 : We remove all the plugins.
-    //$sql = "DELETE FROM $table_settings_current WHERE category='Plugins'";
-    //Database::query($sql);
+
     $r = api_delete_category_settings('Plugins', $_configuration['access_url']);
-    $shortlist_required = array();
-    // Step 2: Looping through all the post values we only store these which are really a valid plugin location.
-    foreach ($_POST as $form_name => $formvalue) {
-        $form_name_elements = explode('-', $form_name);
-        if (is_valid_plugin_location($form_name_elements[1])) {
-            $shortlist_required[] = $form_name_elements[0];
-            //$sql = "INSERT into $table_settings_current (variable,category,selected_value) VALUES ('".$form_name_elements['1']."','Plugins','".$form_name_elements['0']."')";
-            //Database::query($sql);
-            api_add_setting($form_name_elements['0'], $form_name_elements['1'], $form_name_elements['0'], null, 'Plugins', $form_name_elements['0'], null, null, null, $_configuration['access_url'], 1);
-            // check if there is an install procedure
-            $pluginpath = api_get_path(SYS_PLUGIN_PATH).$form_name_elements[0].'/install.php';
-            if (is_file($pluginpath) && is_readable($pluginpath)) {
-                //execute the install procedure
-            	include $pluginpath;
+
+    $plugin_list = $plugin_obj->read_plugins_from_path();
+
+    foreach ($plugin_list as $plugin) {
+        if (isset($_POST['plugin_'.$plugin])) {
+            $areas_to_installed = $_POST['plugin_'.$plugin];
+            foreach ($areas_to_installed as $area) {
+                api_add_setting($plugin, $area, $plugin, null, 'Plugins', $plugin, null, null, null, $_configuration['access_url'], 1);
+                $pluginpath = api_get_path(SYS_PLUGIN_PATH).$plugin.'/install.php';
+                if (is_file($pluginpath) && is_readable($pluginpath)) {
+                    //execute the install procedure
+                    require $pluginpath;
+                }
             }
         }
     }
+
     foreach ($shortlist_installed as $plugin) {
         // if one plugin was really deleted, execute the uninstall script
     	if (!in_array($plugin,$shortlist_required)) {
-            // check if there is an install procedure
+            // check if there is an uninstall procedure
             $pluginpath = api_get_path(SYS_PLUGIN_PATH).$plugin.'/uninstall.php';
             if (is_file($pluginpath) && is_readable($pluginpath)) {
-                //execute the install procedure
-                include $pluginpath;
-            }    		
+                //execute the uninstall procedure
+                require $pluginpath;
+            }
     	}
     }
 }
 
-/**
- * Check if the post information is really a valid plugin location.
- * @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
-*/
-function is_valid_plugin_location($location) {
-    static $valid_locations = array('loginpage_main', 'loginpage_menu', 'campushomepage_main', 'campushomepage_menu', 'mycourses_main', 'mycourses_menu', 'header', 'footer', 'course_tool_plugin');
-    return in_array($location, $valid_locations);
-}
-
 
 /**
  * This function allows the platform admin to choose which should be the default stylesheet
@@ -454,7 +409,7 @@ function store_stylesheets() {
 
     // Insert the stylesheet.
     $style = Database::escape_string($_POST['style']);
-    
+
     if (is_style($style)) {
         api_set_setting('stylesheets', $style, null, 'stylesheets', $_configuration['access_url']);
     }
@@ -489,16 +444,14 @@ function handle_search() {
     require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php';
     require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php';
     $search_enabled = api_get_setting('search_enabled');
-    
+ 
     $form = new FormValidator('search-options', 'post', api_get_self().'?category=Search');
         
     $renderer = & $form->defaultRenderer();
     //$renderer->setHeaderTemplate('<div class="sectiontitle">{header}</div>'."\n");
     //$renderer->setElementTemplate('<div class="sectioncomment">{label}</div>'."\n".'<div class="sectionvalue">{element}</div>'."\n");
     $renderer->setElementTemplate('<div class="row"><div class="label">{label}</div><div class="formw">{element}<!-- BEGIN label_2 --><span class="help-block">{label_2}</span><!-- END label_2 --></div></div>');
-    
-    
-    
+       
     $values = api_get_settings_options('search_enabled');   
     $form->addElement('header', null, get_lang('SearchEnabledTitle'));    
      
@@ -757,6 +710,7 @@ function get_template_data($from, $number_of_items, $column, $direction) {
     $sql .= " ORDER BY col$column $direction ";
     $sql .= " LIMIT $from,$number_of_items";
     $result = Database::query($sql);
+    $return = array();
     while ($row = Database::fetch_array($result)) {
         $row['1'] = get_lang($row['1']);
         $return[] = $row;
@@ -1015,3 +969,392 @@ function update_gradebook_score_display_custom_values($values) {
     }
     $scoredisplay->update_custom_score_display_settings($final);
 }
+
+function generate_settings_form($settings, $settings_by_access_list) {
+    $table_settings_current = Database :: get_main_table(TABLE_MAIN_SETTINGS_CURRENT);
+    global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
+    
+    $form = new FormValidator('settings', 'post', 'settings.php?category='.Security::remove_XSS($_GET['category']));
+    $form ->addElement('hidden', 'search_field', Security::remove_XSS($_GET['search_field']));
+    
+    $default_values = array();
+    $count_settings = count($settings);
+    
+    foreach ($settings as $row) {
+        
+    	if (in_array($row['variable'], $settings_to_avoid)) { continue; }
+
+        $anchor_name = $row['variable'].(!empty($row['subkey']) ? '_'.$row['subkey'] : '');
+        $form->addElement('html',"\n<a name=\"$anchor_name\"></a>\n");
+
+        ($count_settings % 10) < 5 ? $b = $count_settings - 10 : $b = $count_settings;
+        if ($i % 10 == 0 and $i < $b AND $i != 0) {
+            $form->addElement('html', '<div align="right">');
+            $form->addElement('style_submit_button', null, get_lang('SaveSettings'), 'class="save"');
+            $form->addElement('html', '</div>');
+        }
+
+        $i++;
+
+        if ($row['access_url_changeable'] == '1' && $_configuration['multiple_access_urls']) {
+            $form->addElement('html', '<div style="float: right;">'.Display::return_icon('shared_setting.png', get_lang('SharedSettingIconComment')).'</div>');
+        }
+
+        $hideme = array();
+        $hide_element = false;
+        if ($_configuration['access_url'] != 1) {
+            if ($row['access_url_changeable'] == 0) {
+                // We hide the element in other cases (checkbox, radiobutton) we 'freeze' the element.
+                $hide_element = true;
+                $hideme = array('disabled');
+            } elseif ($url_info['active'] == 1) {
+                // We show the elements.
+                if (empty($row['variable']))
+                    $row['variable'] = 0;
+                if (empty($row['subkey']))
+                    $row['subkey'] = 0;
+                if (empty($row['category']))
+                    $row['category'] = 0;
+
+                if (is_array($settings_by_access_list[ $row['variable'] ] [ $row['subkey'] ] [ $row['category'] ])) {
+                    // We are sure that the other site have a selected value.
+                    if ($settings_by_access_list[ $row['variable'] ] [ $row['subkey'] ] [ $row['category'] ]['selected_value'] != '')
+                        $row['selected_value'] =$settings_by_access_list[$row['variable']] [$row['subkey']] [ $row['category'] ]['selected_value'];
+                }
+                // There is no else{} statement because we load the default $row['selected_value'] of the main Chamilo site.
+            }
+        }		
+		        
+        switch ($row['type']) {
+            case 'textfield':
+                if (in_array($row['variable'], $convert_byte_to_mega_list)) {                    
+                    $form->addElement('text', $row['variable'], array(get_lang($row['title']), get_lang($row['comment']), get_lang('MB')), array('maxlength' => '8'));
+                    $form->applyFilter($row['variable'], 'html_filter');
+                    $default_values[$row['variable']] = round($row['selected_value']/1024/1024, 1);                    
+                } elseif ($row['variable'] == 'account_valid_duration') {
+                    $form->addElement('text', $row['variable'], array(get_lang($row['title']), get_lang($row['comment'])), array('maxlength' => '5'));
+                    $form->applyFilter($row['variable'], 'html_filter');
+                    $default_values[$row['variable']] = $row['selected_value'];
+
+                    // For platform character set selection: Conversion of the textfield to a select box with valid values.
+                } elseif ($row['variable'] == 'platform_charset') {
+                    $current_system_encoding = api_refine_encoding_id(trim($row['selected_value']));
+                    $valid_encodings = array_flip(api_get_valid_encodings());
+                    if (!isset($valid_encodings[$current_system_encoding])) {
+                        $is_alias_encoding = false;
+                        foreach ($valid_encodings as $encoding) {
+                            if (api_equal_encodings($encoding, $current_system_encoding)) {
+                                $is_alias_encoding = true;
+                                $current_system_encoding = $encoding;
+                                break;
+                            }
+                        }
+                        if (!$is_alias_encoding) {
+                            $valid_encodings[$current_system_encoding] = $current_system_encoding;
+                        }
+                    }
+                    foreach ($valid_encodings as $key => &$encoding) {
+                        if (api_is_encoding_supported($key) && Database::is_encoding_supported($key)) {
+                            $encoding = $key;
+                        } else {                            
+                            unset($valid_encodings[$key]);
+                        }
+                    }                    
+                    $form->addElement('select', $row['variable'], array(get_lang($row['title']), get_lang($row['comment'])), $valid_encodings);
+                    $default_values[$row['variable']] = $current_system_encoding;                                
+                } else {                    
+                    $form->addElement('text', $row['variable'], array(get_lang($row['title']), get_lang($row['comment'])), $hideme);                    
+                    $form->applyFilter($row['variable'],'html_filter');
+                    $default_values[$row['variable']] = $row['selected_value'];
+                }
+                break;
+            case 'textarea':            	
+                if ($row['variable'] == 'header_extra_content') {
+      	            $file = api_get_path(SYS_PATH).api_get_home_path().'header_extra_content.txt';
+                    $value = '';
+                    if (file_exists($file)) {
+                        $value = file_get_contents($file);
+                    }
+                    $form->addElement('textarea', $row['variable'], array(get_lang($row['title']), get_lang($row['comment'])) , array('rows'=>'10','cols'=>'50'), $hideme);
+            	    $default_values[$row['variable']] = $value;            	        
+                } elseif ($row['variable'] == 'footer_extra_content') {
+            		$file = api_get_path(SYS_PATH).api_get_home_path().'footer_extra_content.txt';
+            		$value = '';
+            		if (file_exists($file)) {
+						$value = file_get_contents($file);
+            		}
+            	    $form->addElement('textarea', $row['variable'], array(get_lang($row['title']), get_lang($row['comment'])) , array('rows'=>'10','cols'=>'50'), $hideme);
+            	    $default_values[$row['variable']] = $value;            	        
+            	} else {
+                	$form->addElement('textarea', $row['variable'], array(get_lang($row['title']), get_lang($row['comment'])) , array('rows'=>'10','cols'=>'50'), $hideme);
+                	$default_values[$row['variable']] = $row['selected_value'];
+            	}
+                break;
+            case 'radio':
+                $values = api_get_settings_options($row['variable']);
+                $group = array ();
+                if (is_array($values )) {
+                    foreach ($values as $key => $value) {
+                        $element = & $form->createElement('radio', $row['variable'], '', get_lang($value['display_text']), $value['value']);
+                        if ($hide_element) {
+                            $element->freeze();
+                        }
+                        $group[] = $element;
+                    }
+                }
+                $form->addGroup($group, $row['variable'], array(get_lang($row['title']), get_lang($row['comment'])), '', false); //julio
+                $default_values[$row['variable']] = $row['selected_value'];
+                break;
+            case 'checkbox';
+                // 1. We collect all the options of this variable.
+                $sql = "SELECT * FROM $table_settings_current WHERE variable='".$row['variable']."' AND access_url =  1";
+
+                $result = Database::query($sql);
+                $group = array ();
+                while ($rowkeys = Database::fetch_array($result)) {
+                     //if ($rowkeys['variable'] == 'course_create_active_tools' && $rowkeys['subkey'] == 'enable_search') { continue; }
+
+                     // Profile tab option should be hidden when the social tool is enabled.
+                     if (api_get_setting('allow_social_tool') == 'true') {
+                         if ($rowkeys['variable'] == 'show_tabs' && $rowkeys['subkey'] == 'my_profile') { continue; }
+                     }
+
+                     // Hiding the gradebook option.
+                     if ($rowkeys['variable'] == 'show_tabs' && $rowkeys['subkey'] == 'my_gradebook') { continue; }
+
+                    $element = & $form->createElement('checkbox', $rowkeys['subkey'], '', get_lang($rowkeys['subkeytext']));
+                    if ($row['access_url_changeable'] == 1) {
+                        // 2. We look into the DB if there is a setting for a specific access_url.
+                        $access_url = $_configuration['access_url'];
+                        if (empty($access_url )) $access_url = 1;
+                        $sql = "SELECT selected_value FROM $table_settings_current WHERE variable='".$rowkeys['variable']."' AND subkey='".$rowkeys['subkey']."'  AND  subkeytext='".$rowkeys['subkeytext']."' AND access_url =  $access_url";
+                        $result_access = Database::query($sql);
+                        $row_access = Database::fetch_array($result_access);
+                        if ($row_access['selected_value'] == 'true' && !$form->isSubmitted()) {
+                            $element->setChecked(true);
+                        }
+                    } else {
+                        if ($rowkeys['selected_value'] == 'true' && !$form->isSubmitted()) {
+                            $element->setChecked(true);
+                        }
+                    }
+                    if ($hide_element) {
+                        $element->freeze();
+                    }
+                    $group[] = $element;
+                }
+                $form->addGroup($group, $row['variable'], array(get_lang($row['title']), get_lang($row['comment'])),'');
+                break;
+            case 'link':
+                $form->addElement('static', null, array(get_lang($row['title']), get_lang($row['comment'])), get_lang('CurrentValue').' : '.$row['selected_value'], $hideme);
+                break;
+            /*
+             * To populate its list of options, the select type dynamically calls a function that must be called select_ + the name of the variable being displayed.
+             * The functions being called must be added to the file settings.lib.php.
+             */
+            case 'select':
+                $form->addElement('select', $row['variable'], array(get_lang($row['title']), get_lang($row['comment'])), call_user_func('select_'.$row['variable']), $hideme);
+                $default_values[$row['variable']] = $row['selected_value'];
+                break;
+
+            case 'custom_gradebook':
+            case 'custom':
+            	$values = api_get_settings_options($row['variable']);
+            	
+            	//$renderer = & $form->defaultRenderer();
+            	//$renderer->setElementTemplate('{label} - {element}<!-- BEGIN label_2 --><span class="help-block">{label_2}</span><!-- END label_2 -->');
+            	
+            	$numbers = array();
+            	for($j=1;$j<=20;$j++) {
+            		$numbers[$j] = $j;
+            	}
+            	
+            	if (!empty($values)) {            		
+            		foreach($values as $option) {
+            			$group = array();
+            			$id = $option['id'];            			            			
+            			$option_id = $row['variable']."[$id]";            			
+            			$group[] = $form->createElement('text', $option_id.'[display_text]', array(get_lang($row['title']), get_lang($row['comment'])),'class="begin_model"');
+            			
+            			$default_values[$option_id.'[display_text]'] = $option['display_text'];
+            			$parts = api_grading_model_functions($option['value'], 'to_array');            			
+            			$denominator = $parts['denominator'];            			
+            			$j = 1;            			
+            			foreach($parts['items'] as $item) {  
+            				$letter = $item['letter'];
+            				$value  = $item['value'];
+            				$group[] =$form->createElement('static','<div>');
+            				$class = 'number';
+            				if ($j == 1) {
+            					$class = 'first_number'; 
+            				}
+            				$group[] = $form->createElement('select', $option_id.'[items]['.$j.']', array('dd'), $numbers, array('class'=>$class));
+            				$sum = ' ';
+            				if ($j != count($parts['items'])) {
+            					$sum = ' + ';
+            				}
+            				//$group[] =$form->createElement('static',' * '.$letter.$sum);
+            				
+            				$default_values[$option_id.'[items]['.$j.']'] = $value;            				
+            				$j++;            				
+            			}
+            			
+            			$group[] = $form->createElement('select', $option_id.'[denominator]', array('/'), $numbers,'class="denominator"');            			
+            			$group[] = $form->createElement('button', "delete", get_lang('Delete'), array('type'=>'button', 'id'=>$id, 'onclick'=>"delete_grading_model('$id');"));
+            			
+            			$default_values[$option_id.'[denominator]'] = $denominator;
+            			$form->addGroup($group, '', get_lang($row['title']), ' ');
+            		}     		
+            	}
+            	
+            	//New Grading Model form
+            	$group = array();
+            	
+            	$group[] = $form->createElement('text',   'new_model', array(get_lang('AddNewModel')));            	
+            	$group[] = $form->createElement('select', 'number_evaluations', array(''), $numbers,''); 
+            	
+            	$form->addGroup($group, '', get_lang('AddNewModel'), "&nbsp;&nbsp;".get_lang('NumberOfSubEvaluations')."&nbsp;");
+            	
+            	$form->addElement('style_submit_button', null, get_lang('Add'), 'class="add"');
+            	
+            	
+            	break;
+            /*
+             * Used to display custom values for the gradebook score display
+             */
+            /* this configuration is moved now inside gradebook tool
+            case 'gradebook_score_display_custom':
+                if(api_get_setting('gradebook_score_display_custom', 'my_display_custom') == 'false') {
+                    $form->addElement('static', null, null, get_lang('GradebookActivateScoreDisplayCustom'));
+                } else {
+                    // Get score displays.
+                    require_once api_get_path(SYS_CODE_PATH).'gradebook/lib/scoredisplay.class.php';
+                    $scoredisplay = ScoreDisplay::instance();
+                    $customdisplays = $scoredisplay->get_custom_score_display_settings();
+                    $nr_items = (count($customdisplays)!='0') ? count($customdisplays) : '1';
+                    $form->addElement('hidden', 'gradebook_score_display_custom_values_maxvalue', '100');
+                    $form->addElement('hidden', 'gradebook_score_display_custom_values_minvalue', '0');
+                    $form->addElement('static', null, null, get_lang('ScoreInfo'));
+                    $scorenull[] = $form->CreateElement('static', null, null, get_lang('Between'));
+                    $form->setDefaults(array (
+                        'beginscore' => '0'
+                    ));
+                    $scorenull[] = $form->CreateElement('text', 'beginscore', null, array (
+                        'size' => 5,
+                        'maxlength' => 5,
+                        'disabled' => 'disabled'
+                    ));
+                    $scorenull[] = $form->CreateElement('static', null, null, ' %');
+                    $form->addGroup($scorenull, '', '', ' ');
+                    for ($counter= 1; $counter <= 20; $counter++) {
+                        $renderer = $form->defaultRenderer();
+                        $elementTemplateTwoLabel =
+                        '<div id=' . $counter . ' style="display: '.(($counter<=$nr_items)?'inline':'none').';">
+                        <p><!-- BEGIN required --><span class="form_required">*</span> <!-- END required -->{label}
+                        <div class="formw"><!-- BEGIN error --><span class="form_error">{error}</span><br /><!-- END error --> <b>'.get_lang('And').'</b>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp{element} % =';
+
+                        $elementTemplateTwoLabel2 =
+                        '<!-- BEGIN error --><span class="form_error">{error}</span><br /><!-- END error -->&nbsp{element}
+                        <a href="javascript:minItem(' . ($counter) . ')"><img style="display: '.(($counter >= $nr_items && $counter != 1) ? 'inline' : 'none').';" id="min-' . $counter . '" src="../img/gradebook_remove.gif" alt="'.get_lang('Delete').'" title="'.get_lang('Delete').'"></img></a>
+                        <a href="javascript:plusItem(' . ($counter+1) . ')"><img style="display: '.(($counter >= $nr_items) ? 'inline' : 'none').';" id="plus-' . ($counter+1) . '" src="../img/gradebook_add.gif" alt="'.get_lang('Add').'" title="'.get_lang('Add').'"></img></a>
+                        </div></p></div>';
+
+                        $scorebetw= array ();
+                        $form->addElement('text', 'gradebook_score_display_custom_values_endscore[' . $counter . ']', null, array (
+                            'size' => 5,
+                            'maxlength' => 5,
+                            'id' => 'txta-'.$counter
+                        ));
+                        $form->addElement('text', 'gradebook_score_display_custom_values_displaytext[' . $counter . ']', null,array (
+                            'size' => 40,
+                            'maxlength' => 40,
+                            'id' => 'txtb-'.$counter
+                        ));
+                        $renderer->setElementTemplate($elementTemplateTwoLabel,'gradebook_score_display_custom_values_endscore[' . $counter . ']');
+                        $renderer->setElementTemplate($elementTemplateTwoLabel2,'gradebook_score_display_custom_values_displaytext[' . $counter . ']');
+                        $form->addRule('gradebook_score_display_custom_values_endscore[' . $counter . ']', get_lang('OnlyNumbers'), 'numeric');
+                        $form->addRule(array('gradebook_score_display_custom_values_endscore[' . $counter . ']', 'gradebook_score_display_custom_values_maxvalue'), get_lang('Over100'), 'compare', '<=');
+                        $form->addRule(array('gradebook_score_display_custom_values_endscore[' . $counter . ']', 'gradebook_score_display_custom_values_minvalue'), get_lang('UnderMin'), 'compare', '>');
+                        if ($customdisplays[$counter - 1]) {
+                            $default_values['gradebook_score_display_custom_values_endscore['.$counter.']'] = $customdisplays[$counter - 1]['score'];
+                            $default_values['gradebook_score_display_custom_values_displaytext['.$counter.']'] = $customdisplays[$counter - 1]['display'];
+                        }
+                    }
+                }
+                break;
+                */
+        }        
+        
+        if ($row['variable'] == 'pdf_export_watermark_enable') {
+        	$url =  PDF::get_watermark($course_code);
+            $form->addElement('file', 'pdf_export_watermark_path', get_lang('AddWaterMark'));
+            if ($url != false) {                
+                $delete_url = '<a href="?delete_watermark">'.Display::return_icon('delete.png',get_lang('DelImage')).'</a>';
+                $form->addElement('html', '<a href="'.$url.'">'.$url.' '.$delete_url.'</a>');
+            }   
+            $allowed_picture_types = array ('jpg', 'jpeg', 'png', 'gif');
+            $form->addRule('pdf_export_watermark_path', get_lang('OnlyImagesAllowed').' ('.implode(',', $allowed_picture_types).')', 'filetype', $allowed_picture_types);    
+        }
+        
+        if ($row['variable'] == 'timezone_value') {
+            $timezone = $row['selected_value'];
+            if (empty($timezone)) {
+                $timezone = _api_get_timezone();
+            }
+            $form->addElement('html', sprintf(get_lang('LocalTimeUsingPortalTimezoneXIsY'), $timezone, api_get_local_time()));
+        }        
+    }
+    
+    if (!empty($settings)) {
+        $form->addElement('html', '<div style="text-align: right; clear: both;">');
+        $form->addElement('style_submit_button', null, get_lang('SaveSettings'), 'class="save"');
+        $form->addElement('html', '</div>');
+        $form->setDefaults($default_values); 
+    }
+    return $form;
+    
+}
+
+/**
+ * Searchs a platform setting
+ * @param string $search
+ * @return array
+ */
+function search_setting($search) {
+    $table_settings_current = Database :: get_main_table(TABLE_MAIN_SETTINGS_CURRENT);    
+    $sql = "SELECT * FROM $table_settings_current GROUP BY variable ORDER BY id ASC ";
+    $result = Database::store_result(Database::query($sql), 'ASSOC');
+    $settings = array();
+    
+    $search = api_strtolower($search);
+    
+    if (!empty($result)) {
+        foreach ($result as $setting) {
+            $found = false;
+            
+            $title = api_strtolower(get_lang($setting['title']));
+            //try the title
+            if (strpos($title, $search) === false) {                
+                $comment = api_strtolower(get_lang($setting['comment']));
+                //Try the comment
+                if (strpos($comment, $search) === false) {
+                    //Try the variable name
+                    if (strpos($setting['variable'], $search) === false) {
+                        continue;                        
+                    } else {
+                        $found = true;       
+                    }                 
+                } else {
+                    $found = true;   
+                }
+                
+            } else {                
+                $found = true;    
+            }          
+            if ($found) {                
+                $settings[] = $setting;
+            }
+        }    
+    }    
+    return $settings;    
+}

+ 40 - 371
main/admin/settings.php

@@ -30,6 +30,7 @@ require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php';
 require_once api_get_path(LIBRARY_PATH).'fileUpload.lib.php';
 require_once api_get_path(LIBRARY_PATH).'dashboard.lib.php';
 require_once api_get_path(LIBRARY_PATH).'pdf.lib.php';
+require_once api_get_path(LIBRARY_PATH).'plugin.lib.php';
 require_once 'settings.lib.php';
 
 // Setting the section (for the tabs).
@@ -48,8 +49,6 @@ $settings_to_avoid = array(
 
 $convert_byte_to_mega_list = array('dropbox_max_filesize', 'message_max_upload_filesize', 'default_document_quotum', 'default_group_quotum');
 
-
-
 // Submit stylesheets.
 if (isset($_POST['submit_stylesheets'])) {
     $message = store_stylesheets();
@@ -104,22 +103,12 @@ if (isset($_GET['action']) &&  $_GET['action'] == 'delete_grading') {
 	api_delete_setting_option($id);
 }
 
+$settings = null;
+
 // Build the form.
 if (!empty($_GET['category']) && !in_array($_GET['category'], array('Plugins', 'stylesheets', 'Search'))) {
-    $form = new FormValidator('settings', 'post', 'settings.php?category='.$_GET['category']);
-   
-    
-    /*$renderer->setHeaderTemplate('<div class="sectiontitle">{header}</div>');
-    $renderer->setElementTemplate('<div class="sectionvalue">{element}</div><div class="sectioncomment">{label}</div>'."\n");*/
-    
-    //$renderer->setHeaderTemplate('<div class="sectiontitle">{header}</div>');
-    
     $my_category = Database::escape_string($_GET['category']);
 
-    $sqlcountsettings = "SELECT COUNT(*) FROM $table_settings_current WHERE category='".$my_category."' AND type<>'checkbox'";
-    $resultcountsettings = Database::query($sqlcountsettings);
-    $countsetting = Database::fetch_array($resultcountsettings);
-
     if ($_configuration['access_url'] == 1) {
         $settings = api_get_settings($my_category, 'group', $_configuration['access_url']);
     } else {
@@ -129,8 +118,7 @@ if (!empty($_GET['category']) && !in_array($_GET['category'], array('Plugins', '
             $settings = api_get_settings($my_category, 'group', 1, 0);
             // The settings that are changeable from a particular site.
             $settings_by_access = api_get_settings($my_category, 'group', $_configuration['access_url'], 1);
-            //echo '<pre>';
-            //print_r($settings_by_access);
+            
             $settings_by_access_list = array();
             foreach ($settings_by_access as $row) {
                 if (empty($row['variable']))
@@ -148,345 +136,17 @@ if (!empty($_GET['category']) && !in_array($_GET['category'], array('Plugins', '
         }
     }
     
-    $default_values = array();
-    foreach ($settings as $row) {
-    	if (in_array($row['variable'], $settings_to_avoid)) { continue; }
-
-        $anchor_name = $row['variable'].(!empty($row['subkey']) ? '_'.$row['subkey'] : '');
-        $form->addElement('html',"\n<a name=\"$anchor_name\"></a>\n");
-
-        ($countsetting['0'] % 10) < 5 ? $b = $countsetting['0'] - 10 : $b = $countsetting['0'];
-        if ($i % 10 == 0 and $i < $b AND $i != 0) {
-            $form->addElement('html', '<div align="right">');
-            $form->addElement('style_submit_button', null, get_lang('SaveSettings'), 'class="save"');
-            $form->addElement('html', '</div>');
-        }
-
-        $i++;
-
-        //$form->addElement('header', null, get_lang($row['title']));
-
-        if ($row['access_url_changeable'] == '1' && $_configuration['multiple_access_urls']) {
-            $form->addElement('html', '<div style="float: right;">'.Display::return_icon('shared_setting.png', get_lang('SharedSettingIconComment')).'</div>');
-        }
-
-        $hideme = array();
-        $hide_element = false;
-        if ($_configuration['access_url'] != 1) {
-            if ($row['access_url_changeable'] == 0) {
-                // We hide the element in other cases (checkbox, radiobutton) we 'freeze' the element.
-                $hide_element = true;
-                $hideme = array('disabled');
-            } elseif ($url_info['active'] == 1) {
-                // We show the elements.
-                if (empty($row['variable']))
-                    $row['variable'] = 0;
-                if (empty($row['subkey']))
-                    $row['subkey'] = 0;
-                if (empty($row['category']))
-                    $row['category'] = 0;
-
-                if (is_array($settings_by_access_list[ $row['variable'] ] [ $row['subkey'] ] [ $row['category'] ])) {
-                    // We are sure that the other site have a selected value.
-                    if ($settings_by_access_list[ $row['variable'] ] [ $row['subkey'] ] [ $row['category'] ]['selected_value'] != '')
-                        $row['selected_value'] =$settings_by_access_list[$row['variable']] [$row['subkey']] [ $row['category'] ]['selected_value'];
-                }
-                // There is no else{} statement because we load the default $row['selected_value'] of the main Chamilo site.
-            }
-        }		
-		
-        
-        switch ($row['type']) {
-            case 'textfield':
-                if (in_array($row['variable'], $convert_byte_to_mega_list)) {                    
-                    $form->addElement('text', $row['variable'], array(get_lang($row['title']), get_lang($row['comment']), get_lang('MB')), array('maxlength' => '8'));
-                    $form->applyFilter($row['variable'], 'html_filter');
-                    $default_values[$row['variable']] = round($row['selected_value']/1024/1024, 1);
-                    
-                } elseif ($row['variable'] == 'account_valid_duration') {
-                    $form->addElement('text', $row['variable'], array(get_lang($row['title']), get_lang($row['comment'])), array('maxlength' => '5'));
-                    $form->applyFilter($row['variable'], 'html_filter');
-                    $default_values[$row['variable']] = $row['selected_value'];
-
-                    // For platform character set selection: Conversion of the textfield to a select box with valid values.
-                } elseif ($row['variable'] == 'platform_charset') {
-                    $current_system_encoding = api_refine_encoding_id(trim($row['selected_value']));
-                    $valid_encodings = array_flip(api_get_valid_encodings());
-                    if (!isset($valid_encodings[$current_system_encoding])) {
-                        $is_alias_encoding = false;
-                        foreach ($valid_encodings as $encoding) {
-                            if (api_equal_encodings($encoding, $current_system_encoding)) {
-                                $is_alias_encoding = true;
-                                $current_system_encoding = $encoding;
-                                break;
-                            }
-                        }
-                        if (!$is_alias_encoding) {
-                            $valid_encodings[$current_system_encoding] = $current_system_encoding;
-                        }
-                    }
-                    foreach ($valid_encodings as $key => &$encoding) {
-                        if (api_is_encoding_supported($key) && Database::is_encoding_supported($key)) {
-                            $encoding = $key;
-                        } else {
-                            //$encoding = $key.' (n.a.)';
-                            unset($valid_encodings[$key]);
-                        }
-                    }
-                    $form->addElement('select', $row['variable'], array(get_lang($row['title']), get_lang($row['comment'])), $valid_encodings);
-                    $default_values[$row['variable']] = $current_system_encoding;
-                } else {
-                    $form->addElement('text', $row['variable'], array(get_lang($row['title']), get_lang($row['comment'])), $hideme);
-                    $form->applyFilter($row['variable'],'html_filter');
-                    $default_values[$row['variable']] = $row['selected_value'];
-                }
-                break;
-            case 'textarea':            	
-                if ($row['variable'] == 'header_extra_content') {
-      	            $file = api_get_path(SYS_PATH).api_get_home_path().'header_extra_content.txt';
-                    $value = '';
-                    if (file_exists($file)) {
-                        $value = file_get_contents($file);
-                    }
-                    $form->addElement('textarea', $row['variable'], array(get_lang($row['title']), get_lang($row['comment'])) , array('rows'=>'10','cols'=>'50'), $hideme);
-            	    $default_values[$row['variable']] = $value;            	        
-                } elseif ($row['variable'] == 'footer_extra_content') {
-            		$file = api_get_path(SYS_PATH).api_get_home_path().'footer_extra_content.txt';
-            		$value = '';
-            		if (file_exists($file)) {
-						$value = file_get_contents($file);
-            		}
-            	    $form->addElement('textarea', $row['variable'], array(get_lang($row['title']), get_lang($row['comment'])) , array('rows'=>'10','cols'=>'50'), $hideme);
-            	    $default_values[$row['variable']] = $value;            	        
-            	} else {
-                	$form->addElement('textarea', $row['variable'], array(get_lang($row['title']), get_lang($row['comment'])) , array('rows'=>'10','cols'=>'50'), $hideme);
-                	$default_values[$row['variable']] = $row['selected_value'];
-            	}
-                break;
-            case 'radio':
-                $values = api_get_settings_options($row['variable']);
-                $group = array ();
-                if (is_array($values )) {
-                    foreach ($values as $key => $value) {
-                        $element = & $form->createElement('radio', $row['variable'], '', get_lang($value['display_text']), $value['value']);
-                        if ($hide_element) {
-                            $element->freeze();
-                        }
-                        $group[] = $element;
-                    }
-                }
-                $form->addGroup($group, $row['variable'], array(get_lang($row['title']), get_lang($row['comment'])), '', false); //julio
-                $default_values[$row['variable']] = $row['selected_value'];
-                break;
-            case 'checkbox';
-                // 1. We collect all the options of this variable.
-                $sql = "SELECT * FROM settings_current WHERE variable='".$row['variable']."' AND access_url =  1";
-
-                $result = Database::query($sql);
-                $group = array ();
-                while ($rowkeys = Database::fetch_array($result)) {
-                     //if ($rowkeys['variable'] == 'course_create_active_tools' && $rowkeys['subkey'] == 'enable_search') { continue; }
-
-                     // Profile tab option should be hidden when the social tool is enabled.
-                     if (api_get_setting('allow_social_tool') == 'true') {
-                         if ($rowkeys['variable'] == 'show_tabs' && $rowkeys['subkey'] == 'my_profile') { continue; }
-                     }
-
-                     // Hiding the gradebook option.
-                     if ($rowkeys['variable'] == 'show_tabs' && $rowkeys['subkey'] == 'my_gradebook') { continue; }
-
-                    $element = & $form->createElement('checkbox', $rowkeys['subkey'], '', get_lang($rowkeys['subkeytext']));
-                    if ($row['access_url_changeable'] == 1) {
-                        // 2. We look into the DB if there is a setting for a specific access_url.
-                        $access_url = $_configuration['access_url'];
-                        if (empty($access_url )) $access_url = 1;
-                        $sql = "SELECT selected_value FROM settings_current WHERE variable='".$rowkeys['variable']."' AND subkey='".$rowkeys['subkey']."'  AND  subkeytext='".$rowkeys['subkeytext']."' AND access_url =  $access_url";
-                        $result_access = Database::query($sql);
-                        $row_access = Database::fetch_array($result_access);
-                        if ($row_access['selected_value'] == 'true' && !$form->isSubmitted()) {
-                            $element->setChecked(true);
-                        }
-                    } else {
-                        if ($rowkeys['selected_value'] == 'true' && !$form->isSubmitted()) {
-                            $element->setChecked(true);
-                        }
-                    }
-                    if ($hide_element) {
-                        $element->freeze();
-                    }
-                    $group[] = $element;
-                }
-                $form->addGroup($group, $row['variable'], array(get_lang($row['title']), get_lang($row['comment'])),'');
-                break;
-            case 'link':
-                $form->addElement('static', null, array(get_lang($row['title']), get_lang($row['comment'])), get_lang('CurrentValue').' : '.$row['selected_value'], $hideme);
-                break;
-            /*
-             * To populate its list of options, the select type dynamically calls a function that must be called select_ + the name of the variable being displayed.
-             * The functions being called must be added to the file settings.lib.php.
-             */
-            case 'select':
-                $form->addElement('select', $row['variable'], array(get_lang($row['title']), get_lang($row['comment'])), call_user_func('select_'.$row['variable']), $hideme);
-                $default_values[$row['variable']] = $row['selected_value'];
-                break;
-
-            case 'custom_gradebook':
-            case 'custom':
-            	$values = api_get_settings_options($row['variable']);
-            	
-            	//$renderer = & $form->defaultRenderer();
-            	//$renderer->setElementTemplate('{label} - {element}<!-- BEGIN label_2 --><span class="help-block">{label_2}</span><!-- END label_2 -->');
-            	
-            	$numbers = array();
-            	for($j=1;$j<=20;$j++) {
-            		$numbers[$j] = $j;
-            	}
-            	
-            	if (!empty($values)) {            		
-            		foreach($values as $option) {
-            			$group = array();
-            			$id = $option['id'];            			            			
-            			$option_id = $row['variable']."[$id]";            			
-            			$group[] = $form->createElement('text', $option_id.'[display_text]', array(get_lang($row['title']), get_lang($row['comment'])),'class="begin_model"');
-            			
-            			$default_values[$option_id.'[display_text]'] = $option['display_text'];
-            			$parts = api_grading_model_functions($option['value'], 'to_array');            			
-            			$denominator = $parts['denominator'];            			
-            			$j = 1;            			
-            			foreach($parts['items'] as $item) {  
-            				$letter = $item['letter'];
-            				$value  = $item['value'];
-            				$group[] =$form->createElement('static','<div>');
-            				$class = 'number';
-            				if ($j == 1) {
-            					$class = 'first_number'; 
-            				}
-            				$group[] = $form->createElement('select', $option_id.'[items]['.$j.']', array('dd'), $numbers, array('class'=>$class));
-            				$sum = ' ';
-            				if ($j != count($parts['items'])) {
-            					$sum = ' + ';
-            				}
-            				//$group[] =$form->createElement('static',' * '.$letter.$sum);
-            				
-            				$default_values[$option_id.'[items]['.$j.']'] = $value;            				
-            				$j++;            				
-            			}
-            			
-            			$group[] = $form->createElement('select', $option_id.'[denominator]', array('/'), $numbers,'class="denominator"');            			
-            			$group[] = $form->createElement('button', "delete", get_lang('Delete'), array('type'=>'button', 'id'=>$id, 'onclick'=>"delete_grading_model('$id');"));
-            			
-            			$default_values[$option_id.'[denominator]'] = $denominator;
-            			$form->addGroup($group, '', get_lang($row['title']), ' ');
-            		}     		
-            	}
-            	
-            	//New Grading Model form
-            	$group = array();
-            	
-            	$group[] = $form->createElement('text',   'new_model', array(get_lang('AddNewModel')));            	
-            	$group[] = $form->createElement('select', 'number_evaluations', array(''), $numbers,''); 
-            	
-            	$form->addGroup($group, '', get_lang('AddNewModel'), "&nbsp;&nbsp;".get_lang('NumberOfSubEvaluations')."&nbsp;");
-            	
-            	$form->addElement('style_submit_button', null, get_lang('Add'), 'class="add"');
-            	
-            	
-            	break;
-            /*
-             * Used to display custom values for the gradebook score display
-             */
-            /* this configuration is moved now inside gradebook tool
-            case 'gradebook_score_display_custom':
-                if(api_get_setting('gradebook_score_display_custom', 'my_display_custom') == 'false') {
-                    $form->addElement('static', null, null, get_lang('GradebookActivateScoreDisplayCustom'));
-                } else {
-                    // Get score displays.
-                    require_once api_get_path(SYS_CODE_PATH).'gradebook/lib/scoredisplay.class.php';
-                    $scoredisplay = ScoreDisplay::instance();
-                    $customdisplays = $scoredisplay->get_custom_score_display_settings();
-                    $nr_items = (count($customdisplays)!='0') ? count($customdisplays) : '1';
-                    $form->addElement('hidden', 'gradebook_score_display_custom_values_maxvalue', '100');
-                    $form->addElement('hidden', 'gradebook_score_display_custom_values_minvalue', '0');
-                    $form->addElement('static', null, null, get_lang('ScoreInfo'));
-                    $scorenull[] = $form->CreateElement('static', null, null, get_lang('Between'));
-                    $form->setDefaults(array (
-                        'beginscore' => '0'
-                    ));
-                    $scorenull[] = $form->CreateElement('text', 'beginscore', null, array (
-                        'size' => 5,
-                        'maxlength' => 5,
-                        'disabled' => 'disabled'
-                    ));
-                    $scorenull[] = $form->CreateElement('static', null, null, ' %');
-                    $form->addGroup($scorenull, '', '', ' ');
-                    for ($counter= 1; $counter <= 20; $counter++) {
-                        $renderer = $form->defaultRenderer();
-                        $elementTemplateTwoLabel =
-                        '<div id=' . $counter . ' style="display: '.(($counter<=$nr_items)?'inline':'none').';">
-                        <p><!-- BEGIN required --><span class="form_required">*</span> <!-- END required -->{label}
-                        <div class="formw"><!-- BEGIN error --><span class="form_error">{error}</span><br /><!-- END error --> <b>'.get_lang('And').'</b>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp{element} % =';
-
-                        $elementTemplateTwoLabel2 =
-                        '<!-- BEGIN error --><span class="form_error">{error}</span><br /><!-- END error -->&nbsp{element}
-                        <a href="javascript:minItem(' . ($counter) . ')"><img style="display: '.(($counter >= $nr_items && $counter != 1) ? 'inline' : 'none').';" id="min-' . $counter . '" src="../img/gradebook_remove.gif" alt="'.get_lang('Delete').'" title="'.get_lang('Delete').'"></img></a>
-                        <a href="javascript:plusItem(' . ($counter+1) . ')"><img style="display: '.(($counter >= $nr_items) ? 'inline' : 'none').';" id="plus-' . ($counter+1) . '" src="../img/gradebook_add.gif" alt="'.get_lang('Add').'" title="'.get_lang('Add').'"></img></a>
-                        </div></p></div>';
-
-                        $scorebetw= array ();
-                        $form->addElement('text', 'gradebook_score_display_custom_values_endscore[' . $counter . ']', null, array (
-                            'size' => 5,
-                            'maxlength' => 5,
-                            'id' => 'txta-'.$counter
-                        ));
-                        $form->addElement('text', 'gradebook_score_display_custom_values_displaytext[' . $counter . ']', null,array (
-                            'size' => 40,
-                            'maxlength' => 40,
-                            'id' => 'txtb-'.$counter
-                        ));
-                        $renderer->setElementTemplate($elementTemplateTwoLabel,'gradebook_score_display_custom_values_endscore[' . $counter . ']');
-                        $renderer->setElementTemplate($elementTemplateTwoLabel2,'gradebook_score_display_custom_values_displaytext[' . $counter . ']');
-                        $form->addRule('gradebook_score_display_custom_values_endscore[' . $counter . ']', get_lang('OnlyNumbers'), 'numeric');
-                        $form->addRule(array('gradebook_score_display_custom_values_endscore[' . $counter . ']', 'gradebook_score_display_custom_values_maxvalue'), get_lang('Over100'), 'compare', '<=');
-                        $form->addRule(array('gradebook_score_display_custom_values_endscore[' . $counter . ']', 'gradebook_score_display_custom_values_minvalue'), get_lang('UnderMin'), 'compare', '>');
-                        if ($customdisplays[$counter - 1]) {
-                            $default_values['gradebook_score_display_custom_values_endscore['.$counter.']'] = $customdisplays[$counter - 1]['score'];
-                            $default_values['gradebook_score_display_custom_values_displaytext['.$counter.']'] = $customdisplays[$counter - 1]['display'];
-                        }
-                    }
-                }
-                break;
-                */
-        }        
-        
-        if ($row['variable'] == 'pdf_export_watermark_enable') {
-        	$url =  PDF::get_watermark($course_code);
-            $form->addElement('file', 'pdf_export_watermark_path', get_lang('AddWaterMark'));
-            if ($url != false) {                
-                $delete_url = '<a href="?delete_watermark">'.Display::return_icon('delete.png',get_lang('DelImage')).'</a>';
-                $form->addElement('html', '<a href="'.$url.'">'.$url.' '.$delete_url.'</a>');
-            }   
-            $allowed_picture_types = array ('jpg', 'jpeg', 'png', 'gif');
-            $form->addRule('pdf_export_watermark_path', get_lang('OnlyImagesAllowed').' ('.implode(',', $allowed_picture_types).')', 'filetype', $allowed_picture_types);    
+    if (isset($_GET['category']) && $_GET['category'] == 'search_setting') {  
+        if (!empty($_REQUEST['search_field'])) {
+            $settings = search_setting($_REQUEST['search_field']);                               
         }
-        
-        if ($row['variable'] == 'timezone_value') {
-            $timezone = $row['selected_value'];
-            if (empty($timezone)) {
-                $timezone = _api_get_timezone();
-            }
-            $form->addElement('html', sprintf(get_lang('LocalTimeUsingPortalTimezoneXIsY'), $timezone, api_get_local_time()));
-        }       	
     }
-
-    $form->addElement('html', '<div style="text-align: right; clear: both;">');
-    $form->addElement('style_submit_button', null, get_lang('SaveSettings'), 'class="save"');
-    $form->addElement('html', '</div>');
-
-    $form->setDefaults($default_values);    
-
+    
+    $form = generate_settings_form($settings, $settings_by_access_list);    
     $message = array();
-    if ($form->validate()) {
-        $values = $form->exportValues();
+    
+    if ($form->validate()) {       
+        $values = $form->exportValues();         
         $pdf_export_watermark_path = $_FILES['pdf_export_watermark_path'];
          
         if (isset($pdf_export_watermark_path) && !empty($pdf_export_watermark_path['name'])) {       
@@ -505,34 +165,33 @@ if (!empty($_GET['category']) && !in_array($_GET['category'], array('Plugins', '
 				$values[$item]        = round($values[$item]*1024*1024);
 			}
 		}
-		
-        /*$values['dropbox_max_filesize']        = $values['dropbox_max_filesize']*1024*1024;
-        $values['message_max_upload_filesize'] = $values['message_max_upload_filesize']*1024*1024;*/
-         
+		         
         if ($values['allow_social_tool'] == 'true') {
             $values['allow_message_tool'] = 'true';
         }
-        // quick patch to avoid gradebook_enable's value to be blanked
-        /*
-        if ($my_category == 'Gradebook') {
-            $gb = 'false';
-        	$gb = api_get_setting('gradebook_enable');
-        }*/
-
+        
+      
         // The first step is to set all the variables that have type=checkbox of the category
         // to false as the checkbox that is unchecked is not in the $_POST data and can
         // therefore not be set to false.
         // This, however, also means that if the process breaks on the third of five checkboxes, the others
         // will be set to false.
-        $r = api_set_settings_category($my_category, 'false', $_configuration['access_url'], array('checkbox', 'radio'));
-        // quick patch to avoid gradebook_enable's value to be blanked
-        if ($my_category == 'Gradebook') {
-            //api_set_setting('gradebook_enable', $gb, null, $my_category, $_configuration['access_url']);
+        
+        //$r = api_set_settings_category($my_category, 'false', $_configuration['access_url'], array('checkbox', 'radio'));
+        
+        
+        //This is amore accurate way of updating to false the checboxes and radios the settings
+        
+        foreach ($values as $key => $value) {          
+            if (in_array($key, $settings_to_avoid)) { continue; }            
+            $key = Database::escape_string($key);
+            $sql = "UPDATE $table_settings_current SET selected_value = 'false' WHERE variable = '".$key."' AND access_url = ".intval($_configuration['access_url'])."  AND type IN ('checkbox', 'radio') ";            
+            $res = Database::query($sql);            
         }
         
-        foreach($settings_to_avoid as $key => $value) {
+        /*foreach($settings_to_avoid as $key => $value) {
             api_set_setting($key, $value, null, null, $_configuration['access_url']);    
-        }
+        }*/
         
         // Save the settings.
         $keys = array();
@@ -685,7 +344,6 @@ $action_images['editor']        = 'html_editor.png';
 $action_images['timezones']     = 'timezone.png';
 $action_images['extra']     	= 'wizard.png';
 $action_images['tracking']     	= 'statistics.png';
-
 $action_images['gradebook2']    = 'gradebook.png';
 
 // Grabbing the categories.
@@ -701,6 +359,12 @@ echo "<a href=\"".api_get_self()."?category=Templates\">".Display::return_icon($
 echo "<a href=\"".api_get_self()."?category=Plugins\">".Display::return_icon($action_images['plugins'], api_ucfirst(get_lang('Plugins')),'',ICON_SIZE_MEDIUM)."</a>";
 echo "</div>";
 
+$form_search = new FormValidator('search_settings', 'get', api_get_self() , null, array('class'=>'vertical'));
+$form_search->addElement('text', 'search_field');
+$form_search->addElement('hidden', 'category', 'search_setting');
+$form_search->addElement('style_submit_button', 'submit_button', get_lang('Search'), 'value="submit_button", class="search"');         
+$form_search->setDefaults(array('search_field' => $_REQUEST['search_field']));
+$form_search->display();
 
 if ($watermark_deleted) {    
     Display :: display_normal_message(get_lang('FileDeleted'));
@@ -743,13 +407,18 @@ if (!empty($_GET['category'])) {
             // Displaying the extensions: Stylesheets.
             handle_stylesheets();
             break;
-
         case 'Search':
             handle_search();
             break;
         case 'Templates':
             handle_templates();
             break;
+        case 'search_setting':            
+            search_setting($_REQUEST['search_field']);
+            if (isset($_REQUEST['search_field'])) {                
+                $form->display();    
+            }            
+            break;
         default:
             $form->display();
     }

+ 1 - 1
main/admin/skills.php

@@ -17,7 +17,7 @@ $this_section = SECTION_PLATFORM_ADMIN;
 api_protect_admin_script();
 
 //Adds the JS needed to use the jqgrid
-$htmlHeadXtra[] = api_get_jquery_ui_js(true);
+$htmlHeadXtra[] = api_get_jqgrid_js();
 $htmlHeadXtra[] = api_get_js('jquery.jsPlumb.all.js');
 $htmlHeadXtra[] = api_get_js('skills.js');
 

+ 1 - 1
main/admin/skills_gradebook.php

@@ -17,7 +17,7 @@ $this_section = SECTION_PLATFORM_ADMIN;
 
 api_protect_admin_script();
 //Adds the JS needed to use the jqgrid
-$htmlHeadXtra[] = api_get_jquery_ui_js(true);
+$htmlHeadXtra[] = api_get_jqgrid_js();
 
 $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'display';
 

+ 0 - 1
main/admin/skills_profile.php

@@ -17,7 +17,6 @@ api_protect_admin_script();
 
 $htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/jquery.fcbkcomplete.js" type="text/javascript" language="javascript"></script>';
 $htmlHeadXtra[] = '<link  href="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/style.css" rel="stylesheet" type="text/css" />';
-$htmlHeadXtra[] = api_get_jquery_ui_js();
 
 $interbreadcrumb[] = array('url' => 'index.php',"name" => get_lang('PlatformAdmin'));
 

+ 1 - 1
main/admin/specific_fields.php

@@ -17,7 +17,7 @@ api_protect_admin_script();
 
 // Breadcrumb
 $interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
-$interbreadcrumb[] = array ('url' => 'settings.php?category=Search', 'name' => get_lang('DokeosConfigSettings'));
+$interbreadcrumb[] = array ('url' => 'settings.php?category=Search', 'name' => get_lang('PlatformConfigSettings'));
 $interbreadcrumb[] = array ('url' => 'specific_fields.php', 'name' => get_lang('SpecificSearchFields'));
 
 $libpath = api_get_path(LIBRARY_PATH);

+ 1 - 1
main/admin/specific_fields_add.php

@@ -29,7 +29,7 @@ $table_uf_opt = Database :: get_main_table(TABLE_MAIN_USER_FIELD_OPTIONS);
 $table_uf_val = Database :: get_main_table(TABLE_MAIN_USER_FIELD_VALUES);
 
 $interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
-$interbreadcrumb[] = array ('url' => 'settings.php?category=Search', 'name' => get_lang('DokeosConfigSettings'));
+$interbreadcrumb[] = array ('url' => 'settings.php?category=Search', 'name' => get_lang('PlatformConfigSettings'));
 $interbreadcrumb[] = array ('url' => 'specific_fields.php', 'name' => get_lang('SpecificSearchFields'));
 if ($_GET['action']<>'edit') {
   $tool_name = get_lang('AddSpecificSearchField');

+ 97 - 119
main/admin/user_list.php

@@ -10,27 +10,27 @@
 $language_file = array ('registration','admin');
 $cidReset = true;
 require_once '../inc/global.inc.php';
-require_once api_get_path(LIBRARY_PATH).'xajax/xajax.inc.php';
+require_once api_get_path(LIBRARY_PATH).'urlmanager.lib.php';            
 
 global $_configuration;
+
+$current_access_url_id = api_get_current_access_url_id();
+
 // Blocks the possibility to delete a user
 $delete_user_available = true;
 if (isset($_configuration['deny_delete_users']) &&  $_configuration['deny_delete_users']) {
 	$delete_user_available = false;
 }
-
-$iam_a_global_admin = api_is_global_platform_admin(); 
-
-$htmlHeadXtra[] = api_get_jquery_ui_js();
-
+$url = api_get_path(WEB_AJAX_PATH).'course.ajax.php?a=get_user_courses';
+        
 $htmlHeadXtra[] = '<script type="text/javascript">
 function load_course_list (div_course,my_user_id) {
 	 $.ajax({
 		contentType: "application/x-www-form-urlencoded",
 		beforeSend: function(objeto) {
-		$("div#"+div_course).html("<img src=\'../inc/lib/javascript/indicator.gif\' />"); },
+            $("div#"+div_course).html("<img src=\'../inc/lib/javascript/indicator.gif\' />"); },
 		type: "POST",
-		url: "course_user_list.php",
+		url: "'.$url.'",
 		data: "user_id="+my_user_id,
 		success: function(datos) {
 			$("div#"+div_course).html(datos);
@@ -133,98 +133,9 @@ function load_calendar(user_id, month, year) {
 	$("#dialog").load( url    	 	
 	);    	
 }
-    
-
 </script>';
-$htmlHeadXtra[] = '<style type="text/css" media="screen, projection">
-.blackboard_show {
-	float:left;
-	position:absolute;
-	border:1px solid black;
-	width: 200px;
-	background-color:white;
-	z-index:99; padding: 3px;
-	display: inline;
-}
-.blackboard_hide {
-	display: none;
-}
-</style>';
-
-// xajax
-$xajax = new xajax();
-$xajax->registerFunction('courses_of_user');
-//$xajax->registerFunction('empty_courses_of_user');
-$xajax->processRequests();
-
-/**
- * Get a formatted list of courses for given user
- * @param   int     User ID
- * @return  resource    XAJAX response
- */
-function courses_of_user($arg) {
-	// do some stuff based on $arg like query data from a database and
-	// put it into a variable like $newContent
-    //$newContent = 'werkt het? en met een beetje meer text, wordt dat goed opgelost? ';
-    $personal_course_list = UserManager::get_personal_session_course_list($arg);
-    $newContent = '';
-    if(count($personal_course_list)>0) {
-	    foreach ($personal_course_list as $key=>$course) {
-	    	$newContent .= $course['i'].'<br />';
-	    }
-    } else {
-    	$newContent .= '- '.get_lang('None').' -<br />';
-    }
-    $newContent = api_convert_encoding($newContent,'utf-8',api_get_system_encoding());
-
-	// Instantiate the xajaxResponse object
-	$objResponse = new xajaxResponse();
-
-	// add a command to the response to assign the innerHTML attribute of
-	// the element with id="SomeElementId" to whatever the new content is
-	$objResponse->addAssign("user".$arg,"innerHTML", $newContent);
-	$objResponse->addReplace("coursesofuser".$arg,"alt", $newContent);
-	$objResponse->addReplace("coursesofuser".$arg,"title", $newContent);
-
-	$objResponse->addAssign("user".$arg,"style.display", "block");
-
-	//return the  xajaxResponse object
-	return $objResponse;
-}
-/**
- * Empties the XAJAX object representing the courses list
- * @param   int     User ID
- * @return  resource    XAJAX object
- */
-function empty_courses_of_user($arg)
-{
-	// do some stuff based on $arg like query data from a database and
-	// put it into a variable like $newContent
-    $newContent = '';
-	// Instantiate the xajaxResponse object
-	$objResponse = new xajaxResponse();
-	// add a command to the response to assign the innerHTML attribute of
-	// the element with id="SomeElementId" to whatever the new content is
-	$objResponse->addAssign("user".$arg,"innerHTML", $newContent);
-
-
-	//return the  xajaxResponse object
-	return $objResponse;
-}
-
-
-$htmlHeadXtra[] = $xajax->getJavascript('../inc/lib/xajax/');
-$htmlHeadXtra[] = '<style>
-.tooltipLinkInner {
-	position:relative;
-	float:left;
-	color:blue;
-	text-decoration:none;
-}
-</style>';
 
 $this_section = SECTION_PLATFORM_ADMIN;
-
 api_protect_admin_script(true);
 
 /**
@@ -356,14 +267,14 @@ function get_number_of_users() {
     	$sql.= " INNER JOIN $access_url_rel_user_table url_rel_user ON (u.user_id=url_rel_user.user_id)";
     }
 
-        if (isset($_GET['keyword_extra_data'])) {
-            $keyword_extra_data = Database::escape_string($_GET['keyword_extra_data']);
-            if (!empty($keyword_extra_data)) {
-                $extra_info = UserManager::get_extra_field_information_by_name($keyword_extra_data);
-                $field_id = $extra_info['id'];
-                $sql.= " INNER JOIN user_field_values ufv ON u.user_id=ufv.user_id AND ufv.field_id=$field_id ";
-            }
+    if (isset($_GET['keyword_extra_data'])) {
+        $keyword_extra_data = Database::escape_string($_GET['keyword_extra_data']);
+        if (!empty($keyword_extra_data)) {
+            $extra_info = UserManager::get_extra_field_information_by_name($keyword_extra_data);
+            $field_id = $extra_info['id'];
+            $sql.= " INNER JOIN user_field_values ufv ON u.user_id=ufv.user_id AND ufv.field_id=$field_id ";
         }
+    }
 
 	if ( isset ($_GET['keyword'])) {
 		$keyword = Database::escape_string(trim($_GET['keyword']));
@@ -576,7 +487,7 @@ function user_filter($name, $params, $row) {
  * @return string Some HTML-code with modify-buttons
  */
 function modify_filter($user_id, $url_params, $row) {
-	global $charset, $_user, $_admins_list, $delete_user_available, $iam_a_global_admin;
+	global $charset, $_user, $_admins_list, $delete_user_available;
     
 	$is_admin   = in_array($user_id,$_admins_list);
 	$statusname = api_get_status_langvars();
@@ -586,8 +497,8 @@ function modify_filter($user_id, $url_params, $row) {
 	}
 	$result = '';
 	if (!$user_is_anonymous) {
-		$result .= '<a  href="javascript:void(0)" onclick="load_course_list(\'div_'.$user_id.'\','.$user_id.')">
-					<img onclick="load_course_list(\'div_'.$user_id.'\','.$user_id.')" onmouseout="clear_course_list (\'div_'.$user_id.'\')" src="../img/course.gif" title="'.get_lang('Courses').'" alt="'.get_lang('Courses').'"/>
+		$result .= '<a href="javascript:void(0)" onclick="load_course_list(\'div_'.$user_id.'\','.$user_id.')" >
+					<img onmouseout="clear_course_list (\'div_'.$user_id.'\')" src="../img/course.gif" title="'.get_lang('Courses').'" alt="'.get_lang('Courses').'"/>
 					<div class="blackboard_hide" id="div_'.$user_id.'">&nbsp;&nbsp;</div>
 					</a>&nbsp;&nbsp;';
 	} else {
@@ -717,13 +628,7 @@ function status_filter($status) {
 
 /**	INIT SECTION  */
 
-$action = $_GET["action"];
-$login_as_user_id = $_GET["user_id"];
-
-// Login as ...
-if ($_GET['action'] == "login_as" && isset ($login_as_user_id)) {
-	login_user($login_as_user_id);
-}
+$action = isset($_REQUEST["action"]) ? $_REQUEST["action"] : null;
 
 if (isset($_GET['keyword']) || isset($_GET['keyword_firstname'])) {
     $interbreadcrumb[] = array ("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
@@ -736,10 +641,25 @@ if (isset($_GET['keyword']) || isset($_GET['keyword_firstname'])) {
 
 $message = '';
 
-if (isset ($_GET['action'])) {
-	$check = Security::check_token('get');
+if (!empty($action)) {
+	$check = Security::check_token('get');    
 	if ($check) {
-		switch ($_GET['action']) {
+		switch ($action) {
+            case 'add_user_to_my_url':
+                $user_id = $_REQUEST["user_id"];
+                $result = UrlManager::add_user_to_url($user_id, $current_access_url_id);
+                if ($result ) {
+                    $user_info = api_get_user_info($user_id);
+                    $message = get_lang('UserAdded').' '.$user_info['firstname'].' '.$user_info['lastname'].' ('.$user_info['username'].')';
+                    $message  = Display::return_message($message, 'confirmation');
+                }                
+                break;
+            case 'login_as':
+                $login_as_user_id = $_GET["user_id"];
+                if (isset ($login_as_user_id)) {
+                    login_user($login_as_user_id);
+                }
+                break;
 			case 'show_message' :
                 if (!empty($_GET['warn'])) {
                 	// to prevent too long messages
@@ -917,6 +837,7 @@ $form->addElement('html', '</td></tr>');
 
 $form->addElement('html', '</table>');
 
+$defaults = array();
 $defaults['keyword_active'] = 1;
 $defaults['keyword_inactive'] = 1;
 $form->setDefaults($defaults);
@@ -952,12 +873,69 @@ $table->set_column_filter(9, 'modify_filter');
 
 if (api_is_platform_admin())
 	$table->set_form_actions(array ('delete' => get_lang('DeleteFromPlatform')));
-$table = $table->return_table();
+$table_result = $table->return_table();
 
+/* */
+
+$extra_search_options = '';
+//Try to search the user everywhere
+if ($table->get_total_number_of_items() ==0) {
+    
+    if (api_get_multiple_access_url() && isset($_REQUEST['keyword'])) {        
+        $keyword = Database::escape_string($_REQUEST['keyword']);
+        $conditions = array('firstname' => $keyword, 'lastname' => $keyword, 'username' => $keyword);
+        $user_list = UserManager::get_user_list_like($conditions, array(), false, ' OR ');        
+        if (!empty($user_list)) {
+            
+            $extra_search_options = '<h3>'.get_lang('UsersFoundInOtherPortals').'</h3>';
+            
+            $table = new HTML_Table(array('class' => 'data_table'));
+            $column = 0;
+            $row = 0;            
+            $headers = array(get_lang('User'), 'URL', get_lang('Actions'));
+            foreach ($headers as $header) {
+                $table->setHeaderContents($row, $column, $header);
+                $column++;
+            }
+            $row++;
+            $column=0;
+            
+            foreach($user_list as $user) {      
+                $access_info = UrlManager::get_access_url_from_user($user['user_id']);
+                $access_info_to_string = '';
+                $add_user = true;
+                if (!empty($access_info)) {
+                    foreach ($access_info as $url_info) {
+                        if ($current_access_url_id == $url_info['access_url_id']) {
+                            $add_user = false;                            
+                        }
+                        $access_info_to_string .= $url_info['url'].' ';
+                    }
+                }
+                if ($add_user) {                    
+                    $row_table[] =  api_get_person_name($user['firstname'], $user['lastname']).' ('.$user['username'].') ';
+                    $row_table[] =  $access_info_to_string;
+                    $url = api_get_self().'?action=add_user_to_my_url&user_id='.$user['user_id'].'&sec_token='.$_SESSION['sec_token'];
+                    $row_table[] =  Display::url(get_lang('AddUserToMyURL'), $url);
+                    	
+                    foreach ($row_table as $cell) {
+                        $table->setCellContents($row, $column, $cell);
+                        $table->updateCellAttributes($row, $column, 'align="center"');
+                        $column++;
+                    }
+                    $table->updateRowAttributes($row, $row % 2 ? 'class="row_even"' : 'class="row_odd"', true);
+                    $row++;
+                }
+            }
+            $extra_search_options .= $table->toHtml();
+            $table_result = '';
+        }
+    }    
+}
 
 $tpl = new Template($tool_name);
 
 $tpl->assign('actions', $actions);
 $tpl->assign('message', $message);
-$tpl->assign('content', $form.$table);
+$tpl->assign('content', $form.$table_result.$extra_search_options);
 $tpl->display_one_col_template();

+ 1 - 3
main/admin/usergroups.php

@@ -13,12 +13,10 @@ require_once '../inc/global.inc.php';
 require_once api_get_path(LIBRARY_PATH).'usergroup.lib.php';
 
 $this_section = SECTION_PLATFORM_ADMIN;
-
 api_protect_admin_script();
 
-
 //Add the JS needed to use the jqgrid
-$htmlHeadXtra[] = api_get_jquery_ui_js(true);
+$htmlHeadXtra[] = api_get_jqgrid_js();
 // setting breadcrumbs
 $interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
 $action = $_GET['action'];

+ 1 - 3
main/auth/courses.php

@@ -22,11 +22,9 @@ require_once 'courses_controller.php';
 require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
 
 if (api_get_setting('show_courses_descriptions_in_catalog') == 'true') {
-
-	$htmlHeadXtra[] = api_get_jquery_ui_js();
     $htmlHeadXtra[] = '
     <script type="text/javascript">
-    	$(document).ready(function() {    
+    	$(document).ready(function() {
 	        $(\'.ajax\').live(\'click\', function() {
 	            var url     = this.href;
 	            var dialog  = $("#dialog");

+ 4 - 20
main/auth/inscription.php

@@ -11,8 +11,6 @@ if (!empty($_POST['language'])) { //quick hack to adapt the registration form re
     $_GET['language'] = $_POST['language'];
 }
 require_once '../inc/global.inc.php';
-require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php';
-require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php';
 require_once api_get_path(CONFIGURATION_PATH).'profile.conf.php';
 require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
 require_once api_get_path(LIBRARY_PATH).'legal.lib.php';
@@ -237,9 +235,9 @@ if ($display_all_form) {
                 break;
         }
     }
-
 }
-$form->addElement('style_submit_button', 'submit', get_lang('RegisterUser'), 'class="save"');
+
+$form->addElement('style_submit_button', 'submit', get_lang('RegisterUser'), 'class="btn"');
 
 if (isset($_SESSION['user_language_choice']) && $_SESSION['user_language_choice'] != '') {
     $defaults['language'] = $_SESSION['user_language_choice'];
@@ -301,8 +299,7 @@ if (api_get_setting('use_custom_pages') != 'true') {
 
   $tool_name = get_lang('Registration',null,(!empty($_POST['language'])?$_POST['language']:$_user['language']));
   Display :: display_header($tool_name);
-
-  echo Display::tag('h1', $tool_name);
+  $form->addElement('header', $tool_name);
 
   $home = api_get_path(SYS_PATH).'home/';
   if ($_configuration['multiple_access_urls']) {
@@ -610,17 +607,4 @@ if ($form->validate()) {
     $form->display();
   }
 }
-?>
-<br />
-<?php
-if (!isset($_POST['username'])) {
-/*    
-    <div class="actions">
-<a href="<?php echo api_get_path(WEB_PATH); ?>" class="fake_button_back" ><?php echo get_lang('Back'); ?></a>
-</div>
-*/
-?>
-
-<?php
-}
-Display :: display_footer();
+Display :: display_footer();

+ 2 - 2
main/auth/lostPassword.php

@@ -99,11 +99,11 @@ if (isset ($_GET['reset']) && isset ($_GET['id'])) {
 	echo '<br /><br /><div class="actions" >'.$msg1.'</div>';
 } else {
 	$form = new FormValidator('lost_password');
-    $form->addElement('header', '', $tool_name);
+    $form->addElement('header', $tool_name);
 	$form->addElement('text', 'user', array(get_lang('LoginOrEmailAddress'), get_lang('EnterEmailUserAndWellSendYouPassword')), array('size'=>'40'));
 
 	//$form->applyFilter('email','strtolower');
-	$form->addElement('style_submit_button', 'submit', get_lang('Send'),'class="a_button gray"');
+	$form->addElement('style_submit_button', 'submit', get_lang('Send'),'class="btn"');
 
 	// setting the rules
 	$form->addRule('user', get_lang('ThisFieldIsRequired'), 'required');

+ 46 - 3
main/auth/my_progress.php

@@ -22,10 +22,14 @@ $nameTools = get_lang('MyProgress');
 
 api_block_anonymous_users();
 
-$htmlHeadXtra[] = api_get_jquery_ui_js();
+$htmlHeadXtra[] = api_get_js('jquery.timelinr-0.9.5.js');
+
 $htmlHeadXtra[] = '
 <script language="javascript">
 $(function() {
+    
+    $().timelinr();
+
     $(".dialog").dialog("destroy");        
     $(".dialog").dialog({
             autoOpen: false,
@@ -45,16 +49,55 @@ $(function() {
 });
 </script>';
 
-$content = Tracking::show_user_progress(api_get_user_id());
+
+
+require_once api_get_path(SYS_CODE_PATH).'mySpace/myspace.lib.php';
+
+
+
+$user_id = api_get_user_id();
+
+// Code to 
+$course_user_list = CourseManager::get_courses_list_by_user_id($user_id);
+$dates = $issues = '';
+foreach($course_user_list as $course) {    
+    $items = MySpace::get_connections_to_course($user_id, $course['code']);
+    foreach($items as $result) {
+        $login = $result['login']; 
+        $course_info = api_get_course_info($course['code']);
+        $course_image = '<img src="'.$course_info['course_image'].'">';
+        $dates .= '<li><a href="#'.$login.'">'.  api_get_utc_datetime($login).'</a></li>';
+        $issues .= '<li id ="'.$login.'"><div class="row"><div class="span1">'.$course_image.'</div>
+                <div class="span3">Has ingresado al curso <b>'.$course['code'].'</b> el
+            '.  api_convert_and_format_date($login, DATE_FORMAT_LONG).'</div></li>';
+    }    
+}
+
+$content .= Tracking::show_user_progress(api_get_user_id());
 if (!empty($content)) {
     $content .= '<br /><br />';
 }
+$content .= '<div class="span12"><h2>'.get_lang('Timeline').'</h2></span>';
+
+$content .= '<div id="timeline">
+   <ul id="dates">
+    '.$dates.'  
+    </ul>
+   <ul id="issues">
+      '.$issues.'
+   </ul>
+   <a href="#" id="next">+</a> <!-- optional -->
+   <a href="#" id="prev">-</a> <!-- optional -->
+   </div>';
+
 $content .= Tracking::show_course_detail(api_get_user_id(), $_GET['course'], $_GET['session_id']);
 
 if (empty($content)) {
     $message = Display::return_message(get_lang('NoDataAvailable'), 'warning');
 }
-    
+
+
+
 $tpl = new Template($tool_name);
 
 //$tpl->assign('actions', $actions);

+ 7 - 10
main/auth/profile.php

@@ -31,8 +31,6 @@ if (!(isset($_user['user_id']) && $_user['user_id']) || api_is_anonymous($_user[
     api_not_allowed(true);
 }
 
-//jquery thickbox already called from main/inc/header.inc.php
-
 $htmlHeadXtra[] = '<script src="../inc/lib/javascript/tag/jquery.fcbkcomplete.js" type="text/javascript" language="javascript"></script>';
 $htmlHeadXtra[] = '<link href="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/style.css" rel="stylesheet" type="text/css" />';
 
@@ -790,19 +788,18 @@ if (api_get_setting('allow_social_tool') != 'true') {
 		echo '<div class="actions">';
 
 		if (api_get_setting('allow_social_tool') == 'true' && api_get_setting('allow_message_tool') == 'true') {
-			echo '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.Display::return_icon('shared_profile.png', get_lang('ViewSharedProfile')).'&nbsp;'.get_lang('ViewSharedProfile').'</a>';
+			echo '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.Display::return_icon('shared_profile.png', get_lang('ViewSharedProfile')).'</a>';
 		}
 		if (api_get_setting('allow_message_tool') == 'true') {
-			echo '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.Display::return_icon('inbox.png').' '.get_lang('Messages').'</a>';
+			echo '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.Display::return_icon('inbox.png', get_lang('Messages')).'</a>';
 		}
 		$show = isset($_GET['show']) ? '&amp;show='.Security::remove_XSS($_GET['show']) : '';
 
 		if (isset($_GET['type']) && $_GET['type'] == 'extended') {
-			echo '<a href="profile.php?type=reduced'.$show.'">'.Display::return_icon('edit.png', get_lang('EditNormalProfile'),'',16).'&nbsp;'.get_lang('EditNormalProfile').'</a>';
+			echo '<a href="profile.php?type=reduced'.$show.'">'.Display::return_icon('edit.png', get_lang('EditNormalProfile'),'',16).'</a>';
 		} else {
-			echo '<a href="profile.php?type=extended'.$show.'">'.Display::return_icon('edit.png', get_lang('EditExtendProfile'),'',16).'&nbsp;'.get_lang('EditExtendProfile').'</a>';
+			echo '<a href="profile.php?type=extended'.$show.'">'.Display::return_icon('edit.png', get_lang('EditExtendProfile'),'',16).'</a>';
 		}
-
 		echo '</div>';
 	}
 }
@@ -862,11 +859,11 @@ $big_image_height   = $big_image_size['height'];
 $url_big_image      = $big_image.'?rnd='.time();
 
 if (api_get_setting('allow_social_tool') == 'true') {
-	echo '<div id="social-content">';
-		echo '<div id="social-content-left">';
+	echo '<div class="row-fluid">';
+		echo '<div class="span3">';
 		echo SocialManager::show_social_menu('home', null, api_get_user_id(), false);
 		echo '</div>';
-		echo '<div id="social-content-right">';
+		echo '<div class="span9">';
         $form->display();			
 	echo '</div>';
 } else {

+ 0 - 1
main/calendar/agenda.php

@@ -103,7 +103,6 @@ if (!empty($_GET['isStudentView']) and $_GET['isStudentView']=="false") {
 	api_session_unregister("group");
 }*/
 
-$htmlHeadXtra[] = api_get_jquery_ui_js();
 $htmlHeadXtra[] = to_javascript();
 $htmlHeadXtra[] = user_group_filter_javascript();
 

+ 0 - 4
main/calendar/myagenda.php

@@ -28,12 +28,8 @@ if (!empty ($course_path)) {
 	$interbreadcrumb[] = array ('url' => api_get_path(WEB_COURSE_PATH).urlencode($course_path).'/index.php', 'name' => Security::remove_XSS($_GET['courseCode']));
 }
 // this loads the javascript that is needed for the date popup selection
-$htmlHeadXtra[] = api_get_jquery_ui_js();
 $htmlHeadXtra[] = to_javascript();
-
 $htmlHeadXtra[] = "<script src=\"tbl_change.js\" type=\"text/javascript\" language=\"javascript\"></script>";
-
-
 $htmlHeadXtra[] = "<script>
 $(function() {  
     $(\".dialog\").dialog(\"destroy\");        

+ 20 - 19
main/course_home/activity.php

@@ -87,38 +87,34 @@ if (api_is_allowed_to_edit(null, true) && !api_is_coach()) {
         </div>';
 	}
 
-	$content .= '<div class="courseadminview"><span class="viewcaption">'.get_lang('Authoring').'</span>';
     $my_list = CourseHome::get_tools_category(TOOL_AUTHORING);    
-	$content .= CourseHome::show_tools_category($my_list).'</div>';
-    
-	$content .= '<div class="courseadminview"><span class="viewcaption">'.get_lang('Interaction').'</span>';
-
+	$items = CourseHome::show_tools_category($my_list);    
+    $content .= return_block(get_lang('Authoring'),  $items);    
+	
     $my_list = CourseHome::get_tools_category(TOOL_INTERACTION);
     $list2 = CourseHome::get_tools_category(TOOL_COURSE_PLUGIN);
     $my_list = array_merge($my_list,$list2);
-    $content .= CourseHome::show_tools_category($my_list);
-	$content .= '</div>
+    $items =  CourseHome::show_tools_category($my_list);
+	
+    $content .= return_block(get_lang('Interaction'),  $items);
+        
+	
+    $my_list = CourseHome::get_tools_category(TOOL_ADMIN_PLATFORM);
+    $items = CourseHome::show_tools_category($my_list);	
         
-	<div class="courseadminview"><span class="viewcaption">'.get_lang('Administration').'</span>';
-        $theme = api_get_setting('homepage_view');
-        $rows = false;
-        if ($theme  == 'activity_big') {
-            $rows = 4;
-        }
-        $my_list = CourseHome::get_tools_category(TOOL_ADMIN_PLATFORM);
-        $content .= CourseHome::show_tools_category($my_list, $rows);
-	$content .=  '</div>';
+    $content .= return_block(get_lang('Administration'),  $items);
+    
 } elseif (api_is_coach()) {
 	if (api_get_setting('show_session_data') == 'true' && $id_session > 0) {
 
-		$content .= '<div class="courseadminview">
+		$content .= '<div class="row">
 			<span class="viewcaption">'.get_lang('SessionData').'</span>
 			<table class="course_activity_home">';
 				$content .= CourseHome::show_session_data($id_session);
              $content .=  '</table></div>';
 	}
 
-    $content .=  '<div class="Authoringview">';
+    $content .=  '<div class="row">';
 				$my_list = CourseHome::get_tools_category(TOOL_STUDENT_VIEW);
 				$content .= CourseHome::show_tools_category($my_list);
     $content .= '</div>';
@@ -127,8 +123,13 @@ if (api_is_allowed_to_edit(null, true) && !api_is_coach()) {
 } else {
 	$my_list = CourseHome::get_tools_category(TOOL_STUDENT_VIEW);
 	if (count($my_list) > 0) {
-        $content .= '<div class="Authoringview">';
+        $content .= '<div class="row">';
         $content .= CourseHome::show_tools_category($my_list);
         $content .= '</div>'; 
 	}
 }
+
+function return_block($title, $content) {    
+    $html = '<div class="row"><div class="span12"><div class="page-header"><h3>'.$title.'</h3></div></div></div><div class="row">'.$content.'</div>';
+    return $html;
+}

+ 2 - 1
main/course_home/course_home.php

@@ -278,8 +278,9 @@ if (api_get_setting('homepage_view') == 'activity' || api_get_setting('homepage_
 	require 'vertical_activity.php';
 }
 
+$content = '<div id="course_tools">'.$content.'</div>';
 $tpl = new Template($tool_name);
 $tpl->assign('actions', $actions);
 $tpl->assign('message', $show_message);
 $tpl->assign('content', $content);
-$tpl->display_one_col_template();
+$tpl->display_one_col_template();

+ 0 - 2
main/course_info/infocours.php

@@ -476,8 +476,6 @@ if ($form->validate() && is_settings_editable()) {
 
 /*	Header */
 
-$htmlHeadXtra[] = api_get_jquery_ui_js();
-
 Display :: display_header($nameTools, MODULE_HELP_NAME);
 if ($show_delete_watermark_text_message) {
     Display :: display_normal_message(get_lang('FileDeleted'));

+ 0 - 3
main/course_progress/index.php

@@ -75,11 +75,8 @@ if (!empty($thematic_id)) {
 // get default thematic plan title
 $default_thematic_plan_title = $thematic->get_default_thematic_plan_title();
 
-$htmlHeadXtra[] = api_get_jquery_ui_js();
-
 // Only when I see the 3 columns. Avoids double or triple click binding for onclick event 
  
-	
 $htmlHeadXtra[] = '<script type="text/javascript">
 	
 $(document).ready(function() {

+ 3 - 3
main/create_course/add_course.php

@@ -124,15 +124,15 @@ $titular = & $form->add_textfield('tutor_name', array(get_lang('Professor'), nul
 if ($course_validation_feature) {
 
     // Description of the requested course.
-    $form->addElement('textarea', 'description', get_lang('Description'), array('style' => 'border:#A5ACB2 solid 1px; font-family:arial,verdana,helvetica,sans-serif; font-size:12px', 'rows' => '3', 'cols' => '116'));
+    $form->addElement('textarea', 'description', get_lang('Description'), array('class' => 'span6', 'rows' => '3'));
     //$form->addRule('description', get_lang('ThisFieldIsRequired'), 'required');
 
     // Objectives of the requested course.
-    $form->addElement('textarea', 'objetives', get_lang('Objectives'), array('style' => 'border:#A5ACB2 solid 1px; font-family:arial,verdana,helvetica,sans-serif; font-size:12px', 'rows' => '3', 'cols' => '116'));
+    $form->addElement('textarea', 'objetives', get_lang('Objectives'), array('class' => 'span6', 'rows' => '3'));
     //$form->addRule('objetives', get_lang('ThisFieldIsRequired'), 'required');
 
     // Target audience of the requested course.
-    $form->addElement('textarea', 'target_audience', get_lang('TargetAudience'), array('style' => 'border:#A5ACB2 solid 1px; font-family:arial,verdana,helvetica,sans-serif; font-size:12px', 'rows' => '3', 'cols' => '116'));
+    $form->addElement('textarea', 'target_audience', get_lang('TargetAudience'), array('class' => 'span6', 'rows' => '3'));
     //$form->addRule('target_audience', get_lang('ThisFieldIsRequired'), 'required');
 }
 

+ 4 - 109
main/css/academica/default.css

@@ -22,10 +22,7 @@ body {
 	min-height: 100%;
 	height: auto !important;
 	height: 100%;
-	margin: 0 auto -22em;
-}
-input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
-	background-image:url(images/shadow.gif);
+	margin: 0 auto -9em;
 }
 img {
 	border: none;
@@ -46,70 +43,11 @@ a:hover {
 }
 a:active {
 }
-input, input[type=file], select, textarea {
-	border:1px solid #4171b5;
-	padding:1px 2px;
-}
-input[type=button], input[type=submit] {
-	border:1px solid #4171b5;
-	background:#F0F0F0;
-	padding-left:10px;
-	padding-right:10px;
-	font-weight:bold;
-	color:#4171b5;
-}
-/* header 1 styles */
-#header {
-	background-color: #4171b5;
-	color: #b0c8eb;
-	font-weight: bold;
-}
-#header1 {
-	padding:  0.2em 0.5em;
-	height:35px;
-}
-#header1 a {
-	color: #d6e3f5;
-	text-decoration: none;
-}
-#header1 a:hover {
-}
+
 #my_courses {
 	float: right;
 	font-weight: bold;
 }
-#header1 img {
-	border: 0px;
-}
-/* header 2 styles */
-#header2 {
-	position: relative; /* to avoid the IE peekabo bug*/
-	font-size: 1.0em;
-	font-weight: normal;
-	min-height:25px;
-	padding:  0.2em 0.5em;
-	padding-bottom: 0.2em;
-}
-#header2 a {
-	color: #d6e3f5;
-	text-decoration: none;
-}
-#header2 a:hover {
-}
-#Header2Right ul {
-	float: right;
-	list-style-type: none;
-	text-align: right;
-	margin: 0;
-	padding: 0;
-}
-#Header2Right ul li {
-	display: inline;
-}
-#Header2Right ul li a {
-}
-#Header2Right ul li a:hover {
-}
 /* header 3 styles */
 #header3 {
 	border-bottom: 1px solid #aeaeae;	
@@ -167,22 +105,6 @@ input[type=button], input[type=submit] {
 	float:left;
 }
 
-#header3 #logout {
-	margin-top: 0px;
-}
-#logout {
-	display: inline;
-	float: right;
-	width: auto;
-	text-align: right;
-	font-size: 1.0em;
-}
-
-/* header 4 styles */
-#header4 {
-    width:100%;
-	background-color: #fff;	
-}
 /* The tool shortcuts */
 #toolshortcuts {
 	text-align: right;
@@ -199,42 +121,15 @@ input[type=button], input[type=submit] {
 	background-repeat:repeat-x;
 	color: #B0C8EB;
 	font-weight:bold;
-	min-height: 100px;	
 	overflow:hidden;
 	width: 100%;
 	padding-bottom:10px;
 }
-.footer_emails{
-	float: left;
-	margin-right:5%;
-	padding-top:40px;
-	padding-top:235px;	
-}
 
 .push {
-	height: 22em; /* Very important */
-}
-#footer .copyright {
-	float: right;
-	padding-top:290px;
-	margin-right:10px;
-}
-#footer #platformmanager {
-	float: left;
-	margin-left:10px;
-}
-#footer #coursemanager {
-	float: left;
-	margin-left: 10px;
-}
-#footerright {
-	margin-top: 10px;
-	float: right;
-	margin-right:20px;
-}
-#footerleft {
-	padding-top: 10px;
+	height: 9em; /* Very important */
 }
+
 #footer a {
 	color: #fff;
 }

BIN
main/css/academica/images/bg.jpg


+ 6 - 119
main/css/baby_orange/default.css

@@ -24,10 +24,7 @@ body {
 	min-height: 100%;
 	height: auto !important;
 	height: 100%;
-	margin: 0 auto -26em;
-}
-input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
-	background-image:url(images/shadow.gif);
+	margin: 0 auto -9em;
 }
 img {
 	border: none;
@@ -48,67 +45,12 @@ a:hover {
 }
 a:active {
 }
-input, input[type=file], select, textarea {
-	border:1px solid #EE4C03;
-	padding:1px 2px;
-}
-input[type=button], input[type=submit] {
-	border:1px solid #EE4C03;
-	background:#F0F0F0;
-	padding-left:10px;
-	padding-right:10px;
-	font-weight:bold;
-	color:#EE4C03;
-}
-/* header 1 styles */
-#header {
-	background: transparent url('images/bgheader.jpg') repeat-y top right;
-	font-weight: bold;
-}
-#header1 {
-	padding:  0.2em 0.5em;
-	height:35px;
-}
-#header1 a {
-	text-decoration: none;
-}
-#header1 a:hover {
-}
+
 #my_courses {
 	float: right;
 	font-weight: bold;
 }
-#header1 img {
-	border: 0px;
-}
-/* header 2 styles */
-#header2 {
-	position: relative; /* to avoid the IE peekabo bug*/
-	font-size: 1.0em;
-	font-weight: normal;
-	min-height:25px;
-	padding:  0.2em 0.5em;
-	padding-bottom: 0.2em;
-}
-#header2 a {
-	text-decoration: none;
-}
-#header2 a:hover {
-}
-#Header2Right ul {
-	float: right;
-	list-style-type: none;
-	text-align: right;
-	margin: 0;
-	padding: 0;
-}
-#Header2Right ul li {
-	display: inline;
-}
-#Header2Right ul li a {
-}
-#Header2Right ul li a:hover {
-}
+
 /* header 3 styles */
 #header3 {
 	border-bottom: 1px solid #aeaeae;	
@@ -164,33 +106,7 @@ input[type=button], input[type=submit] {
 #header3 #current a span {
 	float:left;
 }
-#header3 #logout {
-	margin-top: 0px;
-}
-#logout {
-	display: inline;
-	float: right;
-	width: auto;
-	text-align: right;
-	font-size: 1.0em;
-}
-#logout li a:hover {
-	float: right;
-	vertical-align:top;
-	text-decoration:none;
-	margin-right:5px;
-}
-#logout li a span {
-	float:left;
-	cursor: pointer;
-}
-#logout li a:hover span {
-}
-/* header 4 styles */
-#header4 {
-	background-color: #fff;	
-    width:100%;
-}
+
 /* The tool shortcuts */
 #toolshortcuts {
 	text-align: right;
@@ -209,43 +125,14 @@ input[type=button], input[type=submit] {
 	color: #F7D77E;
 	font-weight:bold;
 	min-height: 100px;	
-	overflow:hidden;
+	
 	width: 100%;
 	padding-bottom:10px;
 }
-.footer_emails{
-	float: left;
-	margin-right:5%;
-	padding-top:40px;
-	padding-top:235px;	
-}
-
 .push {
-	height: 22em; /* Very important */
-}
-#footer .copyright {
-	float: right;
-	padding-top:270px;
-	margin-right:10px;
+	height: 9em; /* Very important */
 }
 
-#footer #platformmanager {
-	float: left;
-	margin-left:10px;
-}
-
-#footer #coursemanager {
-	float: left;
-	margin-left: 10px;
-}
-#footerright {
-	margin-top: 10px;
-	float: right;
-	margin-right:20px;
-}
-#footerleft {
-	padding-top: 10px;
-}
 #footer a {
 	color: #fff;
 	font-weight:normal;

BIN
main/css/baby_orange/images/bg.jpg


+ 338 - 48
main/css/base.css

@@ -6,6 +6,10 @@
 
 /* some changes to the pre_base */
 
+pre {
+    margin-top:40px;
+}
+
 select {
     width : auto;
 }
@@ -33,16 +37,20 @@ legend {
     margin-bottom: 10px;
 }
 
-#header1 {
-    height: 50px;
-} 
+#header_right {
+    text-align: right;
+}
+
+#header_right #notifications {
+    padding:40px 0px 0px 0px;
+}
+
 #header2 .nav{
     margin-bottom:0px;
 }
 
 #header2 {    
-    width:100%;
-    height: 35px;
+    
 }
 
 #header2 .nav {
@@ -117,6 +125,7 @@ form .formw input {
 #lp_navigation_elem .buttons,
 #lp_navigation_elem #progress_bar {
     width:130px;
+    margin-left:15px;
 }
 
 * {
@@ -129,7 +138,7 @@ html, body {
 }
 
 #topbar {
-    z-index:20000;
+    z-index:9000; /* bug when using full area fckeditor */
 }
 
 footer {
@@ -137,6 +146,13 @@ footer {
   padding-top: 17px;
   border-top: 1px solid #eee;
 }
+ #footer .container .row {
+    padding-top: 60px;
+ }
+ #footer_right #admin_name, #footer_right #software_name{
+     text-align:right;     
+ }
+ 
 .page-header {
   margin-bottom: 17px;
   border-bottom: 1px solid #ddd;
@@ -598,8 +614,7 @@ a.personal_agenda:hover, a.personal_agenda:hover {
 }
 
 .agenda_day {
-    float:left;
-        
+    float:left;        
     width:100%; 
     background-color: #F8F9FF;    
     color: #666666;
@@ -682,10 +697,6 @@ a.personal_agenda:hover, a.personal_agenda:hover {
     margin-top: 10px;
 }
 
-.social-background-content {
-    width:auto; 
-}
-
 .group_social_item {
     float:left;
     width:95%;  
@@ -1872,18 +1883,14 @@ div.image-social-content center.friend {
     font-size:12px;
     font-weight:bold;
 }
-.social-menu-text4 {
-    font-family:Verdana, Geneva, sans-serif;
+.social-menu-text4 {    
     color:#000;
-    font-weight:normal;
-    font-size:10px;
+    font-weight:normal;    
     vertical-align:bottom;
 }
-.social-menu-text-active {
-    font-family:Verdana, Geneva, sans-serif;
+.social-menu-text-active {    
     color:#000;
-    font-weight:bold;
-    font-size:10px;
+    font-weight:bold;    
     vertical-align:bottom;
 }
 .social-menu-title-right {
@@ -2060,10 +2067,7 @@ border-top: 1px solid #E2E2E2;
 
 .social-background-content {
     z-index:5;
-    position:relative;
-    width:185px;
-    left:-10px;
-    overflow:hidden;
+    text-align: center;
 }
 
 .social-background-content .hidden_message {
@@ -2094,7 +2098,6 @@ border-top: 1px solid #E2E2E2;
     font-size:130%;
     font-weight:bold;
     padding: 0px 8px 0px 8px;
-
 }
 
 #social-thread {
@@ -2252,9 +2255,14 @@ input.maininput:focus {
 }
 
 /* Big icons course home page styles */ 
-.big_icon {
-    /*width:205px; */
+#course_tools .big_icon {    
     padding:10px;   
+    text-align:center;
+}
+
+#course_tools .content {
+    text-align:center;
+    margin-bottom: 20px;
 }
 
 .big_icon img {     
@@ -2374,12 +2382,7 @@ table.lp_build td.tree {
     min-height:380px;
 }
 
-
 #logo {    
-    /* height:85px; */
-    padding-top: 4px;
-    overflow:hidden;    
-    float:left;
 }
 
 div.system_announcement {
@@ -2601,10 +2604,6 @@ div.admin_section h4 {
 #lp_item_list .empty {
     height:20px;
 }
-#lp_item_list .button_actions {
-    position: absolute;
-    right: 20px;
-}
 
 #lp_item_list .item_data {
     padding:5px 0px 5px 0px;
@@ -2705,9 +2704,9 @@ div.admin_section h4 {
     -moz-border-radius: 10px;
     border-radius: 10px;
 
-    height: 40px;
-    /* margin: 5px; */
-    padding: 15px;
+    /*height: 40px;
+    margin: 5px; */
+    padding: 15px 0px 15px 0px; 
 }
 
 .exercise_overview_options .left_option {
@@ -3382,22 +3381,22 @@ a:active{
 }
 
 .online_user_in_text {
-    background: url("online.png") no-repeat scroll right center transparent;
-    float: left;
-    height: 16px;
-    left: 0;
+    background: url("online.png") no-repeat scroll right center transparent;    
+    height: 16px;    
     width: 17px;
-    display:block;
+    display: inline-block;    
     margin-right: 4px;    
 }
 
+.thumbnail .caption {
+    text-align:center;
+}
+
 .offline_user_in_text {
     background: url("offline.png") no-repeat scroll right center transparent;
-    float: left;
-    height: 16px;
-    left: 0;
+    height: 16px;    
     width: 17px;
-    display:block;
+    display: inline-block;    
     margin-right: 4px;    
 }
 
@@ -3481,3 +3480,294 @@ a:active{
 .lt-ie7 #chatmain {
     display:none;
 }
+
+
+
+#timeline {
+    
+    background: url("dot.gif") repeat-x scroll left 45px;
+    height: 350px;
+    margin: 0px auto;
+    overflow: hidden;
+    position: relative;
+    width: 600px;
+}
+
+#dates {
+    
+    /* height: 60px; */
+    overflow: hidden;
+    width: 800px;
+}
+
+
+#dates .selected {
+    font-size: 22px;
+    font-weight: bold;
+    font-color: #E06B04;
+}
+
+#dates li {
+    background: url("biggerdot.png") no-repeat scroll center bottom transparent;
+    float: left;
+    font-size: 14px;
+    height: 50px;
+    list-style: none outside none;
+    text-align: center;
+    width: 130px;
+}
+
+#issues {
+    height: 350px;
+    overflow: hidden;
+    width: 800px;
+}
+
+#issues li {
+    float: left;
+    height: 350px;
+    list-style: none outside none;
+    width: 800px;
+}
+
+#issues li h3 {
+    color: #FFCC00;
+    font-size: 48px;
+    margin: 0px;
+    text-shadow: 1px 1px 2px #000000;
+}
+
+#issues li p {
+    font-size: 14px;
+    font-weight: normal;
+    line-height: 22px;
+    margin-right: 70px;
+    text-shadow: 1px 1px 2px #000000;
+}
+
+
+#course_tools .row h3 {
+    margin-top:10px;
+}
+
+.td_actions {
+ 	/* background:#efefef;*/
+    background:#F9F9F9;    
+    border:1px solid #eee; 
+    margin-bottom: 5px;    
+    padding:2px;     
+    vertical-align:middle;        
+    width: 250px;
+}
+
+/*
+ This is set in the template
+.td_actions a {
+    float:left;
+    width:100%;
+}
+*/
+
+
+/*****************************************************
+ *  THE NEW FORUM                        *
+ *****************************************************/
+/* **** FORUM CATEGORY **** */
+.forum_category {
+    background-color: #0066CC;
+    color: #fff;
+}
+.forum_category a {
+    color: #fff;
+}
+.forum_category_header {
+    background-color: #0066CC;
+    color: #fff;
+}
+tr.forum_category_header a {
+    color: #fff;
+}
+/* **** FORUM **** */
+.forum_header {
+    background-color: #EEF;
+}
+/* **** THREAD **** */
+.forum_threadheader {
+    color: #aaa;
+    background-color: #F7F7F7;
+}
+
+.forum-thread-header {
+    color: #000000;
+    background-color: #F7F7F7;
+    border-left: 1px solid #aaa;
+    border-right: 1px solid #aaa;
+    border-bottom: 1px solid #aaa;
+    border-top: 1px solid #aaa;
+}
+.forum-thread-body {
+    color: #000000;
+    background-color: #FFFFFF;
+    border-left: 1px solid #aaa;
+    border-right: 1px solid #aaa;
+    border-bottom: 1px solid #aaa;
+    border-top: 1px solid #aaa;
+}
+/* **** POST **** */
+.quote {
+    background-color: #a0e5fc;
+}
+
+.current {
+    font-weight: bold;
+}
+.structure {
+    /*border-bottom: 1px solid #666666;*/
+    font-weight: bold;
+    background-color: #F7F7F7;
+    height: 20px;
+}
+a.forum_group_link {
+    font-weight: lighter;
+    display:inline;
+}
+.forum_description {
+    color: #000;
+    font-weight: normal;
+    font-size: 11px;
+}
+.forum_description p{
+    font-size: 11px;
+}
+.forum_title {
+    color: #000;
+    font-size: 14px;
+}
+.forum_low_description {
+    color: #737780;
+    font-style: italic;
+    font-weight: normal;
+}
+.forum_attach_comment {
+    color: #737780;
+    font-style: italic;
+    font-weight: normal;
+}
+
+.forum_message_left {
+    width: 150px;
+    vertical-align: top;    
+    border-right: 1px solid #aaa;
+    background-color: #F7F7F7;
+}
+
+
+                      
+.forum_message_left_2_be_approved {
+    width: 150px;
+    vertical-align: top;    
+    border-right: 1px solid #aaa;
+    background-color: #F7F7F7;
+    color: #999;
+}
+.forum_message_post_title {
+    /*border-bottom: 1px solid #666666;*/
+    font-weight: bold;
+    background-color: #F7F7F7;
+    height: 20px;
+    font-size:20px;
+}
+.forum_message_post_title_2_be_approved {
+    /*border-bottom: 1px solid #666666;*/
+    color: #999;
+    font-weight: bold;
+    background-color: #F7F7F7;
+    height: 20px;
+}
+.forum_message_post_text {
+    /*border-bottom: 1px solid #666666;*/
+    margin-bottom: 10px;
+    vertical-align: top;
+}
+.forum_message_post_text_2_be_approved {
+    /*border-bottom: 1px solid #666666;*/
+    color: #999;
+    margin-bottom: 10px;
+    vertical-align: top;
+}
+
+/*  New forum table */
+
+.forum_table_title {
+    border-collapse: collapse;
+    width: 100%;
+    padding: 5px;
+    border-left: 1px solid #ccc;
+    border-top: 1px solid #ccc;
+    border-right: 1px solid #ccc;
+    padding:5px;
+}
+
+.forum_table_title th {
+    padding-right: 12px;
+    /*border: 1px solid gray;*/
+    background-color: #E5EDF9;
+}
+.forum_table {
+    border-collapse: collapse;
+    width: 100%;
+    padding: 5px;
+    border: 1px solid #ccc;
+    margin-bottom:15px;
+}
+
+.forum_table .forum_head{
+    padding:5px;
+    text-align: left;
+    font-size:14px;
+}
+
+.forum_table th {
+    padding-right: 12px;
+    background-color: #E5EDF9;
+}
+.forum_table tr.row_odd {
+    background-color: #F2F2F2;
+}
+.forum_table tr.row_odd:hover, .data_table tr.row_even:hover {
+    background-color: #E5EDF9;
+}
+.forum_table tr.row_even {
+    background-color: #fff;
+}
+.forum_table td {
+    padding: 5px;
+    vertical-align: top;
+    border-bottom: 1px solid #ccc;
+    border-right: 1px dotted #e1e1e1;
+    border-left: 1px dotted #e1e1e1;
+    border-top: 1px solid #ccc;
+}
+.post {
+    border: 1px solid #ccc;
+    margin-bottom:5px;
+}
+
+/* User list */
+
+.blackboard_show {
+	float:left;
+	position:absolute;
+	border:1px solid black;
+	width: 200px;
+	background-color:white;
+	z-index:99; padding: 3px;
+	display: inline;
+}
+.blackboard_hide {
+	display: none;
+}
+
+#online_grid_container li img {
+    height: 100px;
+}

+ 5 - 196
main/css/base_chamilo.css

@@ -9,8 +9,7 @@ html {
 
 body {
     /* hack ignored by non-IE to enable ie to support :hover on button */
-    behavior:url("/main/css/csshover3.htc");        
-    color: #000;
+    behavior:url("/main/css/csshover3.htc");            
     margin: 0;
     padding: 0;
     background-color: #fff;
@@ -279,12 +278,7 @@ input.link_alike:hover {
 /********************************************************
  *  HEADER 1: Title, portal, organisation, course title *
  ********************************************************/
-#header1 {
-	padding:0px;
-    font-size:12px;    
-    color:#666666;    
-    background-repeat:repeat-x;
-}
+
 #header1 a {
     font-size:12px;    
     font-weight:normal;
@@ -604,7 +598,7 @@ input.link_alike:hover {
     padding: 0 4px;
 }
 .tool-icon {
-    margin-bottom: -3px;
+    /*margin-bottom: -3px;*/
 }
 
 /**********************************************
@@ -963,130 +957,7 @@ div.system_announcement {
     font-color: #ccc;
     float:right;
 }
-/*****************************************************
- *  THE NEW FORUM                        *
- *****************************************************/
-/* **** FORUM CATEGORY **** */
-.forum_category {
-    background-color: #0066CC;
-    color: #fff;
-}
-.forum_category a {
-    color: #fff;
-}
-.forum_category_header {
-    background-color: #0066CC;
-    color: #fff;
-}
-tr.forum_category_header a {
-    color: #fff;
-}
-/* **** FORUM **** */
-.forum_header {
-    background-color: #EEF;
-}
-/* **** THREAD **** */
-.forum_threadheader {
-    color: #aaa;
-    background-color: #F7F7F7;
-}
-tr.forum_threadheader td {
-}
-.forum-thread-header {
-    color: #000000;
-    background-color: #F7F7F7;
-    border-left: 1px solid #aaa;
-    border-right: 1px solid #aaa;
-    border-bottom: 1px solid #aaa;
-    border-top: 1px solid #aaa;
-}
-.forum-thread-body {
-    color: #000000;
-    background-color: #FFFFFF;
-    border-left: 1px solid #aaa;
-    border-right: 1px solid #aaa;
-    border-bottom: 1px solid #aaa;
-    border-top: 1px solid #aaa;
-}
-/* **** POST **** */
-.quote {
-    background-color: #a0e5fc;
-}
-.forum_message_left {
-    width: 150px;
-    vertical-align: top;
-    /*border-bottom: 1px solid #666666;*/
-    border-right: 1px solid #aaa;
-    background-color: #F7F7F7;
-}
-.forum_message_left_2_be_approved {
-    width: 150px;
-    vertical-align: top;
-    /*border-bottom: 1px solid #666666;*/
-    border-right: 1px solid #aaa;
-    background-color: #F7F7F7;
-    color: #999;
-}
-.forum_message_post_title {
-    /*border-bottom: 1px solid #666666;*/
-    font-weight: bold;
-    background-color: #F7F7F7;
-    height: 20px;
-    font-size:20px;
-}
-.forum_message_post_title_2_be_approved {
-    /*border-bottom: 1px solid #666666;*/
-    color: #999;
-    font-weight: bold;
-    background-color: #F7F7F7;
-    height: 20px;
-}
-.forum_message_post_text {
-    /*border-bottom: 1px solid #666666;*/
-    margin-bottom: 10px;
-    vertical-align: top;
-}
-.forum_message_post_text_2_be_approved {
-    /*border-bottom: 1px solid #666666;*/
-    color: #999;
-    margin-bottom: 10px;
-    vertical-align: top;
-}
-.current {
-    font-weight: bold;
-}
-.structure {
-    /*border-bottom: 1px solid #666666;*/
-    font-weight: bold;
-    background-color: #F7F7F7;
-    height: 20px;
-}
-a.forum_group_link {
-    font-weight: lighter;
-    display:inline;
-}
-.forum_description {
-    color: #000;
-    font-weight: normal;
-    font-size: 11px;
-}
-.forum_description p{
-    font-size: 11px;
-}
-.forum_title {
-    color: #000;
-    font-size: 14px;
-}
-.forum_low_description {
-    color: #737780;
-    font-style: italic;
-    font-weight: normal;
-}
-.forum_attach_comment {
-    color: #737780;
-    font-style: italic;
-    font-weight: normal;
-}
+
 /* **** BLOG **** */
 span.blog_title {
     font-size: 20px;
@@ -2291,8 +2162,7 @@ span.form_required  {
 
 #header3 {
     font-size: 11px;
-    font-weight: bold;
-    margin:4px 0px 0px 0px;        
+    font-weight: bold;         
 }
 
 /* Scroll effect */
@@ -2389,67 +2259,6 @@ span.form_required  {
   /*background-color: #eeeeee; */
 }
 
-
-/*  New forum table */
-
-.forum_table_title {
-    border-collapse: collapse;
-    width: 100%;
-    padding: 5px;
-    border-left: 1px solid #ccc;
-    border-top: 1px solid #ccc;
-    border-right: 1px solid #ccc;
-    padding:5px;
-}
-
-.forum_table_title th {
-    padding-right: 12px;
-    /*border: 1px solid gray;*/
-    background-color: #E5EDF9;
-}
-
-
-.forum_table {
-    border-collapse: collapse;
-    width: 100%;
-    padding: 5px;
-    border: 1px solid #ccc;
-    margin-bottom:15px;
-}
-
-.forum_table .forum_head{
-    padding:5px;
-    text-align: left;
-    font-size:14px;
-}
-
-.forum_table th {
-    padding-right: 12px;
-    background-color: #E5EDF9;
-}
-.forum_table tr.row_odd {
-    background-color: #F2F2F2;
-}
-.forum_table tr.row_odd:hover, .data_table tr.row_even:hover {
-    background-color: #E5EDF9;
-}
-.forum_table tr.row_even {
-    background-color: #fff;
-}
-.forum_table td {
-    padding: 5px;
-    vertical-align: top;
-    border-bottom: 1px solid #ccc;
-    border-right: 1px dotted #e1e1e1;
-    border-left: 1px dotted #e1e1e1;
-    border-top: 1px solid #ccc;
-}
-
-.post {
-    border: 1px solid #ccc;
-    margin-bottom:5px;
-}
-
 /* Text resize icons in header */
 .resize_font { /* the canvas */
     margin: 0 5px 0 5px;

BIN
main/css/biggerdot.png


+ 5 - 47
main/css/blue_lagoon/default.css

@@ -24,7 +24,7 @@ body {
 	min-height: 100%;
 	height: auto !important;
 	height: 100%;
-	margin: 0 auto -5em;
+	margin: 0 auto -9em;
 }
 #outerframe {
 	position: relative;  /* do not remove, fixes a bug in IE */
@@ -492,55 +492,16 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
 #footer {
 	background-color: #434343;
 	background-image: url(images/tab-repeat.png);
-	background-repeat:repeat-x;
-	font-size: 12px;
-	color:#ffffff;
-	//height: 4em;	 /* Do not change this value */ 
-	overflow:hidden;	
-	width: 100%;
-	padding-bottom:10px;
+	background-repeat:repeat-x;	
+	color:#ffffff;			
 }
 .push {
-	height: 5em; /* Very important */
-}
-#footer .copyright {
-	float: right;
-	padding-top:18px;
-	margin-right:10px;
-	background-color: #434343;
-	background-image: url(images/tab-repeat.png);
-	background-repeat:repeat-x;
-}
-.footer_emails{
-	float: left;
-	margin-right:5%;	
-	background-color: #434343;
-	background-image: url(images/tab-repeat.png);
-	background-repeat:repeat-x;
-	padding-top:20px;	
-}
-#footer #platformmanager {
-	float: left;
-	margin-left:10px;
-}
-#footer #coursemanager {
-	float: left;
-	margin-left: 10px;
+	height: 9em; /* Very important */
 }
 #footer a {
 	color:#fff;
 }
-#footer #coursemanager {
-	float: left;
-	margin-left: 10px;
-}
-.copyright {
-	display: inline;
-	float: right;
-	padding-right: 5px;
-}
-#bottom_corner {
-}
+
 /*****************************************************
  *  NAVIGATION MENU                                  *
  *****************************************************/
@@ -556,10 +517,7 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
 }
 .menusection {
 	width: auto;
-	margin: 24px 2px 0 0px;
 	padding-left: 10px;		
-	background-color: #FFF;
-	
 }
 .menusectioncaption {
 	position: relative;

+ 44 - 30
main/css/bootstrap-responsive.css

@@ -1,5 +1,5 @@
 /*!
- * Bootstrap Responsive v2.0.0
+ * Bootstrap Responsive v2.0.1
  *
  * Copyright 2012 Twitter, Inc
  * Licensed under the Apache License v2.0
@@ -7,6 +7,16 @@
  *
  * Designed and built with all the love in the world @twitter by @mdo and @fat.
  */
+.clearfix {
+  *zoom: 1;
+}
+.clearfix:before, .clearfix:after {
+  display: table;
+  content: "";
+}
+.clearfix:after {
+  clear: both;
+}
 .hidden {
   display: none;
   visibility: hidden;
@@ -25,7 +35,7 @@
   .uneditable-input {
     display: block;
     width: 100%;
-    height: 28px;
+    min-height: 28px;
     /* Make inputs at least the height of their button counterpart */
   
     /* Makes inputs behave like true block-level elements */
@@ -84,7 +94,7 @@
     position: static;
   }
 }
-@media (max-width: 768px) {
+@media (max-width: 767px) {
   .container {
     width: auto;
     padding: 0 20px;
@@ -102,7 +112,7 @@
     margin: 0;
   }
 }
-@media (min-width: 768px) and (max-width: 980px) {
+@media (min-width: 768px) and (max-width: 979px) {
   .row {
     margin-left: -20px;
     *zoom: 1;
@@ -205,40 +215,40 @@
   .row-fluid > [class*="span"]:first-child {
     margin-left: 0;
   }
-  .row-fluid .span1 {
+  .row-fluid > .span1 {
     width: 5.801104972%;
   }
-  .row-fluid .span2 {
+  .row-fluid > .span2 {
     width: 14.364640883%;
   }
-  .row-fluid .span3 {
+  .row-fluid > .span3 {
     width: 22.928176794%;
   }
-  .row-fluid .span4 {
+  .row-fluid > .span4 {
     width: 31.491712705%;
   }
-  .row-fluid .span5 {
+  .row-fluid > .span5 {
     width: 40.055248616%;
   }
-  .row-fluid .span6 {
+  .row-fluid > .span6 {
     width: 48.618784527%;
   }
-  .row-fluid .span7 {
+  .row-fluid > .span7 {
     width: 57.182320438000005%;
   }
-  .row-fluid .span8 {
+  .row-fluid > .span8 {
     width: 65.74585634900001%;
   }
-  .row-fluid .span9 {
+  .row-fluid > .span9 {
     width: 74.30939226%;
   }
-  .row-fluid .span10 {
+  .row-fluid > .span10 {
     width: 82.87292817100001%;
   }
-  .row-fluid .span11 {
+  .row-fluid > .span11 {
     width: 91.436464082%;
   }
-  .row-fluid .span12 {
+  .row-fluid > .span12 {
     width: 99.999999993%;
   }
   input.span1, textarea.span1, .uneditable-input.span1 {
@@ -278,7 +288,7 @@
     width: 714px;
   }
 }
-@media (max-width: 980px) {
+@media (max-width: 979px) {
   body {
     padding-top: 0;
   }
@@ -314,6 +324,10 @@
   .navbar .nav > .divider-vertical {
     display: none;
   }
+  .navbar .nav .nav-header {
+    color: #999999;
+    text-shadow: none;
+  }
   .navbar .nav > li > a, .navbar .dropdown-menu a {
     padding: 6px 15px;
     font-weight: bold;
@@ -486,40 +500,40 @@
   .row-fluid > [class*="span"]:first-child {
     margin-left: 0;
   }
-  .row-fluid .span1 {
+  .row-fluid > .span1 {
     width: 5.982905983%;
   }
-  .row-fluid .span2 {
+  .row-fluid > .span2 {
     width: 14.529914530000001%;
   }
-  .row-fluid .span3 {
+  .row-fluid > .span3 {
     width: 23.076923077%;
   }
-  .row-fluid .span4 {
+  .row-fluid > .span4 {
     width: 31.623931624%;
   }
-  .row-fluid .span5 {
+  .row-fluid > .span5 {
     width: 40.170940171000005%;
   }
-  .row-fluid .span6 {
+  .row-fluid > .span6 {
     width: 48.717948718%;
   }
-  .row-fluid .span7 {
+  .row-fluid > .span7 {
     width: 57.264957265%;
   }
-  .row-fluid .span8 {
+  .row-fluid > .span8 {
     width: 65.81196581200001%;
   }
-  .row-fluid .span9 {
+  .row-fluid > .span9 {
     width: 74.358974359%;
   }
-  .row-fluid .span10 {
+  .row-fluid > .span10 {
     width: 82.905982906%;
   }
-  .row-fluid .span11 {
+  .row-fluid > .span11 {
     width: 91.45299145300001%;
   }
-  .row-fluid .span12 {
+  .row-fluid > .span12 {
     width: 100%;
   }
   input.span1, textarea.span1, .uneditable-input.span1 {
@@ -564,4 +578,4 @@
   .thumbnails > li {
     margin-left: 30px;
   }
-}
+}

+ 6 - 26
main/css/chamilo/default.css

@@ -29,7 +29,7 @@ a:active {
 
 .subnav-fixed {
     position: fixed;
-    top: 38px;
+    top: 0px;
     left: 0;
     right: 0;
     z-index: 1030;
@@ -38,9 +38,10 @@ a:active {
     -webkit-border-radius: 0;
         -moz-border-radius: 0;
             border-radius: 0;
-    -webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
+    /*-webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
         -moz-box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
             box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
+    */
 }
 
 
@@ -86,36 +87,15 @@ a:active {
 #footer {
     background-color: #037fb2;
     background-image: url(images/bg-footer.gif);
-    background-repeat:repeat-x;
-    font-size: 12px;
+    background-repeat:repeat-x;    
     color:#ffffff;
-    /*height: 10em;*/	 /* Do not change this value */
-    overflow:hidden;
-    width: 100%;
-    padding-bottom:18px;
+    height: 9em;    
+    width: 100%;    
 }
 /* Sticky footer*/
 .push {
     height: 9em; /* Very important */
 }
-#footer .copyright {
-    float: right;
-    padding-top:60px;
-    margin-right:5%;
-    background-color: #037fb2;
-    background-image: url(images/bg-footer.gif);
-    background-repeat:repeat-x;
-}
-
-.footer_emails{
-    float: left;
-    padding-top:60px;
-    margin-right:5%;
-    background-color: #037fb2;
-    background-image: url(images/bg-footer.gif);
-    background-repeat:repeat-x;
-}
-
 /*****************************************************
  *  DISPLAY MESSAGES	                             *
  *****************************************************/

+ 3 - 12
main/css/chamilo_electric_blue/default.css

@@ -30,7 +30,7 @@ a:active {
 
 .subnav-fixed {
     position: fixed;
-    top: 38px;
+    top: 0px;
     left: 0;
     right: 0;
     z-index: 1030;
@@ -39,9 +39,6 @@ a:active {
     -webkit-border-radius: 0;
         -moz-border-radius: 0;
             border-radius: 0;
-    -webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
-        -moz-box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
-            box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
 }
 
 .subnav {  
@@ -101,19 +98,13 @@ a:active {
 #footer .copyright {
     float: right;
     padding-top:60px;
-    margin-right:5%;
-    background-color: #0D21E2;
-    background-image: url(images/bg-footer.gif);
-    background-repeat:repeat-x;
+    margin-right:5%;    
 }
 
 .footer_emails{
     float: left;
     padding-top:60px;
-    margin-right:5%;
-    background-color: #030FB0;
-    background-image: url(images/bg-footer.gif);
-    background-repeat:repeat-x;
+    margin-right:5%;    
 }
 
 /*****************************************************

+ 3 - 12
main/css/chamilo_green/default.css

@@ -25,7 +25,7 @@ a:active {
 
 .subnav-fixed {
     position: fixed;
-    top: 38px;
+    top: 0px;
     left: 0;
     right: 0;
     z-index: 1030;
@@ -34,9 +34,6 @@ a:active {
     -webkit-border-radius: 0;
         -moz-border-radius: 0;
             border-radius: 0;
-    -webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
-        -moz-box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
-            box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
 }
 
 
@@ -98,19 +95,13 @@ a:active {
 #footer .copyright {
     float: right;
     padding-top:60px;
-    margin-right:5%;
-    background-color: #79aa0b;
-    background-image: url(images/bg-footer.gif);
-    background-repeat:repeat-x;
+    margin-right:5%;    
 }
 
 .footer_emails{
     float: left;
     padding-top:60px;
-    margin-right:5%;
-    background-color: #79aa0b;
-    background-image: url(images/bg-footer.gif);
-    background-repeat:repeat-x;
+    margin-right:5%;    
 }
 
 /*****************************************************

+ 3 - 12
main/css/chamilo_orange/default.css

@@ -29,7 +29,7 @@ a:active {
 
 .subnav-fixed {
     position: fixed;
-    top: 38px;
+    top: 0px;
     left: 0;
     right: 0;
     z-index: 1030;
@@ -38,9 +38,6 @@ a:active {
     -webkit-border-radius: 0;
         -moz-border-radius: 0;
             border-radius: 0;
-    -webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
-        -moz-box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
-            box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
 }
 
 .subnav {  
@@ -116,19 +113,13 @@ a:active {
 #footer .copyright {
     float: right;
     padding-top:60px;
-    margin-right:5%;
-    background-color: #F88017;
-    background-image: url(images/bg-footer.gif);
-    background-repeat:repeat-x;
+    margin-right:5%;    
 }
 
 .footer_emails{
     float: left;
     padding-top:60px;
-    margin-right:5%;
-    background-color: #F88017;
-    background-image: url(images/bg-footer.gif);
-    background-repeat:repeat-x;
+    margin-right:5%;    
 }
 
 /*****************************************************

+ 3 - 12
main/css/chamilo_red/default.css

@@ -30,7 +30,7 @@ a:active {
 
 .subnav-fixed {
     position: fixed;
-    top: 38px;
+    top: 0px;
     left: 0;
     right: 0;
     z-index: 1030;
@@ -39,9 +39,6 @@ a:active {
     -webkit-border-radius: 0;
         -moz-border-radius: 0;
             border-radius: 0;
-    -webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
-        -moz-box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
-            box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
 }
 
 .subnav {  
@@ -101,19 +98,13 @@ a:active {
 #footer .copyright {
     float: right;
     padding-top:60px;
-    margin-right:5%;
-    background-color: #a90a0e;
-    background-image: url(images/bg-footer.gif);
-    background-repeat:repeat-x;
+    margin-right:5%;    
 }
 
 .footer_emails{
     float: left;
     padding-top:60px;
-    margin-right:5%;
-    background-color: #a90a0e;
-    background-image: url(images/bg-footer.gif);
-    background-repeat:repeat-x;
+    margin-right:5%;    
 }
 
 /*****************************************************

+ 2 - 8
main/css/chamilo_sport_red/default.css

@@ -175,19 +175,13 @@ font-size: 15px;
 #footer .copyright {
     float: right;
     padding-top:60px;
-    margin-right:5%;
-    background-color: #a90a0e;
-    background-image: url(images/bg-footer.gif);
-    background-repeat:repeat-x;
+    margin-right:5%;    
 }
 
 .footer_emails{
     float: left;
     padding-top:60px;
-    margin-right:5%;
-    background-color: #a90a0e;
-    background-image: url(images/bg-footer.gif);
-    background-repeat:repeat-x;
+    margin-right:5%;    
 }
 
 /*****************************************************

+ 1 - 28
main/css/corporate/default.css

@@ -215,8 +215,7 @@ input[type=button], input[type=submit] {
 	border-top: 1px solid #aeaeae;
 	background-color: #434343;
 	font-size: 12px;
-	color:#fff;
-	min-height: 100px;	
+	color:#fff;	
 	overflow:hidden;	
 	width: 100%;
 	padding-bottom:10px;
@@ -224,32 +223,6 @@ input[type=button], input[type=submit] {
 .push {
 	height: 4em; /* Very important */
 }
-#footer .copyright {
-	float: right;
-	padding-top:8px;
-	margin-right:10px;
-}
-.footer_emails{
-	float: left;
-	margin-right:5%;
-	padding-top:8px;
-}
-#footer #platformmanager {
-	float: left;
-	margin-left:10px;
-}
-#footer #coursemanager {
-	float: left;
-	margin-left: 10px;
-}
-#footerright {
-	margin-top: 10px;
-	float: right;
-	margin-right:20px;
-}
-#footerleft {
-	padding-top: 10px;
-}
 #footer a {
 	color:#fff;
 }

+ 5 - 40
main/css/cosmic_campus/default.css

@@ -23,11 +23,9 @@ body {
 	min-height: 100%;
 	height: auto !important;
 	height: 100%;
-	margin: 0 auto -7em;
-}
-.row {
-	width:100%;
+	margin: 0 auto -9em;
 }
+
 div.row div.label {
 	width: 0%;
 }
@@ -131,7 +129,7 @@ input[type=button], input[type=submit] {
 	height:25px;
 	margin-bottom: 1px;
 	background-image: url(images/fondoHeader3.jpg);	
-    width:99%;
+    width:100%;
 }
 #header3 a {
 	padding: 10px 0px 20px 0px;
@@ -208,48 +206,15 @@ input[type=button], input[type=submit] {
 	background-repeat: no-repeat;
 	font-size: 12px;
 	color:#ffffff;
-	min-height: 50px;	
+	
 	overflow:hidden;
 	width: 100%;
 	padding-bottom:10px;
 }
 .push {
-	height: 7em; /* Very important */
-}
-
-#footer .copyright {
-	float: right;
-	padding-top:55px;
-	margin-right:10px;
-	background-color: #7171b7;
-	background-image: url(images/footer.jpg);
-	background-repeat: no-repeat;
-}
-.footer_emails{
-	float: left;
-	margin-right:5%;	
-	background-color: #7171b7;
-	background-image: url(images/footer.jpg);
-	background-repeat: no-repeat;
-	padding-top:55px;
-}
-#footer #platformmanager {
-	float: left;
-	margin-left:10px;
-}
-#footer #coursemanager {
-	float: left;
-	margin-left: 10px;
+	height: 9em; /* Very important */
 }
 
-#footerright {
-	margin-top: 10px;
-	float: right;
-	margin-right:20px;
-}
-#footerleft {
-	padding-top: 10px;
-}
 #footer a {
 	color:#f1d40d;
 }

BIN
main/css/dot.gif


+ 197 - 66
main/css/pre_base.css

@@ -1,5 +1,5 @@
 /*!
- * Bootstrap v2.0.0
+ * Bootstrap v2.0.1
  *
  * Copyright 2012 Twitter, Inc
  * Licensed under the Apache License v2.0
@@ -33,7 +33,7 @@ html {
   -ms-text-size-adjust: 100%;
 }
 a:focus {
-  outline: thin dotted;
+  outline: thin dotted #333;
   outline: 5px auto -webkit-focus-ring-color;
   outline-offset: -2px;
 }
@@ -94,6 +94,16 @@ textarea {
   overflow: auto;
   vertical-align: top;
 }
+.clearfix {
+  *zoom: 1;
+}
+.clearfix:before, .clearfix:after {
+  display: table;
+  content: "";
+}
+.clearfix:after {
+  clear: both;
+}
 body {
   margin: 0;
   font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
@@ -212,40 +222,40 @@ a:hover {
 .row-fluid > [class*="span"]:first-child {
   margin-left: 0;
 }
-.row-fluid .span1 {
+.row-fluid > .span1 {
   width: 6.382978723%;
 }
-.row-fluid .span2 {
+.row-fluid > .span2 {
   width: 14.89361702%;
 }
-.row-fluid .span3 {
+.row-fluid > .span3 {
   width: 23.404255317%;
 }
-.row-fluid .span4 {
+.row-fluid > .span4 {
   width: 31.914893614%;
 }
-.row-fluid .span5 {
+.row-fluid > .span5 {
   width: 40.425531911%;
 }
-.row-fluid .span6 {
+.row-fluid > .span6 {
   width: 48.93617020799999%;
 }
-.row-fluid .span7 {
+.row-fluid > .span7 {
   width: 57.446808505%;
 }
-.row-fluid .span8 {
+.row-fluid > .span8 {
   width: 65.95744680199999%;
 }
-.row-fluid .span9 {
+.row-fluid > .span9 {
   width: 74.468085099%;
 }
-.row-fluid .span10 {
+.row-fluid > .span10 {
   width: 82.97872339599999%;
 }
-.row-fluid .span11 {
+.row-fluid > .span11 {
   width: 91.489361693%;
 }
-.row-fluid .span12 {
+.row-fluid > .span12 {
   width: 99.99999998999999%;
 }
 .container {
@@ -374,7 +384,7 @@ ol {
 li {
   line-height: 18px;
 }
-ul.unstyled {
+ul.unstyled, ol.unstyled {
   margin-left: 0;
   list-style: none;
 }
@@ -393,7 +403,7 @@ dd {
 hr {
   margin: 18px 0;
   border: 0;
-  border-top: 1px solid #e5e5e5;
+  border-top: 1px solid #eeeeee;
   border-bottom: 1px solid #ffffff;
 }
 strong {
@@ -488,13 +498,20 @@ pre {
   white-space: pre;
   white-space: pre-wrap;
   word-break: break-all;
+  word-wrap: break-word;
 }
 pre.prettyprint {
   margin-bottom: 18px;
 }
 pre code {
   padding: 0;
+  color: inherit;
   background-color: transparent;
+  border: 0;
+}
+.pre-scrollable {
+  max-height: 340px;
+  overflow-y: scroll;
 }
 form {
   margin: 0 0 18px;
@@ -515,16 +532,25 @@ legend {
   border: 0;
   border-bottom: 1px solid #eee;
 }
+legend small {
+  font-size: 13.5px;
+  color: #999999;
+}
 label,
 input,
 button,
 select,
 textarea {
-  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
   font-size: 13px;
   font-weight: normal;
   line-height: 18px;
 }
+input,
+button,
+select,
+textarea {
+  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+}
 label {
   display: block;
   margin-bottom: 5px;
@@ -563,13 +589,19 @@ input[type="image"], input[type="checkbox"], input[type="radio"] {
   /* IE7 */
 
   line-height: normal;
-  border: 0;
   cursor: pointer;
   -webkit-border-radius: 0;
   -moz-border-radius: 0;
   border-radius: 0;
+  border: 0 \9;
+  /* IE9 and down */
+
+}
+input[type="image"] {
+  border: 0;
 }
 input[type="file"] {
+  width: auto;
   padding: initial;
   line-height: initial;
   border: initial;
@@ -592,6 +624,9 @@ select, input[type="file"] {
 
   line-height: 28px;
 }
+input[type="file"] {
+  line-height: 18px \9;
+}
 select {
   width: 220px;
   background-color: #ffffff;
@@ -622,15 +657,13 @@ input[type="hidden"] {
 }
 .radio.inline, .checkbox.inline {
   display: inline-block;
+  padding-top: 5px;
   margin-bottom: 0;
   vertical-align: middle;
 }
 .radio.inline + .radio.inline, .checkbox.inline + .checkbox.inline {
   margin-left: 10px;
 }
-.controls > .radio.inline:first-child, .controls > .checkbox.inline:first-child {
-  padding-top: 0;
-}
 input, textarea {
   -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
   -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
@@ -648,14 +681,17 @@ input:focus, textarea:focus {
   box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
   outline: 0;
   outline: thin dotted \9;
-  /* IE6-8 */
+  /* IE6-9 */
 
 }
-input[type="file"]:focus, input[type="checkbox"]:focus, select:focus {
+input[type="file"]:focus,
+input[type="radio"]:focus,
+input[type="checkbox"]:focus,
+select:focus {
   -webkit-box-shadow: none;
   -moz-box-shadow: none;
   box-shadow: none;
-  outline: thin dotted;
+  outline: thin dotted #333;
   outline: 5px auto -webkit-focus-ring-color;
   outline-offset: -2px;
 }
@@ -817,6 +853,7 @@ input:focus:required:invalid:focus, textarea:focus:required:invalid:focus, selec
   color: #999999;
 }
 .help-block {
+  display: block;
   margin-top: 5px;
   margin-bottom: 0;
   color: #999999;
@@ -898,6 +935,7 @@ input:focus:required:invalid:focus, textarea:focus:required:invalid:focus, selec
   border-radius: 3px 0 0 3px;
 }
 .input-append .uneditable-input {
+  border-left-color: #eee;
   border-right-color: #ccc;
 }
 .input-append .add-on {
@@ -939,6 +977,9 @@ input:focus:required:invalid:focus, textarea:focus:required:invalid:focus, selec
   display: inline-block;
   margin-bottom: 0;
 }
+.form-search .hide, .form-inline .hide, .form-horizontal .hide {
+  display: none;
+}
 .form-search label,
 .form-inline label,
 .form-search .input-append,
@@ -953,10 +994,17 @@ input:focus:required:invalid:focus, textarea:focus:required:invalid:focus, selec
 .form-inline .input-prepend .add-on {
   vertical-align: middle;
 }
+.form-search .radio,
+.form-inline .radio,
+.form-search .checkbox,
+.form-inline .checkbox {
+  margin-bottom: 0;
+  vertical-align: middle;
+}
 .control-group {
   margin-bottom: 9px;
 }
-.form-horizontal legend + .control-group {
+legend + .control-group {
   margin-top: 18px;
   -webkit-margin-top-collapse: separate;
 }
@@ -971,7 +1019,7 @@ input:focus:required:invalid:focus, textarea:focus:required:invalid:focus, selec
 .form-horizontal .control-group:after {
   clear: both;
 }
-.form-horizontal .control-group > label {
+.form-horizontal .control-label {
   float: left;
   width: 140px;
   padding-top: 5px;
@@ -996,14 +1044,14 @@ table {
   padding: 8px;
   line-height: 18px;
   text-align: left;
+  vertical-align: top;
   border-top: 1px solid #ddd;
 }
 .table th {
   font-weight: bold;
-  vertical-align: bottom;
 }
-.table td {
-  vertical-align: top;
+.table thead th {
+  vertical-align: bottom;
 }
 .table thead:first-child tr th, .table thead:first-child tr td {
   border-top: 0;
@@ -1054,6 +1102,9 @@ table {
 .table-striped tbody tr:nth-child(odd) td, .table-striped tbody tr:nth-child(odd) th {
   background-color: #f9f9f9;
 }
+.table tbody tr:hover td, .table tbody tr:hover th {
+  background-color: #f5f5f5;
+}
 table .span1 {
   float: none;
   width: 44px;
@@ -1114,21 +1165,22 @@ table .span12 {
   width: 924px;
   margin-left: 0;
 }
-[class^="icon-"] {
+[class^="icon-"], [class*=" icon-"] {
   display: inline-block;
   width: 14px;
   height: 14px;
+  line-height: 14px;
   vertical-align: text-top;
-  background-image: url(../img/glyphicons-halflings.png);
+  background-image: url("../img/glyphicons-halflings.png");
   background-position: 14px 14px;
   background-repeat: no-repeat;
   *margin-right: .3em;
 }
-[class^="icon-"]:last-child {
+[class^="icon-"]:last-child, [class*=" icon-"]:last-child {
   *margin-left: 0;
 }
 .icon-white {
-  background-image: url(../img/glyphicons-halflings-white.png);
+  background-image: url("../img/glyphicons-halflings-white.png");
 }
 .icon-glass {
   background-position: 0      0;
@@ -1529,7 +1581,6 @@ table .span12 {
   float: left;
   display: none;
   min-width: 160px;
-  max-width: 220px;
   _width: 160px;
   padding: 4px 0;
   margin: 0;
@@ -1658,20 +1709,25 @@ table .span12 {
 .btn {
   display: inline-block;
   padding: 4px 10px 4px;
+  margin-bottom: 0;
   font-size: 13px;
   line-height: 18px;
   color: #333333;
   text-align: center;
   text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
-  background-color: #fafafa;
-  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
-  background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-  background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
-  background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-  background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-  background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-  background-repeat: no-repeat;
+  vertical-align: middle;
+  background-color: #f5f5f5;
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
+  background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: linear-gradient(top, #ffffff, #e6e6e6);
+  background-repeat: repeat-x;
   filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
+  border-color: #e6e6e6 #e6e6e6 #bfbfbf;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
   border: 1px solid #ccc;
   border-bottom-color: #bbb;
   -webkit-border-radius: 4px;
@@ -1681,8 +1737,19 @@ table .span12 {
   -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
   box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
   cursor: pointer;
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
   *margin-left: .3em;
 }
+.btn:hover,
+.btn:active,
+.btn.active,
+.btn.disabled,
+.btn[disabled] {
+  background-color: #e6e6e6;
+}
+.btn:active, .btn.active {
+  background-color: #cccccc \9;
+}
 .btn:first-child {
   *margin-left: 0;
 }
@@ -1698,7 +1765,7 @@ table .span12 {
   transition: background-position 0.1s linear;
 }
 .btn:focus {
-  outline: thin dotted;
+  outline: thin dotted #333;
   outline: 5px auto -webkit-focus-ring-color;
   outline-offset: -2px;
 }
@@ -1709,7 +1776,6 @@ table .span12 {
   box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
   background-color: #e6e6e6;
   background-color: #d9d9d9 \9;
-  color: rgba(0, 0, 0, 0.5);
   outline: 0;
 }
 .btn.disabled, .btn[disabled] {
@@ -1730,7 +1796,7 @@ table .span12 {
   -moz-border-radius: 5px;
   border-radius: 5px;
 }
-.btn-large .icon {
+.btn-large [class^="icon-"] {
   margin-top: 1px;
 }
 .btn-small {
@@ -1738,9 +1804,14 @@ table .span12 {
   font-size: 11px;
   line-height: 16px;
 }
-.btn-small .icon {
+.btn-small [class^="icon-"] {
   margin-top: -1px;
 }
+.btn-mini {
+  padding: 2px 6px;
+  font-size: 11px;
+  line-height: 14px;
+}
 .btn-primary,
 .btn-primary:hover,
 .btn-warning,
@@ -1750,7 +1821,9 @@ table .span12 {
 .btn-success,
 .btn-success:hover,
 .btn-info,
-.btn-info:hover {
+.btn-info:hover,
+.btn-inverse,
+.btn-inverse:hover {
   text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
   color: #ffffff;
 }
@@ -1758,7 +1831,8 @@ table .span12 {
 .btn-warning.active,
 .btn-danger.active,
 .btn-success.active,
-.btn-info.active {
+.btn-info.active,
+.btn-dark.active {
   color: rgba(255, 255, 255, 0.75);
 }
 .btn-primary {
@@ -1881,6 +1955,30 @@ table .span12 {
 .btn-info:active, .btn-info.active {
   background-color: #24748c \9;
 }
+.btn-inverse {
+  background-color: #393939;
+  background-image: -moz-linear-gradient(top, #454545, #262626);
+  background-image: -ms-linear-gradient(top, #454545, #262626);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#454545), to(#262626));
+  background-image: -webkit-linear-gradient(top, #454545, #262626);
+  background-image: -o-linear-gradient(top, #454545, #262626);
+  background-image: linear-gradient(top, #454545, #262626);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#454545', endColorstr='#262626', GradientType=0);
+  border-color: #262626 #262626 #000000;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-inverse:hover,
+.btn-inverse:active,
+.btn-inverse.active,
+.btn-inverse.disabled,
+.btn-inverse[disabled] {
+  background-color: #262626;
+}
+.btn-inverse:active, .btn-inverse.active {
+  background-color: #0c0c0c \9;
+}
 button.btn, input[type="submit"].btn {
   *padding-top: 2px;
   *padding-bottom: 2px;
@@ -2013,7 +2111,8 @@ button.btn.small, input[type="submit"].btn.small {
 .btn-primary .caret,
 .btn-danger .caret,
 .btn-info .caret,
-.btn-success .caret {
+.btn-success .caret,
+.btn-inverse .caret {
   border-top-color: #ffffff;
   opacity: 0.75;
   filter: alpha(opacity=75);
@@ -2086,27 +2185,31 @@ button.btn.small, input[type="submit"].btn.small {
   text-decoration: none;
   background-color: #eeeeee;
 }
+.nav .nav-header {
+  display: block;
+  padding: 3px 15px;
+  font-size: 11px;
+  font-weight: bold;
+  line-height: 18px;
+  color: #999999;
+  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+  text-transform: uppercase;
+}
+.nav li + .nav-header {
+  margin-top: 9px;
+}
 .nav-list {
   padding-left: 14px;
   padding-right: 14px;
   margin-bottom: 0;
 }
 .nav-list > li > a, .nav-list .nav-header {
-  display: block;
-  padding: 3px 15px;
   margin-left: -15px;
   margin-right: -15px;
   text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
 }
-.nav-list .nav-header {
-  font-size: 11px;
-  font-weight: bold;
-  line-height: 18px;
-  color: #999999;
-  text-transform: uppercase;
-}
-.nav-list > li + .nav-header {
-  margin-top: 9px;
+.nav-list > li > a {
+  padding: 3px 15px;
 }
 .nav-list .active > a, .nav-list .active > a:hover {
   color: #ffffff;
@@ -2256,6 +2359,9 @@ button.btn.small, input[type="submit"].btn.small {
 .tabbable:after {
   clear: both;
 }
+.tab-content {
+  overflow: hidden;
+}
 .tabs-below .nav-tabs, .tabs-right .nav-tabs, .tabs-left .nav-tabs {
   border-bottom: 0;
 }
@@ -2451,6 +2557,13 @@ button.btn.small, input[type="submit"].btn.small {
 .navbar-form input[type="image"], .navbar-form input[type="checkbox"], .navbar-form input[type="radio"] {
   margin-top: 3px;
 }
+.navbar-form .input-append, .navbar-form .input-prepend {
+  margin-top: 6px;
+  white-space: nowrap;
+}
+.navbar-form .input-append input, .navbar-form .input-prepend input {
+  margin-top: 0;
+}
 .navbar-search {
   position: relative;
   float: left;
@@ -2544,7 +2657,6 @@ button.btn.small, input[type="submit"].btn.small {
   color: #ffffff;
   text-decoration: none;
   background-color: #222222;
-  background-color: rgba(0, 0, 0, 0.5);
 }
 .navbar .divider-vertical {
   height: 40px;
@@ -2631,7 +2743,7 @@ button.btn.small, input[type="submit"].btn.small {
   box-shadow: inset 0 1px 0 #ffffff;
 }
 .breadcrumb li {
-  display: inline;
+  display: inline-block;
   text-shadow: 0 1px 0 #ffffff;
 }
 .breadcrumb .divider {
@@ -2810,6 +2922,9 @@ button.btn.small, input[type="submit"].btn.small {
 .modal-body {
   padding: 15px;
 }
+.modal-body .modal-form {
+  margin-bottom: 0;
+}
 .modal-footer {
   padding: 14px 15px 15px;
   margin-bottom: 0;
@@ -3045,28 +3160,44 @@ a.thumbnail:hover {
   padding: 9px;
 }
 .label {
-  padding: 1px 3px 2px;
-  font-size: 9.75px;
+  padding: 2px 4px 3px;
+  font-size: 11.049999999999999px;
   font-weight: bold;
   color: #ffffff;
-  text-transform: uppercase;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
   background-color: #999999;
   -webkit-border-radius: 3px;
   -moz-border-radius: 3px;
   border-radius: 3px;
 }
+.label:hover {
+  color: #ffffff;
+  text-decoration: none;
+}
 .label-important {
   background-color: #b94a48;
 }
+.label-important:hover {
+  background-color: #953b39;
+}
 .label-warning {
   background-color: #f89406;
 }
+.label-warning:hover {
+  background-color: #c67605;
+}
 .label-success {
   background-color: #468847;
 }
+.label-success:hover {
+  background-color: #356635;
+}
 .label-info {
   background-color: #3a87ad;
 }
+.label-info:hover {
+  background-color: #2d6987;
+}
 @-webkit-keyframes progress-bar-stripes {
   from {
     background-position: 0 0;
@@ -3362,4 +3493,4 @@ a.thumbnail:hover {
 }
 .invisible {
   visibility: hidden;
-}
+}

+ 106 - 85
main/css/responsive.css

@@ -3,7 +3,16 @@
 
 /* Responsive Docs
 -------------------------------------------------- */
-@media (max-width: 480px) {
+@media (max-width: 479px) {
+    /* No chat in mobiles*/
+    #chatmain {
+        display:none;
+    }
+    
+    #footer .container .row {
+        padding-top:25px;
+    }
+    
     .resize_font {
         display:none;
     }
@@ -14,81 +23,25 @@
     
     h4 {
         font-size: 16px;
-    }
-}
-
-@media (max-width: 768px) {
-
-  /* Remove any padding from the body */
-  body {
-    padding-top: 0;
-  }
-  
-  #topbar_push {
-      height: 0px;
-  }
-  
-  /* Removing just for now*/
-  #header4{
-      display:none;
-  }
-  
-  #header2 {
+    }   
         
-  }
-  
-  /* Subnav */
-  .subnav {           
-    border:1px solid #fff;
-    position: static;
-    top: auto;
-    z-index: auto;
-    width: 100%;
-    height: auto;    
-    -webkit-box-shadow: none;
-       -moz-box-shadow: none;
-            box-shadow: none;
-  }
-  .subnav .nav > li {
-    float: none;    
-  }
-  .subnav .nav > li > a {
-    border: 0;
-  }
-  .subnav .nav > li + li > a {
-    border-top: 1px solid #e5e5e5;
-  }
-  .subnav .nav > li:first-child > a,
-  .subnav .nav > li:first-child > a:hover {
-      -webkit-border-radius: 4px 4px 0 0;
-         -moz-border-radius: 4px 4px 0 0;
-              border-radius: 4px 4px 0 0;
-  }
-
-  /* Popovers */
-  .large-bird {
-    display: none;
-  }
-  .popover-well .popover-wrapper {
-    margin-left: 0;
-  }
-
-  /* Space out the show-grid examples */
-  .show-grid [class*="span"] {
-    margin-bottom: 5px;
-  }
-
-  /* Unfloat the back to top link in footer */
-  .footer .pull-right {
-    float: none;
-  }
-  .footer p {
-    margin-bottom: 9px;
-  }
+    .notification-panel {
+        display:none;
+    }
+    
+    #header2 .nav-pills {
+        display:none;
+    }
 }
 
-
-@media (min-width: 480px) and (max-width: 768px) {    
+@media (max-width: 767px) {
+    /* No chat in mobiles*/
+    #chatmain {
+        display:none;
+    }
+    #footer .container .row {
+        padding-top:25px;
+    }
     
     .notification-panel {
         display:none;
@@ -97,25 +50,93 @@
     #header2 .nav-pills {
         display:none;
     }
-}
 
+    /* Remove any padding from the body */
+    body {
+        padding-top: 0;
+    }
+
+    #topbar_push {
+        height: 0px;
+    }
+
+    /* Removing just for now*/
+    #header4 {
+        display:none;
+    }
+
+    /* Subnav */
+    .subnav {           
+        border:1px solid #fff;
+        position: static;
+        top: auto;
+        z-index: auto;
+        width: 100%;
+        height: auto;    
+        -webkit-box-shadow: none;
+            -moz-box-shadow: none;
+                box-shadow: none;
+    }
+    .subnav .nav > li {
+        float: none;    
+    }
+    .subnav .nav > li > a {
+        border: 0;
+    }
+    .subnav .nav > li + li > a {
+        border-top: 1px solid #e5e5e5;
+    }
+    .subnav .nav > li:first-child > a,
+    .subnav .nav > li:first-child > a:hover {
+        -webkit-border-radius: 4px 4px 0 0;
+            -moz-border-radius: 4px 4px 0 0;
+                border-radius: 4px 4px 0 0;
+    }
+
+
+    /* Unfloat the back to top link in footer */
+    .footer .pull-right {
+        float: none;
+    }
+    .footer p {
+        margin-bottom: 9px;
+    }
+    
 
-@media (min-width: 768px) and (max-width: 980px) {
-   
 }
 
+@media (min-width: 768px) and (max-width: 979px) {
+    /* fixes tabs */
+    #header3 .nav-tabs > li > a, #header3 .nav-pills > li > a {
+        padding-left: 6px;
+        padding-right: 6px;
+    }
+    
 
-@media (max-width: 980px) {
+}
 
-  /* Remove any padding from the body */
-  body {
-    padding-top: 0;
-  }
-  
-  #topbar_push {
-      height: 0px;
-  }
+@media (max-width: 979px) {
+    /* Remove any padding from the body */
+    body {
+        padding-top: 0;
+    }
 
+    #topbar_push {
+        height: 0px;
+    }
+}
+
+@media (min-width: 980px) and (max-width: 1024px) {
+    /* fixes tabs */
+    #header3 .nav-tabs > li > a, #header3 .nav-pills > li > a {
+        padding-left: 6px;
+        padding-right: 6px;
+    }
+    
+    /* only for the course tools */
+    #course_tools .row > [class*="span"], #course_tools  .row-fluid > [class*="span"] {     
+        float: left;     
+    }
 }
 
 

+ 4 - 78
main/css/silver_line/default.css

@@ -24,7 +24,7 @@ body {
     min-height: 100%;
     height: auto !important;
     height: 100%;
-    margin: 0 auto -4em;
+    margin: 0 auto -9em;
 }
 
 a {
@@ -37,9 +37,6 @@ a:hover, a:focus {
 blockquote {
     font: 1.1em arial, sans, sans-serif;
 }
-input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
-    background-image:url(images/shadow.gif);
-}
 h3 {
     font: bold 1.3em Arial, sans-serif, sans;
 }
@@ -522,55 +519,16 @@ ul#navigation .student-connect a {
 ==============================================================================
 */
 #footer {
-    font-family: Arial, sans-serif, sans;
+	background-image: url(images/bg.jpg);
 	background-repeat:repeat-x;
+    background-color:#E4E2E5;
     font-weight: bold;
     font-size: 12px;
     color:#000;
-    min-height: 100px;
-    overflow:hidden;
-    background: url('images/headerbg.jpg');
     width: 100%;
-    padding-bottom:10px;
 }
 .push {
-    height: 4em; /* Very important */
-}
-#footer .copyright {
-    float: right;
-    padding-top:25px;
-    margin-right:10px;
-	background-image: url(images/tab-repeat.png);
-	background-repeat:repeat-x;
-}
-.footer_emails{
-    float: left;
-    margin-right:5%;
-    background: url('images/headerbg.jpg');
-    padding-top:25px;
-}
-
-#footer #platformmanager {
-    float: left;
-    margin-left:10px;
-}
-#footer #coursemanager {
-    float: left;
-    margin-left: 10px;
-}
-#bottom_corner {
-}
-/*
-==============================================================================
-    NAVIGATION MENU
-==============================================================================
-*/
-
-#lang_form select {
-    font-family: sans-serif, sans, arial;
-    margin: 1em 18px;
-    width: 179px;
-    text-align: center;
+    height: 9em; /* Very important */
 }
 .menu {
     background: url('images/bglogin.jpg') repeat-y top center;
@@ -752,39 +710,7 @@ float:right;
 .document_owner {
     text-align: right;
 }
-/*
-==============================================================================
-    FORM STYLES
-==============================================================================
-*/
 
-div.row {
-    clear: both;
-    padding-top: 8px;
-    margin-left: 1em;
-}
-div.row div.formw {
-    width: 73%;
-    margin: 0;
-    float:left;
-}
-div.row div.label {
-    float: left;
-    text-align: left;
-    font: bold 115% Arial, sans-serif, sans;
-    width: 25%;
-    margin: 0;
-}
-.formw {
-    margin-top: .2em;
-    padding-left: .6em;
-}
-.label {
-    margin-right: 1em;
-}
-.row .formw input {
-    margin: 0;
-}
 /* Solves the IE inherited margin bug */
 /* IE-7*/
 *:first-child+html .row .formw input {

BIN
main/css/silver_line/images/bg.jpg


+ 3 - 26
main/document/document.inc.php

@@ -429,7 +429,8 @@ function build_document_icon_tag($type, $path) {
         }
     }
 
-    return Display::return_icon($icon, $basename, array());
+    //return Display::return_icon($icon, $basename, array());
+    return Display::return_icon($icon, null, array());
 }
 
 /**
@@ -765,29 +766,6 @@ function create_dir_form($current_dir_id) {
     $form->addElement('text', 'dirname', get_lang('NewDir'));
     $form->addElement('style_submit_button', 'submit', get_lang('CreateFolder'), 'class="add"');
     $new_folder_text = $form->return_form();
-    
-    /*
-    $new_folder_text = '<form action="'.api_get_self().'" method="post">';
-    $new_folder_text .= '<input type="hidden" name="dir_id" value="'.intval($document_id).'" />';
-    $new_folder_text .= '<input type="hidden" name="id" value="'.intval($current_dir_id).'" />';
-
-    // Form title
-    $new_folder_text .= '<legend>'.get_lang('CreateDir').'</legend>';
-
-    // Folder field
-    $new_folder_text .= '<div class="row">';
-    $new_folder_text .= '<div class="label"><span class="form_required">*</span>'.get_lang('NewDir').'</div>';
-    $new_folder_text .= '<div class="formw"><input type="text" name="dirname" /></div>';
-    $new_folder_text .= '</div>';
-
-    // Submit button
-    $new_folder_text .= '<div class="row">';
-    $new_folder_text .= '<div class="label">&nbsp;</div>';
-    $new_folder_text .= '<div class="formw"><button type="submit" class="add" name="create_dir">'.get_lang('CreateFolder').'</button></div>';
-    $new_folder_text .= '</div>';
-    $new_folder_text .= '</form>';
-    $new_folder_text .= '<div style="clear: both; margin-bottom: 10px;"></div>';*/
-
     return $new_folder_text;
 }
 
@@ -934,6 +912,5 @@ function is_browser_viewable($file_extension) {
 	elseif ($file_extension=="webm"){
 		return api_browser_support('webm');
 	}
-
     return $result;
-}
+}

+ 2 - 4
main/document/document.php

@@ -469,7 +469,6 @@ if (empty($document_data['parents'])) {
 if (isset($_GET['createdir'])) {
     $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('CreateDir'));
 }
-$htmlHeadXtra[] = api_get_jquery_ui_js();
 
 $js_path 		= api_get_path(WEB_LIBRARY_PATH).'javascript/';
 /*
@@ -909,7 +908,7 @@ if (!$is_certificate_mode) {
     $form = new FormValidator('search_document', 'get', '', '', null, false);
     $renderer = & $form->defaultRenderer();
     $renderer->setElementTemplate('<span>{element}</span> ');
-    $form->add_textfield('keyword', '', false);
+    $form->add_textfield('keyword', '', false, array('class'=>'span2'));
     $form->addElement('style_submit_button', 'submit', get_lang('Search'), 'class="search"');
     $form->display();
     echo '</span>';
@@ -1186,7 +1185,6 @@ if (count($row) == 12) {
 $default_column = $is_allowed_to_edit ? 2 : 1;
 $tablename = $is_allowed_to_edit ? 'teacher_table' : 'student_table';
 
-//var_dump($column_show,$column_order);
 $table = new SortableTableFromArrayConfig($sortable_data, $default_column, 20, $tablename, $column_show, $column_order, 'ASC', true);
 
 if(isset($_GET['keyword'])) {
@@ -1212,7 +1210,7 @@ $table->set_header($column++, get_lang('Size'),true, array('style' => 'width:50p
 $table->set_header($column++, get_lang('Date'),true, array('style' => 'width:105px;'));
 // Admins get an edit column
 if ($is_allowed_to_edit || $group_member_with_upload_rights || is_my_shared_folder(api_get_user_id(), $curdirpath, $session_id)) {
-    $table->set_header($column++, get_lang('Actions'), false, array ('style' => 'width:160px;'));
+    $table->set_header($column++, get_lang('Actions'), false, array ('style' => 'width:160px;'), array('class' => 'td_actions'));
 }
 
 // Actions on multiple selected documents

+ 1 - 5
main/document/document_lite.php

@@ -22,9 +22,7 @@ require_once $lib_path.'tablesort.lib.php';
 
 api_protect_course_script(true);
 
-$htmlHeadXtra[] = api_get_jquery_ui_js(true);
-
-
+$htmlHeadXtra[] = api_get_jqgrid_js();
 
 $course_info 	 = api_get_course_info();
 $course_dir      = $course_info['path'].'/document';
@@ -245,8 +243,6 @@ if (empty($document_data['parents'])) {
 if (isset($_GET['createdir'])) {
     $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('CreateDir'));
 }
-$htmlHeadXtra[] = api_get_jquery_ui_js();
-
 $js_path 		= api_get_path(WEB_LIBRARY_PATH).'javascript/';
 /*
 $htmlHeadXtra[] = '<script type="text/javascript" src="'.$js_path.'yoxview/yox.js"></script>';

+ 4 - 0
main/document/downloadfolder.inc.php

@@ -11,6 +11,9 @@
 set_time_limit(0);
 
 require_once '../inc/global.inc.php';
+
+api_protect_course_script();
+
 $document_data = DocumentManager::get_document_data_by_id($_GET['id'], api_get_course_id());
 $path          = $document_data['path'];
 
@@ -72,6 +75,7 @@ if (api_is_allowed_to_edit()) {
 					docs.filetype		= 'file' AND props.visibility<>'2' AND 
 					props.to_group_id	= ".$to_group_id." AND 
 					props.c_id          = ".$course_id." AND
+                    props.id_session    IN ('0', '$session_id') AND
 					docs.c_id 			= ".$course_id." ";
 	$query = Database::query($sql);
 	// Add tem to the zip file

+ 0 - 4
main/exercice/admin.php

@@ -299,10 +299,6 @@ if($modifyIn == 'thisExercise') {
 		$noPHP_SELF=true;
 	}
 }
-
-
-$htmlHeadXtra[] = api_get_jquery_ui_js();
-
 $htmlHeadXtra[] = '<script type="text/javascript"> 
         
 function multiple_answer_true_false_onchange(variable) {

+ 4 - 4
main/exercice/exercice.php

@@ -22,7 +22,6 @@ require_once '../gradebook/lib/be.inc.php';
 // Setting the tabs
 $this_section = SECTION_COURSES;
 
-$htmlHeadXtra[] = api_get_jquery_ui_js();
 $htmlHeadXtra[] = api_get_js('qtip2/jquery.qtip.min.js');
 $htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/qtip2/jquery.qtip.min.css');
 
@@ -417,7 +416,7 @@ while ($row = Database :: fetch_array($result,'ASSOC')) {
     $exercise_list[] = $row;
 } 
 
-echo '<table class="data_table">';    
+echo '<table class="'.Display::return_default_table_class().'">';    
 if (!empty($exercise_list)) {  
     /*  Listing exercises  */
     
@@ -745,8 +744,9 @@ if (!empty($exercise_list)) {
                 $class = 'row_odd';
             }
             
-            if ($is_allowedToEdit)
-                $item .=  Display::tag('td', $actions);                    
+            if ($is_allowedToEdit) {
+                $item .=  Display::tag('td', $actions, array('class' => 'td_actions'));                    
+            }
             echo Display::tag('tr',$item, array('class'=>$class));
                    
             $count++;

+ 14 - 12
main/exercice/exercise.class.php

@@ -1057,11 +1057,11 @@ class Exercise {
 			if (api_get_setting('search_enabled') === 'true') {
 				require_once api_get_path(LIBRARY_PATH) . 'specific_fields_manager.lib.php';
 
-				$form->addElement ('checkbox', 'index_document','', get_lang('SearchFeatureDoIndexDocument'));
-				$form->addElement ('html','<br /><div class="row">');
-				$form->addElement ('html', '<div class="label">'. get_lang('SearchFeatureDocumentLanguage') .'</div>');
-				$form->addElement ('html', '<div class="formw">'. api_get_languages_combo() .'</div>');
-				$form->addElement ('html','</div><div class="sub-form">');
+				$form->addElement ('checkbox', 'index_document','', get_lang('SearchFeatureDoIndexDocument'));				
+				//$form->addElement ('html', '<div class="label">'. get_lang('SearchFeatureDocumentLanguage') .'</div>');
+				//$form->addElement ('html', '<div class="formw">'. api_get_languages_combo() .'</div>');
+                $form->addElement ('select_language', 'language', get_lang('SearchFeatureDocumentLanguage'));
+				//$form->addElement ('html','</div><div class="sub-form">');
 
 				$specific_fields = get_specific_field_list();
 
@@ -1077,7 +1077,7 @@ class Exercise {
 						$defaults[$specific_field['code']] = implode(', ', $arr_str_values);
 					}
 				}
-				$form->addElement ('html','</div>');
+				//$form->addElement ('html','</div>');
 			}
 
 			$form->addElement('html','</div>');  //End advanced setting
@@ -3353,15 +3353,16 @@ class Exercise {
 	 * @return bool true if is active
 	 */
 		
-	 public function is_visible($lp_id = 0, $lp_item_id = 0 , $lp_item_view_id = 0) {
+	 public function is_visible($lp_id = 0, $lp_item_id = 0 , $lp_item_view_id = 0, $filter_by_admin = true) {
 		//1. By default the exercise is visible
 		$is_visible = true;		
 		
-		//1.1 Admins and teachers can access to the exercise
-		
-		if (api_is_platform_admin() || api_is_course_admin()) {
-			return array('value' => true, 'message' => '');            
-		}
+		//1.1 Admins and teachers can access to the exercise		
+        if ($filter_by_admin) {
+            if (api_is_platform_admin() || api_is_course_admin()) {
+                return array('value' => true, 'message' => '');            
+            }
+        }
 		
 		//2. If the exercise is not active 
 		if ($this->active == 0) {
@@ -3399,6 +3400,7 @@ class Exercise {
 		if ($is_visible) {
 			if ($this->selectAttempts() > 0) {
 				$attempt_count = get_attempt_count_not_finished(api_get_user_id(), $this->id, $lp_id, $lp_item_id, $lp_item_view_id);
+                
 				if ($attempt_count >= $this->selectAttempts()) {					
                     $message = sprintf(get_lang('ReachedMaxAttempts'), $this->name, $this->selectAttempts());
 					$is_visible = false;

+ 7 - 4
main/exercice/exercise.lib.php

@@ -859,10 +859,12 @@ function get_exam_results_data($from, $number_of_items, $column, $direction, $ex
                 INNER JOIN $TBL_GROUP_REL_USER gru ON ( gru.user_id = u.user_id AND gru.c_id=".api_get_course_int_id().")
                 INNER JOIN $TBL_GROUP g ON (gru.group_id = g.id)
             )";
-        }        
-                
-        if (strpos($extra_where_conditions, 'group_all')) {
+        }
+           
+        if (strpos($extra_where_conditions, 'group_all')) {        
             $extra_where_conditions = str_replace("AND (  group_id = 'group_all'  )", '', $extra_where_conditions);
+            $extra_where_conditions = str_replace("AND group_id = 'group_all'", '', $extra_where_conditions);
+            
             $sql_inner_join_tbl_user = " 
             (
                 SELECT u.user_id, firstname, lastname, email, username, ' ' as group_name
@@ -872,6 +874,7 @@ function get_exam_results_data($from, $number_of_items, $column, $direction, $ex
         
         if (strpos($extra_where_conditions, 'group_none')) {
             $extra_where_conditions = str_replace("AND (  group_id = 'group_none'  )", "AND (  group_id is null  )", $extra_where_conditions);
+            $extra_where_conditions = str_replace("AND group_id = 'group_none'", "AND (  group_id is null  )", $extra_where_conditions);
             $sql_inner_join_tbl_user = " 
             (
                 SELECT u.user_id, firstname, lastname, email, username, g.name as group_name, g.id as group_id
@@ -924,7 +927,7 @@ function get_exam_results_data($from, $number_of_items, $column, $direction, $ex
                     AND orig_lp_item_id = 0
                     AND ce.c_id=".api_get_course_int_id()."					
                     $exercise_where ";
-         //var_dump($sql );
+         
          // sql for hotpotatoes tests for teacher / tutor view
     
         $hpsql = "SELECT 

+ 1 - 1
main/exercice/exercise_report.php

@@ -22,7 +22,7 @@ require_once '../gradebook/lib/be.inc.php';
 // Setting the tabs
 $this_section = SECTION_COURSES;
 
-$htmlHeadXtra[] = api_get_jquery_ui_js(true);
+$htmlHeadXtra[] = api_get_jqgrid_js();
 
 // Access control
 api_protect_course_script(true);

+ 0 - 2
main/exercice/exercise_submit.php

@@ -48,8 +48,6 @@ api_protect_course_script(true);
 
 $is_allowedToEdit = api_is_allowed_to_edit(null,true);
 
-$htmlHeadXtra[] = api_get_jquery_ui_js();
-
 if (api_get_setting('show_glossary_in_extra_tools') == 'true') {
     $htmlHeadXtra[] = api_get_js('glossary.js'); //Glossary
     $htmlHeadXtra[] = api_get_js('jquery.highlight.js'); //highlight

+ 2 - 1
main/exercice/exercise_submit_modal.php

@@ -10,9 +10,10 @@
 $language_file=array('exercice');
 require_once '../inc/global.inc.php';
 api_protect_course_script(false);
-require_once api_get_path(INCLUDE_PATH).'reduced_header.inc.php';
 require_once api_get_path(LIBRARY_PATH).'geometry.lib.php';
 
+Display::display_reduced_header();
+
 $dbg_local = 0;
 require_once 'exercise.class.php';
 require_once 'question.class.php';

+ 1 - 1
main/exercice/live_stats.php

@@ -28,7 +28,7 @@ $interbreadcrumb[] = array ("url" => "exercice.php?gradebook=$gradebook", "name"
 $interbreadcrumb[] = array ("url" => "admin.php?exerciseId=$exercise_id","name" => $objExercise->name);
 
 //Add the JS needed to use the jqgrid
-$htmlHeadXtra[] = api_get_jquery_ui_js(true);
+$htmlHeadXtra[] = api_get_jqgrid_js();
 
 // The header.
 Display::display_header($tool_name);

+ 1 - 1
main/exercice/matching.class.php

@@ -128,7 +128,7 @@ class Matching extends Question {
 
 			$group[] = FormValidator :: createElement ('text', 'answer['.$i.']',null, 'size="60" style="margin-left: 0em;"');
 			$group[] = FormValidator :: createElement ('select', 'matches['.$i.']',null,$a_matches);
-			$group[] = FormValidator :: createElement ('text', 'weighting['.$i.']',null, array('class' => 'span9', 'value' => 10));
+			$group[] = FormValidator :: createElement ('text', 'weighting['.$i.']',null, array('class' => 'span1', 'value' => 10));
 			$form -> addGroup($group, null, null, '</td><td>');
 			$form -> addElement ('html', '</td></tr>');
 		}

+ 1 - 1
main/exercice/multiple_answer.class.php

@@ -127,7 +127,7 @@ class MultipleAnswer extends Question {
 				$form->addElement('html_editor', 'comment['.$i.']',null, 'style="vertical-align:middle"', array('ToolbarSet' => 'TestProposedAnswer', 'Width' => '100%', 'Height' => '100'));
 			}
 
-			$form->addElement('text', 'weighting['.$i.']',null, array('class' => "span9", 'value' => '0'));
+			$form->addElement('text', 'weighting['.$i.']',null, array('class' => "span1", 'value' => '0'));
 			$form -> addElement ('html', '</tr>');
 		}
 		$form -> addElement ('html', '</table>');

+ 41 - 24
main/exercice/overview.php

@@ -14,7 +14,6 @@ require_once 'exercise.class.php';
 require_once '../inc/global.inc.php';
 require_once 'exercise.lib.php';
 
-
 // Clear the exercise session just in case
 if (isset ($_SESSION['objExercise'])) {
 	api_session_unregister('objExercise');
@@ -33,7 +32,7 @@ if (!$result) {
 	api_not_allowed(true);
 }
 
-$gradebook 			= isset($_GET['gradebook']) 			? Security :: remove_XSS($_GET['gradebook']) : null;
+$gradebook 			= isset($_GET['gradebook'])             ? Security :: remove_XSS($_GET['gradebook']) : null;
 $learnpath_id       = isset($_REQUEST['learnpath_id']) 		? intval($_REQUEST['learnpath_id']) : null;
 $learnpath_item_id  = isset($_REQUEST['learnpath_item_id']) ? intval($_REQUEST['learnpath_item_id']) : null;
 $origin  			= isset($_REQUEST['origin']) 			? Security::remove_XSS($_REQUEST['origin']) : null;
@@ -70,7 +69,10 @@ if ($is_allowed_to_edit ) {
 	$edit_link = Display::url(Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL), api_get_path(WEB_CODE_PATH).'exercice/admin.php?'.api_get_cidreq().'&id_session='.api_get_session_id().'&exerciseId='.$objExercise->id);
 }
 
+//Exercise name
 $html .= Display::tag('h1', $objExercise->name .' '.$edit_link);
+
+//Exercise description
 $html .= Display::div($objExercise->description, array('class'=>'exercise_description'));
 
 $extra_params = '';
@@ -78,6 +80,7 @@ if (isset($_GET['preview'])) {
 	$extra_params = '&preview=1';	
 }
 
+//Exercise button
 //Notice we not add there the lp_item_view__id because is not already generated 
 $exercise_url = api_get_path(WEB_CODE_PATH).'exercice/exercise_submit.php?'.api_get_cidreq().'&exerciseId='.$objExercise->id.'&origin='.$origin.'&learnpath_id='.$learnpath_id.'&learnpath_item_id='.$learnpath_item_id.$extra_params;
 $label = get_lang('StartTest');
@@ -85,38 +88,48 @@ if ($time_control && !empty($clock_expired_time)) {
 	$label = get_lang('ContinueTest');
 }
 $exercise_stat_info = $objExercise->get_stat_track_exercise_info($learnpath_id, $learnpath_item_id, 0);
+$attempt_list = null;
 if (isset($exercise_stat_info['exe_id'])) {
 	$attempt_list = get_all_exercise_event_by_exe_id($exercise_stat_info['exe_id']);
 }
-$message = '';
-if (!empty($attempt_list)) {
-	$message = Display::return_message(get_lang('YouTriedToResolveThisExerciseEarlier'));
-	$label = get_lang('ContinueTest');
-}
-$html .= $message;
+
 $exercise_url_button = Display::url($label, $exercise_url, array('class'=>'a_button blue bigger round'));
 
-$visible_return = $objExercise->is_visible($learnpath_id, $learnpath_item_id);
+$visible_return = $objExercise->is_visible($learnpath_id, $learnpath_item_id, null, false);
         
 if ($visible_return['value'] == false) {
 	$exercise_url = api_get_path(WEB_CODE_PATH).'exercice/exercise_report.php?'.api_get_cidreq().'&exerciseId='.$objExercise->id;	
 	$exercise_url_button = $visible_return['message'];    
 }
 
-$options  = Display::div('', array('class'=>'left_option'));
+
+//Message "you already try this exercise"
+
+$message = '';
+if (!empty($attempt_list)) {
+	$message = Display::return_message(get_lang('YouTriedToResolveThisExerciseEarlier'));
+	$label = get_lang('ContinueTest');
+}
+$html .= $message;
+
+$attempts = get_exercise_results_by_user(api_get_user_id(), $objExercise->id, api_get_course_id(), api_get_session_id(), $learnpath_id, $learnpath_item_id, 'desc');
+$counter = count($attempts);
+
+$options = '';
 if (!empty($exercise_url_button)) {
 	$options .= $exercise_url_button;
 }
+$options  = Display::div($options, array('class'=>'offset4 span3'));
+
 
-$attempts = get_exercise_results_by_user(api_get_user_id(), $objExercise->id, api_get_course_id(), api_get_session_id(), $learnpath_id, $learnpath_item_id, 'desc');
 
 $my_attempt_array = array();
-$counter = count($attempts)+1;
 $table_content = '';
 
 if (!empty($attempts)) {
-	foreach ($attempts as $attempt_result) {	
-		$counter--;
+    $i = $counter;
+	foreach ($attempts as $attempt_result) {		
+        
 		$score = show_score($attempt_result['exe_result'], $attempt_result['exe_weighting']);
 		$attempt_url 	= api_get_path(WEB_CODE_PATH).'exercice/result.php?'.api_get_cidreq().'&id='.$attempt_result['exe_id'].'&id_session='.api_get_session_id().'&height=500&width=750';
 		$attempt_link 	= Display::url(get_lang('Show'), $attempt_url, array('class'=>'thickbox a_button white small'));
@@ -126,9 +139,8 @@ if (!empty($attempts)) {
 			//$attempt_link = Display::return_icon('quiz_na.png', get_lang('NoResult'), array(), ICON_SIZE_SMALL);
 		if ($attempt_result['attempt_revised'] == 0) {
 			$teacher_revised = Display::span(get_lang('NotValidated'), array('class'=>'label_tag notice'));
-		}
-				
-		$row = array('count'	 	=> $counter,
+		}				
+		$row = array('count'	 	=> $i,
 					 'date'	 		=> api_convert_and_format_date($attempt_result['start_date'], DATE_TIME_FORMAT_LONG)
 				);
 		$attempt_link .= "&nbsp;&nbsp;&nbsp;".$teacher_revised;
@@ -141,6 +153,7 @@ if (!empty($attempts)) {
 			$row['attempt_link'] = $attempt_link;			
 		}									
 		$my_attempt_array[] = $row;
+        $i--;
 	}
 	
 	$table = new HTML_Table(array('class' => 'data_table'));
@@ -185,23 +198,27 @@ if (!empty($attempts)) {
 if ($objExercise->selectAttempts()) {
 	if ($is_allowed_to_edit) {
 		//$options.= Display::div(get_lang('ExerciseAttempts').' '.$objExercise->selectAttempts(), array('class'=>'right_option'));
-	} else {		
 	}	
+    $attempt_message = get_lang('Attempts').' '.$counter.' / '.$objExercise->selectAttempts();
+    
 	if ($counter == $objExercise->selectAttempts()) {
-		$class = 'red_alert';
-	}
-	$options.= Display::div(get_lang('Attempts').' '.$counter.' / '.$objExercise->selectAttempts(), array('class'=>"right_option $class"));
-	
+		$attempt_message = Display::return_message($attempt_message, 'error');
+	} else {
+        $attempt_message = Display::return_message($attempt_message, 'info');
+    }
+	$options.= Display::div($attempt_message, array('class'=>"offset2 span2"));	
 }
+
 if ($time_control) {
 	$html.=  '<div align="left" id="wrapper-clock"><div id="square" class="rounded"><div id="text-content" align="center" class="count_down"></div></div></div>';
 }
-$html.=  Display::div($options, array('class'=>'exercise_overview_options'));
+
+$html.=  Display::div(Display::div($options, array('class'=>'exercise_overview_options span12')), array('class'=>' row'));
 
 
 $html .= $table_content;
 
-echo Display::div($html, array('class'=>'rounded_div', 'style'=>'width:96%'));
+echo $html;
 
 if ($origin != 'learnpath') {
 	Display::display_footer();

+ 23 - 45
main/exercice/question.class.php

@@ -1131,18 +1131,9 @@ abstract class Question
 				}
 			}
 		}		
-		</script>';
-
-
-		$renderer = $form->defaultRenderer();
-		$form->addElement('html','<div class="form">');
+		</script>';		
 		// question name
-		$form->addElement('text','questionName','<span class="form_required">*</span> '.get_lang('Question'), array('class' => 'span6'));
-		$renderer->setElementTemplate('<div class="row"><div class="label">{label}</div><div class="formw" >{element}</div></div>','questionName');
-		$renderer->setElementTemplate('<div class="row"><div class="label">{label}</div><div class="formw">{element}</div></div>','questionLevel');
-		// 
-		// Enrich question		
-		// 
+		$form->addElement('text','questionName', get_lang('Question'), array('class' => 'span6'));		
 		$form->addRule('questionName', get_lang('GiveQuestion'), 'required');
 
 		// default content
@@ -1159,31 +1150,20 @@ abstract class Question
 		}
 		if(!api_is_allowed_to_edit(null,true)) $editor_config['UserStatus'] = 'student';
 
-		$form -> addElement('html','<div class="row">
-		<div class="label"></div>
-		<div class="formw" style="height:50px">
-			<a href="javascript://" onclick=" return show_media()"> <span id="media_icon"> <img style="vertical-align: middle;" src="../img/looknfeel.png" alt="" />&nbsp;'.get_lang('EnrichQuestion').'</span></a>
-		</div>
-		</div>');
+		$form -> addElement('advanced_settings','
+			<a href="javascript://" onclick=" return show_media()"><span id="media_icon"><img style="vertical-align: middle;" src="../img/looknfeel.png" alt="" />&nbsp;'.get_lang('EnrichQuestion').'</span></a>		
+		');
 
 		$form -> addElement ('html','<div class="HideFCKEditor" id="HiddenFCKquestionDescription" >');
 		$form->add_html_editor('questionDescription', get_lang('langQuestionDescription'), false, false, $editor_config);
 		$form -> addElement ('html','</div>');
 
-		$renderer->setElementTemplate('<div class="row"><div class="label">{label}</div><div class="formw">{element}</div></div>','questionDescription');
-
-		// 
 		// Advanced parameters
-		// 
-		// question level
-		//@todo move levles into a table
-		$select_level = array (1=>1,2=>2,3=>3,4=>4,5=>5);
-		/*
-        $radios_results_enabled = array();
-		foreach($select_level as $val) {
-			$radios_results_enabled[] = FormValidator :: createElement ('radio', null, null,$val,$val);            
-		}
-		$form->addGroup($radios_results_enabled,'questionLevel',get_lang('Difficulty'));*/
+		$form->addElement('advanced_settings','<a href="javascript:void(0)" onclick="visiblerDevisibler(\'id_advancedOption\')"><img id="id_advancedOptionImg" style="vertical-align:middle;" src="../img/div_show.gif" alt="" />&nbsp;'.get_lang("AdvancedParameters").'</a>');
+        
+		$select_level = array (1=>1,2=>2,3=>3,4=>4,5=>5);	
+        
+        $form->addElement('html','<div id="id_advancedOption" style="display:none;">');
         
         $form->addElement('select', 'questionLevel',get_lang('Difficulty'), $select_level);
         
@@ -1193,12 +1173,7 @@ abstract class Question
 		$tabCat = array();
 		$tabCat = Testcategory::getCategoriesIdAndName(); 
 		$form->addElement('select', 'questionCategory', get_lang('Category'), $tabCat);
-		// note always positive for multiple answer questions
-		// Form's style
-		$renderer->setElementTemplate('<div class="row"><div class="label">{label}</div><div class="formw">{element}</div></div>&nbsp;','questionName');
-		$renderer->setElementTemplate('<div style="margin-left:0%;float:right;text-align:left;width:89%" class=""><a href="javascript:void(0)" onclick="visiblerDevisibler(\'id_advancedOption\')"><img id="id_advancedOptionImg" style="vertical-align:middle;" src="../img/div_show.gif" alt="" />&nbsp;'.get_lang("AdvancedParameters").'</a><div id="id_advancedOption" style="background-color:#EFEFEF;display:none;"><div class="row"><div class="label">{label}</div><div class="formw">{element}</div></div>','questionLevel');
-		$renderer->setElementTemplate('<div class="row"><div class="label">{label}</div><div class="formw">{element}</div></div><br/></div></div><div style="clear:both">&nbsp;</div>','questionCategory');
-		// fhub
+		
 		// hidden values
 		$form->addElement('hidden','myid',$_REQUEST['myid']);
         
@@ -1214,18 +1189,19 @@ abstract class Question
         }
         
 		$form->addElement('html','</div>');
+        
 		// default values
 		$defaults = array();		
-		$defaults['questionName']          = $this -> question;
-		$defaults['questionDescription']   = $this -> description;
-		$defaults['questionLevel']         = $this -> level;
-		$defaults['questionCategory'] = $this->category; // hub 12-10-2011
+		$defaults['questionName']           = $this -> question;
+		$defaults['questionDescription']    = $this -> description;
+		$defaults['questionLevel']          = $this -> level;
+		$defaults['questionCategory']       = $this->category; // hub 12-10-2011
 		
-    //Came from he question pool        
-    if (isset($_GET['fromExercise'])) {   
-        $form->setDefaults($defaults);   
-    }
-        
+        //Came from he question pool        
+        if (isset($_GET['fromExercise'])) {   
+            $form->setDefaults($defaults);   
+        }
+
 		if (!empty($_REQUEST['myid'])) {
 			$form->setDefaults($defaults);
 		} else {
@@ -1233,7 +1209,9 @@ abstract class Question
 				$form->setDefaults($defaults);
 			}
 		}
+        
 	}
+    
 
 	/**
 	 * function which process the creation of questions

+ 1 - 1
main/exercice/question_list_admin.inc.php

@@ -195,7 +195,7 @@ if (!$inATest) {
 				$actions     = Display::tag('div',$edit_link.$clone_link.$delete_link, array('class'=>'edition','style'=>'width:100px; right:10px;     margin-top: 0px;     position: absolute;     top: 10%;'));
 	
                 $title = Security::remove_XSS($objQuestionTmp->selectTitle());
-                $move = Display::return_icon('move.png',get_lang('Move'), array('class'=>'moved', 'style'=>'margin-bottom:-0.5em;'));
+                $move = Display::return_icon('all_directions.png',get_lang('Move'), array('class'=>'moved', 'style'=>'margin-bottom:-0.5em;'));
              
                 // Question name
 	      

+ 2 - 1
main/exercice/tests_category.php

@@ -199,9 +199,10 @@ function add_category_form($in_action) {
 function display_add_category() {
 	echo '<div class="actions">';
 	echo '<a href="exercice.php?'.api_get_cidreq().'">'.Display::return_icon('back.png', get_lang('GoBackToQuestionList'),'',ICON_SIZE_MEDIUM).'</a>';			
-	echo '<a href="'.api_get_self().'?action=addcategory">'.Display::return_icon('question_category.gif').'</a>';
+	echo '<a href="'.api_get_self().'?action=addcategory">'.Display::return_icon('question_category.gif', get_lang('AddACategory')).'</a>';
 	echo '</div>';
 	echo "<br/>";
+	echo "<fieldset><legend>".get_lang('QuestionCategory')."</legend></fieldset>";
 }
 
 

+ 1 - 1
main/exercice/unique_answer.class.php

@@ -228,7 +228,7 @@ class UniqueAnswer extends Question {
 
 				//$form->addElement('select', 'destination'.$i, get_lang('SelectQuestion').' : ',$select_question,'multiple');
 
-				$form->addElement('text', 'weighting['.$i.']', null, array('class' => "span9", 'value' => '0'));                    
+				$form->addElement('text', 'weighting['.$i.']', null, array('class' => "span1", 'value' => '0'));                    
 				$form->addElement ('html', '</tr>');                
 			}
 

+ 2 - 2
main/exercice/unique_answer_no_option.class.php

@@ -259,7 +259,7 @@ class UniqueAnswerNoOption extends Question {
 
 			//$form->addElement('select', 'destination'.$i, get_lang('SelectQuestion').' : ',$select_question,'multiple');
 
-			$form->addElement('text', 'weighting['.$i.']', null, array('class' => "span9", 'value' => '0'));
+			$form->addElement('text', 'weighting['.$i.']', null, array('class' => "span1", 'value' => '0'));
 			$form->addElement('html', '</tr>');
             $i++;				
 		}	
@@ -309,7 +309,7 @@ class UniqueAnswerNoOption extends Question {
     
             //$form->addElement('select', 'destination'.$i, get_lang('SelectQuestion').' : ',$select_question,'multiple');
     
-            $form->addElement('text', 'weighting['.$i.']', null, array('class' => "span9", 'value' => '0', 'readonly' =>'readonly'));
+            $form->addElement('text', 'weighting['.$i.']', null, array('class' => "span1", 'value' => '0', 'readonly' =>'readonly'));
             $form->addElement ('html', '</tr>');
         
          //}

+ 1 - 1
main/forum/editpost.php

@@ -129,7 +129,7 @@ if (isset($_GET['origin'])) {
 }
 
 if ($origin == 'learnpath') {
-    include api_get_path(INCLUDE_PATH).'reduced_header.inc.php';
+    Display::display_reduced_header();
 } else {
     Display :: display_header(null);    
 }

+ 6 - 5
main/forum/forumfunction.inc.php

@@ -57,6 +57,7 @@ function handle_forum_and_forumcategories($lp_id = null) {
     $post_submit_cat    = isset($_POST['SubmitForumCategory']) ?  true : false;
     $post_submit_forum  = isset($_POST['SubmitForum']) ? true : false;
     $get_id = isset($_GET['id']) ? $_GET['id'] : '';
+    
     // Adding a forum category
     if (($action_forum_cat == 'add' && $_GET['content'] == 'forumcategory') || $post_submit_cat) {
         show_add_forumcategory_form(array(), $lp_id);//$lp_id when is called from learning path
@@ -81,7 +82,7 @@ function handle_forum_and_forumcategories($lp_id = null) {
         $list_threads = get_threads($id_forum);
 
         for ($i = 0; $i < count($list_threads); $i++) {
-            $messaje = delete_forum_forumcategory_thread('thread', $list_threads[$i]['thread_id']);         
+            delete_forum_forumcategory_thread('thread', $list_threads[$i]['thread_id']);         
             require_once api_get_path(SYS_CODE_PATH).'gradebook/lib/gradebook_functions.inc.php';
             $link_id = is_resource_in_course_gradebook(api_get_course_id(), 5 , intval($list_threads[$i]['thread_id']), api_get_session_id());
             if ($link_id !== false) {
@@ -118,11 +119,11 @@ function handle_forum_and_forumcategories($lp_id = null) {
  * @author Juan Carlos Raña Trabado (return to lp_id)
  * @version may 2011, Chamilo 1.8.8
  */
-function show_add_forumcategory_form($inputvalues = array(),$lp_id) {
+function show_add_forumcategory_form($inputvalues = array(), $lp_id) {
     $gradebook = Security::remove_XSS($_GET['gradebook']);
 
     // Initialize the object.
-    $form = new FormValidator('forumcategory', 'post', 'index.php?gradebook='.$gradebook.'');
+    $form = new FormValidator('forumcategory', 'post', 'index.php?gradebook='.$gradebook.'&'.  api_get_cidreq());
    	// hidden field if from learning path
    	
 	$form->addElement('hidden', 'lp_id', $lp_id);
@@ -143,7 +144,7 @@ function show_add_forumcategory_form($inputvalues = array(),$lp_id) {
     if ($form->validate()) {
         $check = Security::check_token('post');
         if ($check) {
-            $values = $form->exportValues();            
+            $values = $form->exportValues();
             store_forumcategory($values);
         }
         Security::clear_token();
@@ -172,7 +173,7 @@ function show_add_forum_form($inputvalues = array(), $lp_id) {
 
     $gradebook = Security::remove_XSS($_GET['gradebook']);
     // Initialize the object.
-    $form = new FormValidator('forumcategory', 'post', 'index.php?gradebook='.$gradebook.'');
+    $form = new FormValidator('forumcategory', 'post', 'index.php?gradebook='.$gradebook.'&'.  api_get_cidreq());
 
     // The header for the form
     if (!empty($inputvalues)) {

+ 1 - 1
main/forum/forumqualify.php

@@ -66,7 +66,7 @@ if (!empty($gradebook) && $gradebook=='view') {
 }
 
 if ($origin=='learnpath') {
-    include(api_get_path(INCLUDE_PATH).'reduced_header.inc.php');
+    Display::display_reduced_header();
 } else {
     if (!empty($_SESSION['toolgroup'])) {
 

+ 1 - 1
main/forum/forumsearch.php

@@ -81,7 +81,7 @@ if ($origin == 'group') {
 
 // Display the header.
 if ($origin == 'learnpath') {
-    include api_get_path(INCLUDE_PATH).'reduced_header.inc.php';
+    Display::display_reduced_header();
 } else {
     Display :: display_header($nameTools);
 }

+ 14 - 41
main/forum/index.php

@@ -30,6 +30,7 @@ $language_file = 'forum';
 // Including the global initialization file.
 require_once '../inc/global.inc.php';
 
+
 $htmlHeadXtra[] = '<script type="text/javascript">
     $(document).ready(function(){ $(\'.hide-me\').slideUp() });
     function hidecontent(content){ $(content).slideToggle(\'normal\'); }
@@ -82,7 +83,11 @@ if (!empty($gradebook) && $gradebook == 'view') {
 
 $search_forum = isset($_GET['search']) ? Security::remove_XSS($_GET['search']) : '';
 
-if (isset($_GET['action']) && $_GET['action'] == 'add') {
+/* ACTIONS */
+
+$actions = isset($_GET['action']) ? $_GET['action'] : '';
+
+if ($actions == 'add') {
     switch ($_GET['content']) {
         case 'forum':
             $interbreadcrumb[] = array('url' => 'index.php?gradebook='.$gradebook.'&amp;search='.$search_forum, 'name' => get_lang('ForumCategories'));
@@ -106,9 +111,6 @@ Display::display_introduction_section(TOOL_FORUM);
 
 $form_count = 0;
 
-/* ACTIONS */
-
-$get_actions = isset($_GET['action']) ? $_GET['action'] : '';
 if (api_is_allowed_to_edit(false, true)) {
 	
 	//if is called from a learning path lp_id	
@@ -117,7 +119,7 @@ if (api_is_allowed_to_edit(false, true)) {
 }
 
 // Notification
-if (isset($_GET['action']) && $_GET['action'] == 'notify' && isset($_GET['content']) && isset($_GET['id'])) {
+if ($actions == 'notify' && isset($_GET['content']) && isset($_GET['id'])) {
     if (api_get_session_id() != 0 && api_is_allowed_to_session_edit(false, true) == false) {
         api_not_allowed();
     }
@@ -140,10 +142,8 @@ event_access_tool(TOOL_FORUM);
 */
 
 // Step 1: We store all the forum categories in an array $forum_categories.
-$forum_categories = array();
 $forum_categories_list = get_forum_categories();
 
-
 // Step 2: We find all the forums (only the visible ones if it is a student).
 $forum_list	= array();
 $forum_list	= get_forums();
@@ -173,7 +173,7 @@ if (isset($_SESSION['_gid'])) {
 
 /* ACTION LINKS */
 
-$session_id = isset($_SESSION['id_session']) ? $_SESSION['id_session'] : false;
+$session_id = api_get_session_id();
 
 echo '<div class="actions">';
 
@@ -198,7 +198,7 @@ echo '</div>';
 
 // Step 3: We display the forum_categories first.
 if (is_array($forum_categories_list)) {
-    foreach ($forum_categories_list as $forum_category_key => $forum_category) {
+    foreach ($forum_categories_list as $forum_category) {
 
          // The forums in this category.
         $forums_in_category = get_forums_in_category($forum_category['cat_id']);
@@ -247,9 +247,8 @@ if (is_array($forum_categories_list)) {
             echo '</tr>';
 
             // Step 5: We display all the forums in this category.
-            $forum_count = 0;
-
-            foreach ($forum_list as $key => $forum) {
+            
+            foreach ($forum_list as $forum) {
                 // Here we clean the whatnew_post_info array a little bit because to display the icon we
                 // test if $whatsnew_post_info[$forum['forum_id']] is empty or not.
                 if (!empty($whatsnew_post_info)) {
@@ -282,36 +281,11 @@ if (is_array($forum_categories_list)) {
                         $show_forum = true;
                     } else {
                         // you are not a teacher
-                        //echo 'student';
                         // it is not a group forum => show forum (invisible forums are already left out see get_forums function)
-                        if ($forum['forum_of_group'] == '0') {
-                            //echo '-gewoon forum';
+                        if ($forum['forum_of_group'] == '0') {    
                             $show_forum = true;
                         } else {
-                            $show_forum = GroupManager::user_has_access($user_id, $forum['forum_of_group'], GROUP_TOOL_FORUM);                                   
-                            //var_dump($forum['forum_id'].' -  '.$show_forum);
-                            /*
-                            // it is a group forum
-                            //echo '-groepsforum';
-                            // it is a group forum but it is public => show
-                            if ($forum['forum_group_public_private'] == 'public') {
-                                $show_forum = true;
-                                //echo '-publiek';
-                            } elseif ($forum['forum_group_public_private'] == 'private') {
-                                // it is a group forum and it is private
-                                //echo '-prive';
-                                // it is a group forum and it is private but the user is member of the group
-                                if (in_array($forum['forum_of_group'], $groups_of_user)) {
-                                    //echo '-is lid';
-                                    $show_forum = true;
-                                } else {
-                                    //echo '-is GEEN lid';
-                                    $show_forum = false;
-                                }
-                            } else {
-                                $show_forum = false;
-                            }*/
-
+                            $show_forum = GroupManager::user_has_access($user_id, $forum['forum_of_group'], GROUP_TOOL_FORUM); 
                         }
                     }
 
@@ -410,7 +384,7 @@ if (is_array($forum_categories_list)) {
                             echo api_convert_and_format_date($forum['last_post_date']).'<br /> '.get_lang('By').' '.display_user_link($poster_id, $name, '', $username);
                         }
                         echo '</td>';
-                        echo '<td nowrap="nowrap" align="center">';
+                        echo '<td class="td_actions">';
                         if (api_is_allowed_to_edit(false, true) && !($forum['session_id'] == 0 && intval($session_id) != 0)) {
                             echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&amp;gradebook='.$gradebook.'&amp;action=edit&amp;content=forum&amp;id='.$forum['forum_id'].'">'.Display::return_icon('edit.png',get_lang('Edit'), array(), ICON_SIZE_SMALL).'</a>';
                             echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&amp;gradebook='.$gradebook.'&amp;action=delete&amp;content=forum&amp;id='.$forum['forum_id']."\" onclick=\"javascript:if(!confirm('".addslashes(api_htmlentities(get_lang('DeleteForum'), ENT_QUOTES))."')) return false;\">".Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL).'</a>';
@@ -439,5 +413,4 @@ if (is_array($forum_categories_list)) {
         echo '</table>';
     }
 }
-
 Display :: display_footer();

+ 3 - 1
main/forum/newthread.php

@@ -22,6 +22,8 @@
  * @package chamilo.forum
  */
 
+exit;
+
 // Language file that need to be included.
 $language_file = array('forum', 'document');
 
@@ -153,7 +155,7 @@ if (isset($_POST['add_resources']) AND $_POST['add_resources'] == get_lang('Reso
 /* Header */
 
 if ($origin == 'learnpath') {
-    require_once api_get_path(INCLUDE_PATH).'reduced_header.inc.php';
+    Display::display_reduced_header();
 } else {
     Display :: display_header(null);
     //api_display_tool_title($nameTools);

+ 1 - 4
main/forum/reply.php

@@ -133,12 +133,9 @@ if (isset($_POST['add_resources']) AND $_POST['add_resources'] == get_lang('Reso
     exit;
 }
 
-
-
 /* Header */
 
-if ($origin == 'learnpath') {
-    //include api_get_path(INCLUDE_PATH).'reduced_header.inc.php';
+if ($origin == 'learnpath') {    
     Display :: display_reduced_header('');
 } else {
     // The last element of the breadcrumb navigation is already set in interbreadcrumb, so give an empty string.

+ 3 - 4
main/forum/viewforum.php

@@ -144,11 +144,10 @@ if ($origin == 'group') {
 }
 
 if ($origin == 'learnpath') {
-    include api_get_path(INCLUDE_PATH).'reduced_header.inc.php';
+    Display::display_reduced_header();
 } else {
     // The last element of the breadcrumb navigation is already set in interbreadcrumb, so give empty string.
-    Display :: display_header('');
-    //api_display_tool_title($nameTools);
+    Display :: display_header('');    
 }
 
 /* Actions */
@@ -418,7 +417,7 @@ if (is_array($threads)) {
             }
 
             echo '<td>'.$last_post.'</td>';
-            echo '<td>';
+            echo '<td class="td_actions">';
             // Get attachment id.
             $attachment_list = get_attachment($row['post_id']);
             $id_attach = !empty($attachment_list) ? $attachment_list['id'] : '';

+ 2 - 2
main/forum/viewforumcategory.php

@@ -96,7 +96,7 @@ if (isset($_GET['origin'])) {
 }
 
 if ($origin=='learnpath') {
-    require_once api_get_path(INCLUDE_PATH).'reduced_header.inc.php';
+    Display::display_reduced_header();
 } else {
     Display :: display_header(null);
 }
@@ -319,7 +319,7 @@ if ($action_forums != 'add') {
                     echo $forum['last_post_date'].' '.get_lang('By').' '.display_user_link($poster_id, $name);
                 }
                 echo '</td>';
-                echo '<td nowrap align="center">';
+                echo '<td class="td_actions">';
 
                 if (api_is_allowed_to_edit(false, true) && !($forum['session_id'] == 0 && intval(isset($_SESSION['id_session']) ? $_SESSION['id_session'] : null) != 0)) {
                     echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&amp;forumcategory='.Security::remove_XSS($_GET['forumcategory']).'&amp;action=edit&amp;content=forum&amp;id='.$forum['forum_id'].'">'.Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL).'</a>';

+ 1 - 1
main/forum/viewpost.php

@@ -63,7 +63,7 @@ if (!empty($gradebook) && $gradebook == 'view') {
 }
 
 if ($origin == 'learnpath') {
-    include(api_get_path(INCLUDE_PATH).'reduced_header.inc.php');
+    Display::display_reduced_header();
 } else {
     $interbreadcrumb[] = array('url' => 'index.php?gradebook='.$gradebook.'&amp;search='.Security::remove_XSS(urlencode($_GET['search'])), 'name' => $nameTools);
     $interbreadcrumb[] = array('url' => 'viewforumcategory.php?forumcategory='.$current_forum_category['cat_id'].'&amp;search='.Security::remove_XSS(urlencode($_GET['search'])), 'name' => prepare4display($current_forum_category['cat_title']));

+ 1 - 1
main/forum/viewthread.php

@@ -74,7 +74,7 @@ if ($origin == 'group') {
 } else {
     $my_search = isset($_GET['search']) ? $_GET['search'] : '';
     if ($origin == 'learnpath') {
-        require_once api_get_path(INCLUDE_PATH).'reduced_header.inc.php';
+        Display::display_reduced_header();
     } else {    	
         $interbreadcrumb[] = array('url' => 'index.php?gradebook='.$gradebook.'&amp;search='.Security::remove_XSS(urlencode($my_search)), 'name' => $nameTools);
         $interbreadcrumb[] = array('url' => 'viewforumcategory.php?forumcategory='.$current_forum_category['cat_id'].'&amp;origin='.$origin.'&amp;search='.Security::remove_XSS(urlencode($my_search)), 'name' => Security::remove_XSS($current_forum_category['cat_title']));

+ 2 - 2
main/gradebook/gradebook_edit_result.php

@@ -30,9 +30,9 @@ if ($edit_result_form->validate()) {
 	$scores = ($values['score']);
 	foreach ($scores as $row) {
 		$resultedit = Result :: load (key($scores));
-		$row_value=(int)$row ;
+		$row_value = $row ;
 		if ((!empty ($row_value)) || ($row_value == 0)) {
-			$resultedit[0]->set_score($row_value);
+			$resultedit[0]->set_score(floatval(number_format($row_value, api_get_setting('gradebook_number_decimals'))));
 		}
 		$resultedit[0]->save();
 		next($scores);

+ 3 - 3
main/gradebook/gradebook_view_result.php

@@ -79,7 +79,7 @@ if (isset ($_GET['editres'])) {
 		$result->set_id($edit_res_xml);
 		$result->set_user_id($values['hid_user_id']);
 		$result->set_evaluation_id($select_eval_edit);
-		$row_value=isset($values['score']) ? (float)$values['score'] : 0 ;
+		$row_value = isset($values['score']) ? (float)$values['score'] : 0 ;
 		if ((!empty ($row_value)) || ($row_value == 0)) {
 			$result->set_score(floatval(number_format($row_value, api_get_setting('gradebook_number_decimals'))));
 		}
@@ -151,7 +151,7 @@ if (isset ($_GET['import'])) {
 					$result= new Result();
 					$result->set_user_id($importedresult['user_id']);
 					if (!empty ($importedresult['score'])) {
-						$result->set_score($importedresult['score']);
+						$result->set_score(floatval(number_format($importedresult['score'], api_get_setting('gradebook_number_decimals'))));
 					}
 					if (!empty ($importedresult['date'])) {
 						$result->set_date(api_get_utc_datetime($importedresult['date']));
@@ -285,7 +285,7 @@ if (isset($_GET['export'])) {
                 	if (empty($data['score']) && !is_numeric($data['score'])) {
                 		$result[] = get_lang('DidNotTakeTheExamAcronym');
                 	} else {
-                		$result[] = $data['score'];
+                		$result[] = $data['score'];                        
                 	}	
                 }
                 if ($scoredisplay->is_custom()) {

+ 2 - 3
main/gradebook/lib/be/evaluation.class.php

@@ -139,8 +139,7 @@ class Evaluation implements GradebookItem
 	 * @param $category_id parent category
 	 * @param $visible visible
 	 */
-	public function load ($id = null, $user_id = null, $course_code = null, $category_id = null, $visible = null, $locked = null)
-	{
+	public function load ($id = null, $user_id = null, $course_code = null, $category_id = null, $visible = null, $locked = null) {
     	$tbl_grade_evaluations = Database :: get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
 		$sql='SELECT id,name,description,user_id,course_code,category_id,created_at,weight,max,visible,type,locked FROM '.$tbl_grade_evaluations;
 		$paramcount = 0;
@@ -178,7 +177,7 @@ class Evaluation implements GradebookItem
 			$sql .= ' visible = '.intval($locked);
 			$paramcount ++;
 		}
-		//echo $sql;
+		//var_dump($sql);
 		$result = Database::query($sql);
 		$alleval = Evaluation::create_evaluation_objects_from_sql_result($result);
 		return $alleval;

+ 3 - 4
main/gradebook/lib/be/result.class.php

@@ -214,18 +214,17 @@ class Result
 	 */
 	public function save() {
 		$tbl_grade_results = Database :: get_main_table(TABLE_MAIN_GRADEBOOK_RESULT);
-		$sql = 'UPDATE '.$tbl_grade_results
-				.' SET user_id = '.$this->get_user_id()
+		$sql = 'UPDATE '.$tbl_grade_results.' 
+                SET user_id = '.$this->get_user_id()
 				.', evaluation_id = '.$this->get_evaluation_id()
 				.', score = ';
-
 		if (isset($this->score)) {
 			$sql .= $this->get_score();
 		} else {
 			$sql .= 'null';
 		}
 		$sql .= ' WHERE id = '.$this->id;
-		// no need to update creation date
+		// no need to update creation date        
 		Database::query($sql);
 	}
 

+ 4 - 8
main/gradebook/lib/fe/evalform.class.php

@@ -51,8 +51,7 @@ class EvalForm extends FormValidator
 	 * @param method
 	 * @param action
 	 */
-	function EvalForm($form_type, $evaluation_object, $result_object, $form_name, $method= 'post', $action= null, $extra1 = null, $extra2 = null)
-	{
+	function EvalForm($form_type, $evaluation_object, $result_object, $form_name, $method= 'post', $action= null, $extra1 = null, $extra2 = null) {
 		parent :: __construct($form_name, $method, $action);
 
 		if (isset ($evaluation_object)) {
@@ -112,11 +111,8 @@ class EvalForm extends FormValidator
 			}
 		}
 		$this->addElement('submit', 'submit_button', get_lang('AddUserToEval'));
-//		$this->setDefaults(array (
-//			'formSent' => '1'
-//		));
-
 	}
+    
 	/**
 	 * This function builds a form to edit all results in an evaluation
 	 */
@@ -180,7 +176,7 @@ class EvalForm extends FormValidator
 			$this->add_textfield('score[' . $result->get_id() . ']',
 								 $this->build_stud_label($user['user_id'], $user['username'], $user['lastname'], $user['firstname']),
 								 false,
-								 array ('size' => 4,
+								 array ('class' => "span2",
 										'maxlength' => 5));
 
 			$this->addRule('score[' . $result->get_id() . ']', get_lang('OnlyNumbers'), 'numeric');
@@ -188,7 +184,7 @@ class EvalForm extends FormValidator
 			'score[' . $result->get_id() . ']', 'maxvalue'), get_lang('OverMax'), 'compare', '<=');
 			$this->addRule(array (
 			'score[' . $result->get_id() . ']', 'minvalue'), get_lang('UnderMin'), 'compare', '>=');
-			$defaults['score[' . $result->get_id() . ']']= $result->get_score();
+			$defaults['score[' . $result->get_id() . ']'] = $result->get_score();
 			
             if (api_is_western_name_order() ) {
             	$user_info = '<td align="left" >'.$user['firstname'].'</td>';

+ 2 - 0
main/gradebook/lib/fe/resulttable.class.php

@@ -129,7 +129,9 @@ class ResultTable extends SortableTable
 				$row[] = $item['lastname'];
 				$row[] = $item['firstname'];
 			}
+            
 			$row[] = $item['score'];
+            
 			if ($scoredisplay->is_custom()) {
 				$row[] = $item['display'];
 			}

+ 1 - 2
main/gradebook/lib/scoredisplay.class.php

@@ -258,8 +258,7 @@ class ScoreDisplay
 		} else {
 			// if no custom display set, use default display
 			$display = $this->display_default($my_score, $type);
-		}
-		
+		}		
 		if ($this->coloring_enabled && $no_color == false) {
 		    $my_score_denom = ($score[1]==0)?1:$score[1];		
 		    if (($score[0] / $my_score_denom) < ($this->color_split_value / 100)) {

BIN
main/img/icons/22/all_directions.png


برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است