Pārlūkot izejas kodu

Merge branch '1.9.x' of github.com:chamilo/chamilo-lms into 1.9.x

Francis Gonzales 11 gadi atpakaļ
vecāks
revīzija
f2c0cf873d
100 mainītis faili ar 2541 papildinājumiem un 4302 dzēšanām
  1. 1 1
      home/home_menu.html
  2. 1 0
      main/admin/calendar.lib.php
  3. 2 1
      main/admin/configure_homepage.php
  4. 5 0
      main/admin/course_category.php
  5. 3 4
      main/admin/course_edit.php
  6. 31 21
      main/admin/session_course_edit.php
  7. 18 9
      main/admin/session_list.php
  8. 10 5
      main/admin/settings.lib.php
  9. 28 0
      main/admin/update_last_login.php
  10. 17 7
      main/admin/user_import.php
  11. 123 168
      main/admin/user_list.php
  12. 15 7
      main/announcements/announcements.inc.php
  13. 14 14
      main/announcements/announcements.php
  14. 58 28
      main/announcements/resources/js/main.js
  15. 21 6
      main/auth/cas/authcas.php
  16. 6 5
      main/auth/gotocourse.php
  17. 28 0
      main/auth/inscription.php
  18. 14 38
      main/calendar/agenda.inc.php
  19. 2 1
      main/calendar/agenda.lib.php
  20. 2 2
      main/calendar/agenda.php
  21. 5 5
      main/course_home/activity.php
  22. 13 9
      main/course_info/delete_course.php
  23. 129 65
      main/coursecopy/classes/CourseRecycler.class.php
  24. 73 7
      main/coursecopy/classes/CourseRestorer.class.php
  25. 29 8
      main/coursecopy/classes/CourseSelectForm.class.php
  26. 8 8
      main/coursecopy/recycle_course.php
  27. 7 2
      main/cron/import_csv.php
  28. 665 1691
      main/css/academica/default.css
  29. 23 103
      main/css/academica/frames.css
  30. BIN
      main/css/academica/images/alert.jpg
  31. BIN
      main/css/academica/images/bar_1.gif
  32. BIN
      main/css/academica/images/bar_1m.gif
  33. BIN
      main/css/academica/images/bar_1r.gif
  34. BIN
      main/css/academica/images/bar_1u.gif
  35. BIN
      main/css/academica/images/bg-button.gif
  36. BIN
      main/css/academica/images/bg-header.jpg
  37. BIN
      main/css/academica/images/bg-main.png
  38. BIN
      main/css/academica/images/bg.jpg
  39. BIN
      main/css/academica/images/bglogin.jpg
  40. BIN
      main/css/academica/images/bgloginconf.jpg
  41. BIN
      main/css/academica/images/blue_arrow.png
  42. BIN
      main/css/academica/images/bullet.gif
  43. BIN
      main/css/academica/images/button_back.jpg
  44. BIN
      main/css/academica/images/button_plus.gif
  45. BIN
      main/css/academica/images/chamilo-welcome.png
  46. BIN
      main/css/academica/images/crystal3.gif
  47. BIN
      main/css/academica/images/crystal3.png
  48. BIN
      main/css/academica/images/crystal5.png
  49. BIN
      main/css/academica/images/divider.jpg
  50. BIN
      main/css/academica/images/divider2.jpg
  51. BIN
      main/css/academica/images/dropbox.jpg
  52. BIN
      main/css/academica/images/header-logo.png
  53. BIN
      main/css/academica/images/headerform.jpg
  54. BIN
      main/css/academica/images/icon-chamilo.png
  55. 0 6
      main/css/academica/images/index.html
  56. BIN
      main/css/academica/images/line.jpg
  57. BIN
      main/css/academica/images/loading2.gif
  58. BIN
      main/css/academica/images/shadow.gif
  59. BIN
      main/css/academica/images/shadowheader.jpg
  60. BIN
      main/css/academica/images/sprite-icon-social.png
  61. BIN
      main/css/academica/images/sprite-icon.png
  62. BIN
      main/css/academica/images/start-level.png
  63. BIN
      main/css/academica/images/systemenouvelles.jpg
  64. BIN
      main/css/academica/images/tab.png
  65. BIN
      main/css/academica/images/thindivider.jpg
  66. BIN
      main/css/academica/images/tinydivider.jpg
  67. BIN
      main/css/academica/images/vertdivider.jpg
  68. BIN
      main/css/academica/images/vineta.png
  69. BIN
      main/css/academica/images/white_arrow.png
  70. 21 7
      main/css/academica/learnpath.css
  71. 31 5
      main/css/academica/print.css
  72. 278 114
      main/css/academica/scorm.css
  73. 15 20
      main/css/academica/scormfs.css
  74. 822 1832
      main/css/baby_orange/default.css
  75. 23 103
      main/css/baby_orange/frames.css
  76. BIN
      main/css/baby_orange/images/accept.png
  77. BIN
      main/css/baby_orange/images/add.png
  78. BIN
      main/css/baby_orange/images/alert.jpg
  79. BIN
      main/css/baby_orange/images/bar_1.gif
  80. BIN
      main/css/baby_orange/images/bar_1m.gif
  81. BIN
      main/css/baby_orange/images/bar_1r.gif
  82. BIN
      main/css/baby_orange/images/bar_1u.gif
  83. BIN
      main/css/baby_orange/images/bg-button.gif
  84. BIN
      main/css/baby_orange/images/bg-header.jpg
  85. BIN
      main/css/baby_orange/images/bg-main.png
  86. BIN
      main/css/baby_orange/images/bg.jpg
  87. BIN
      main/css/baby_orange/images/bgheader.jpg
  88. BIN
      main/css/baby_orange/images/bglogin.jpg
  89. BIN
      main/css/baby_orange/images/bgloginconf.jpg
  90. BIN
      main/css/baby_orange/images/blue_arrow.png
  91. BIN
      main/css/baby_orange/images/bullet.gif
  92. BIN
      main/css/baby_orange/images/buttom.png
  93. BIN
      main/css/baby_orange/images/button_back.jpg
  94. BIN
      main/css/baby_orange/images/button_plus.gif
  95. BIN
      main/css/baby_orange/images/chamilo-welcome.png
  96. BIN
      main/css/baby_orange/images/divider.jpg
  97. BIN
      main/css/baby_orange/images/divider2.jpg
  98. BIN
      main/css/baby_orange/images/dropbox.jpg
  99. BIN
      main/css/baby_orange/images/header-logo.png
  100. BIN
      main/css/baby_orange/images/headerform.jpg

+ 1 - 1
home/home_menu.html

@@ -1 +1 @@
-<li><a href="http://www.chamilo.org/forum" target="_self">Forum</a></li>
+<li class="forum-btn"><a href="http://www.chamilo.org/forum" target="_self">Forum</a></li>

+ 1 - 0
main/admin/calendar.lib.php

@@ -2739,6 +2739,7 @@ function is_repeated_event($id,$course=null)
     }
     return false;
 }
+
 /**
  * Adds x weeks to a UNIX timestamp
  * @param   int     The timestamp

+ 2 - 1
main/admin/configure_homepage.php

@@ -796,7 +796,8 @@ switch ($action) {
 		  <td><textarea name="notice_text" cols="30" rows="5" wrap="virtual" style="width: 350px;"><?php echo $notice_text; ?></textarea></td>
 		</tr>
         <tr>
-          <td><input type="checkbox" value="<?php echo get_lang('ApplyAllLanguages'); ?>"/></td>
+          <td><label><?php echo get_lang('ApplyAllLanguages'); ?></label>
+          <td><input type="checkbox" name="all_langs" value="<?php echo get_lang('ApplyAllLanguages'); ?>"/></td>
         </tr>
 		<tr>
 		  <td>&nbsp;</td>

+ 5 - 0
main/admin/course_category.php

@@ -109,9 +109,14 @@ if ($action == 'add' || $action == 'edit') {
         $form->addElement('button', 'submit', $text);
         $form->display();
     } elseif (api_get_multiple_access_url() && api_get_current_access_url_id() != 1) {
+        // If multiple URLs and not main URL, prevent edition and inform user
         Display::display_warning_message(get_lang('CourseCategoriesAreGlobal'));
     }
 } else {
+    // If multiple URLs and not main URL, prevent deletion and inform user
+    if ($action == 'delete' && api_get_multiple_access_url() && api_get_current_access_url_id() != 1) {
+        Display::display_warning_message(get_lang('CourseCategoriesAreGlobal'));
+    }
     echo '<div class="actions">';
     $link = null;
     if (!empty($parentInfo)) {

+ 3 - 4
main/admin/course_edit.php

@@ -73,7 +73,7 @@ while ($obj = Database::fetch_object($res)) {
         $teachers[$obj->user_id] = api_get_person_name($obj->firstname, $obj->lastname);
     }
 
-    if ($course['tutor_name'] == $course_teachers[$obj->user_id]) {
+    if (isset($course_teachers[$obj->user_id]) && $course['tutor_name'] == $course_teachers[$obj->user_id]) {
         $course['tutor_name'] = $obj->user_id;
     }
     // We add in the array platform teachers
@@ -375,9 +375,8 @@ if ($form->validate()) {
     }
 
 	$course_id = $course_info['real_id'];
-	$forum_config_table = Database::get_course_table(TOOL_FORUM_CONFIG_TABLE);
-
-	$sql = "UPDATE ".$forum_config_table." SET default_lang='".Database::escape_string($course_language)."' WHERE c_id = $course_id ";
+	/*$forum_config_table = Database::get_course_table(TOOL_FORUM_CONFIG_TABLE);
+	$sql = "UPDATE ".$forum_config_table." SET default_lang='".Database::escape_string($course_language)."' WHERE c_id = $course_id ";*/
 	if ($visual_code_is_used) {
 	    header('Location: course_list.php?action=show_msg&warn='.urlencode($warn));
 	} else {

+ 31 - 21
main/admin/session_course_edit.php

@@ -12,8 +12,7 @@ require_once '../inc/global.inc.php';
 
 $id_session = intval($_GET['id_session']);
 SessionManager::protect_session_edit($id_session);
-
-$course_code=trim(stripslashes($_GET['course_code']));
+$course_code = Database::escape_string($_GET['course_code']);
 
 $formSent=0;
 $errorMsg='';
@@ -23,7 +22,7 @@ $tbl_user			= Database::get_main_table(TABLE_MAIN_USER);
 $tbl_course			= Database::get_main_table(TABLE_MAIN_COURSE);
 $tbl_session		= Database::get_main_table(TABLE_MAIN_SESSION);
 $tbl_session_course	= Database::get_main_table(TABLE_MAIN_SESSION_COURSE);
-$tbl_session_rel_course_rel_user	= Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER);
+$tbl_session_rel_course_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER);
 
 $course_info=api_get_course_info($_REQUEST['course_code']);
 $tool_name=$course_info['name'];
@@ -45,7 +44,8 @@ if ($_POST['formSent']) {
 	$formSent=1;
 
 	// get all tutor by course_code in the session
-	$sql = "SELECT id_user FROM $tbl_session_rel_course_rel_user WHERE id_session = '$id_session' AND course_code = '$course_code' AND status = 2";
+	$sql = "SELECT id_user FROM $tbl_session_rel_course_rel_user
+	        WHERE id_session = '$id_session' AND course_code = '$course_code' AND status = 2";
 	$rs_coachs = Database::query($sql);
 
 	$coachs_course_session = array();
@@ -76,7 +76,8 @@ if ($_POST['formSent']) {
 
 	}
 } else {
-	$sql = "SELECT id_user FROM $tbl_session_rel_course_rel_user WHERE id_session = '$id_session' AND course_code = '$course_code' AND status = 2 ";
+	$sql = "SELECT id_user FROM $tbl_session_rel_course_rel_user
+	        WHERE id_session = '$id_session' AND course_code = '$course_code' AND status = 2 ";
 	$rs = Database::query($sql);
 
 	if (Database::num_rows($rs) > 0) {
@@ -91,25 +92,25 @@ global $_configuration;
 if ($_configuration['multiple_access_urls']) {
     $tbl_access_rel_user= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
     $access_url_id = api_get_current_access_url_id();
-    $sql="SELECT u.user_id,lastname,firstname,username FROM $tbl_user u LEFT JOIN $tbl_access_rel_user  a ON(u.user_id= a.user_id) WHERE status='1' AND access_url_id = $access_url_id ".$order_clause;
+    $sql="SELECT u.user_id,lastname,firstname,username
+        FROM $tbl_user u LEFT JOIN $tbl_access_rel_user  a ON(u.user_id= a.user_id)
+        WHERE status='1' AND access_url_id = $access_url_id ".$order_clause;
 } else {
-    $sql="SELECT user_id,lastname,firstname,username FROM $tbl_user WHERE status='1'".$order_clause;
+    $sql="SELECT user_id,lastname,firstname,username
+    FROM $tbl_user
+    WHERE status='1'".$order_clause;
 }
 
-$result=Database::query($sql);
-
-$coaches=Database::store_result($result);
-
+$result = Database::query($sql);
+$coaches = Database::store_result($result);
 Display::display_header($tool_name);
 
-$tool_name=get_lang('ModifySessionCourse');
+$tool_name = get_lang('ModifySessionCourse');
 api_display_tool_title($tool_name);
 ?>
 <form method="post" action="<?php echo api_get_self(); ?>?id_session=<?php echo $id_session; ?>&course_code=<?php echo urlencode($course_code); ?>&page=<?php echo Security::remove_XSS($_GET['page']) ?>" style="margin:0px;">
 <input type="hidden" name="formSent" value="1">
-
 <table border="0" cellpadding="5" cellspacing="0" width="600px">
-
 <?php
 if(!empty($errorMsg)) {
 ?>
@@ -126,25 +127,34 @@ if(!empty($errorMsg)) {
 
 <tr>
   <td width="25%" valign = "top"><?php echo get_lang("CoachName") ?>&nbsp;&nbsp;</td>
-  <td width="70%"><select name="id_coach[]" style="width:450px;" multiple="multiple" size="7">
-	<option value="0">----- <?php echo get_lang("Choose") ?> -----</option>
-	<option value="0" <?php if(count($arr_infos) == 0) echo 'selected="selected"'; ?>><?php echo get_lang('None') ?></option>
+  <td width="70%">
+    <select name="id_coach[]" style="width:450px;" multiple="multiple" size="7">
+	    <option value="0">----- <?php echo get_lang("Choose") ?> -----</option>
+	    <option value="0" <?php if(count($arr_infos) == 0) echo 'selected="selected"'; ?>>
+            <?php echo get_lang('None') ?>
+        </option>
 <?php
 foreach($coaches as $enreg) {
 ?>
-<option value="<?php echo $enreg['user_id']; ?>" <?php if((!$sent && (is_array($arr_infos) && in_array($enreg['user_id'],$arr_infos))) || ($sent && $enreg['user_id'] == $id_coach)) echo 'selected="selected"'; ?>><?php echo api_get_person_name($enreg['firstname'], $enreg['lastname']).' ('.$enreg['username'].')'; ?></option>
+<option value="<?php echo $enreg['user_id']; ?>" <?php if(((is_array($arr_infos) && in_array($enreg['user_id'], $arr_infos)))) echo 'selected="selected"'; ?>>
+    <?php echo api_get_person_name($enreg['firstname'], $enreg['lastname']).' ('.$enreg['username'].')'; ?>
+</option>
 <?php
 }
 unset($coaches);
 ?>
-  </select></td>
+  </select>
+    </td>
 </tr>
 <tr>
   <td>&nbsp;</td>
-  <td><button class="save" type="submit" name="name" value="<?php echo get_lang('AssignCoach') ?>"><?php echo get_lang('AssignCoach') ?></button>
+  <td>
+      <button class="save" type="submit" name="name" value="<?php echo get_lang('AssignCoach') ?>">
+          <?php echo get_lang('AssignCoach') ?>
+      </button>
 </td>
 </tr>
 </table>
 </form>
 <?php
-Display::display_footer();
+Display::display_footer();

+ 18 - 9
main/admin/session_list.php

@@ -18,8 +18,8 @@ api_protect_admin_script(true);
 //Add the JS needed to use the jqgrid
 $htmlHeadXtra[] = api_get_jqgrid_js();
 
-$action = $_REQUEST['action'];
-$idChecked = $_REQUEST['idChecked'];
+$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : null;
+$idChecked = isset($_REQUEST['idChecked']) ? $_REQUEST['idChecked'] : null;
 
 if ($action == 'delete') {
 	SessionManager::delete_session($idChecked);
@@ -78,27 +78,37 @@ if (!empty($courseId)) {
 
 if (isset($_REQUEST['keyword'])) {
     //Begin with see the searchOper param
-    $url = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_sessions&_search=true&rows=20&page=1&sidx=&sord=asc&filters=&searchField=name&searchString='.Security::remove_XSS($_REQUEST['keyword']).'&searchOper=bw';
+    $url = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_sessions&_force_search=true&rows=20&page=1&sidx=&sord=asc&filters=&searchField=s.name&searchString='.Security::remove_XSS($_REQUEST['keyword']).'&searchOper=bw';
 }
 
 if (isset($_REQUEST['id_category'])) {
     $sessionCategory = SessionManager::get_session_category($_REQUEST['id_category']);
     if (!empty($sessionCategory)) {
         //Begin with see the searchOper param
-        $url = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_sessions&_search=true&rows=20&page=1&sidx=&sord=asc&filters=&searchField=category_name&searchString='.Security::remove_XSS($sessionCategory['name']).'&searchOper=bw';
+        $url = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_sessions&_force_search=true&rows=20&page=1&sidx=&sord=asc&filters=&searchField=sc.name&searchString='.Security::remove_XSS($sessionCategory['name']).'&searchOper=bw';
     }
 }
 
 //The order is important you need to check the the $column variable in the model.ajax.php file
-$columns = array(get_lang('Name'), get_lang('NumberOfCourses'), get_lang('NumberOfUsers'), get_lang('SessionCategoryName'),
-                 get_lang('StartDate'), get_lang('EndDate'), get_lang('Coach'),  get_lang('Status'), get_lang('Visibility'), get_lang('Actions'));
+$columns = array(
+    get_lang('Name'),
+    get_lang('NumberOfCourses'),
+    get_lang('NumberOfUsers'),
+    get_lang('SessionCategoryName'),
+    get_lang('StartDate'),
+    get_lang('EndDate'),
+    get_lang('Coach'),
+    get_lang('Status'),
+    get_lang('Visibility'),
+    get_lang('Actions')
+);
 
 //Column config
 $column_model   = array(
     array('name'=>'name',           'index'=>'s.name',        'width'=>'160',  'align'=>'left', 'search' => 'true', 'wrap_cell' => "true"),
     array('name'=>'nbr_courses',    'index'=>'nbr_courses',   'width'=>'30',   'align'=>'left', 'search' => 'true'),
     array('name'=>'nbr_users',      'index'=>'nbr_users',     'width'=>'30',   'align'=>'left', 'search' => 'true'),
-    array('name'=>'category_name',  'index'=>'category_name', 'width'=>'70',   'align'=>'left', 'search' => 'true'),
+    array('name'=>'category_name',  'index'=>'sc.name', 'width'=>'70',   'align'=>'left', 'search' => 'true'),
     array('name'=>'date_start',     'index'=>'s.date_start',    'width'=>'40',   'align'=>'left', 'search' => 'true'),
     array('name'=>'date_end',       'index'=>'s.date_end',      'width'=>'40',   'align'=>'left', 'search' => 'true'),
     array('name'=>'coach_name',     'index'=>'coach_name',    'width'=>'80',   'align'=>'left', 'search' => 'false'),
@@ -187,8 +197,7 @@ $(function() {
     },buttonicon:'ui-icon-document'})
     */
 
-
-    //Adding search options
+    // Adding search options
     var options = {
         'stringResult': true,
         'autosearch' : true,

+ 10 - 5
main/admin/settings.lib.php

@@ -720,22 +720,25 @@ function handle_search()
  * @since Dokeos 1.8.6
  */
 function handle_templates() {
-    if ($_GET['action'] != 'add') {
+    /* Drive-by fix to avoid undefined var warnings, without repeating
+     * isset() combos all over the place. */
+    $action = isset($_GET['action']) ? $_GET['action'] : "invalid";
+
+    if ($action != 'add') {
         echo '<div class="actions" style="margin-left: 1px;">';
         echo '<a href="settings.php?category=Templates&amp;action=add">'.Display::return_icon('new_template.png', get_lang('AddTemplate'),'',ICON_SIZE_MEDIUM).'</a>';
         echo '</div>';
     }
 
-    if ($_GET['action'] == 'add' || ($_GET['action'] == 'edit' && is_numeric($_GET['id']))) {
+    if ($action == 'add' || ($action == 'edit' && is_numeric($_GET['id']))) {
         add_edit_template();
 
         // Add event to the system log.
         $user_id = api_get_user_id();
         $category = $_GET['category'];
         event_system(LOG_CONFIGURATION_SETTINGS_CHANGE, LOG_CONFIGURATION_SETTINGS_CATEGORY, $category, api_get_utc_datetime(), $user_id);
-
     } else {
-        if ($_GET['action'] == 'delete' && is_numeric($_GET['id'])) {
+        if ($action == 'delete' && is_numeric($_GET['id'])) {
             delete_template($_GET['id']);
 
             // Add event to the system log
@@ -743,6 +746,7 @@ function handle_templates() {
             $category = $_GET['category'];
             event_system(LOG_CONFIGURATION_SETTINGS_CHANGE, LOG_CONFIGURATION_SETTINGS_CATEGORY, $category, api_get_utc_datetime(), $user_id);
         }
+
         display_templates();
     }
 }
@@ -861,7 +865,8 @@ function image_filter($image) {
  */
 function add_edit_template() {
     // Initialize the object.
-    $form = new FormValidator('template', 'post', 'settings.php?category=Templates&action='.Security::remove_XSS($_GET['action']).'&id='.Security::remove_XSS($_GET['id']));
+    $id = isset($_GET['id']) ? '&id='.Security::remove_XSS($_GET['id']) : '';
+    $form = new FormValidator('template', 'post', 'settings.php?category=Templates&action='.Security::remove_XSS($_GET['action']).$id);
 
     // Setting the form elements: the header.
     if ($_GET['action'] == 'add') {

+ 28 - 0
main/admin/update_last_login.php

@@ -0,0 +1,28 @@
+<?php
+/* For licensing terms, see /license.txt */
+
+require_once '../inc/global.inc.php';
+api_protect_admin_script();
+
+if (isset($_configuration['save_user_last_login']) &&
+    $_configuration['save_user_last_login']
+) {
+    $tableUser = Database::get_main_table(TABLE_MAIN_USER);
+    $userInfo = api_get_user_info(api_get_user_id());
+    if (isset($userInfo['last_login'])) {
+        $sql = "SELECT login_user_id, MAX(login_date) login_date from track_e_login group by login_user_id";
+        echo "Executing: <br />$sql<br /> Updating <br />";
+        $result = Database::query($sql);
+        while ($row = Database::fetch_array($result)) {
+            $date = $row['login_date'];
+            $userId = $row['login_user_id'];
+            $sql = "UPDATE $tableUser SET last_login ='$date' WHERE user_id = $userId";
+            echo "<br />Updating: <br />$sql";
+            Database::query($sql);
+        }
+    } else {
+        $sql = "ALTER TABLE $tableUser ADD COLUMN last_login DATETIME";
+        Database::query($sql);
+        echo "last_login does not exits creating with: <br/> $sql";
+    }
+}

+ 17 - 7
main/admin/user_import.php

@@ -16,6 +16,7 @@ require '../inc/global.inc.php';
 require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
 require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php';
 require_once api_get_path(LIBRARY_PATH).'classmanager.lib.php';
+require_once api_get_path(LIBRARY_PATH).'usergroup.lib.php';
 require_once api_get_path(LIBRARY_PATH).'import.lib.php';
 
 // Set this option to true to enforce strict purification for usenames.
@@ -65,10 +66,14 @@ function validate_data($users)
             $errors[] = $user;
         }
         // 4. Check classname
+        $usergroup = new UserGroup();
         if (!empty($user['ClassName'])) {
-            if (!ClassManager :: class_name_exists($user['ClassName'])) {
-                $user['error'] = get_lang('ClassNameNotAvailable');
-                $errors[] = $user;
+            $className = explode('|', trim($user['ClassName']));
+            foreach ($className as $class) {
+                if (!$usergroup->usergroup_exists($class)) {
+                    $user['error'] = get_lang('ClassNameNotAvailable');
+                    $errors[] = $user;
+                }
             }
         }
         // 5. Check authentication source
@@ -171,12 +176,17 @@ function save_data($users)
                     }
                 }
             }
-
+            $usergroup = new UserGroup();
             if (!empty($user['ClassName'])) {
-                $class_id = ClassManager :: get_class_id($user['ClassName']);
-                ClassManager :: add_user($user_id, $class_id);
+                $className = explode('|', trim($user['ClassName']));
+                foreach ($className as $class) {
+                    $classId = $usergroup->get_id_by_name($class);
+                    $usergroup->addUser($user_id, $classId);
+                }
+                
             }
 
+
             // Saving extra fields.
             global $extra_fields;
 
@@ -475,4 +485,4 @@ if ($count_fields > 0) {
 </pre>
     </blockquote>
 <?php
-Display :: display_footer();
+Display :: display_footer();

+ 123 - 168
main/admin/user_list.php

@@ -169,6 +169,113 @@ if ($action == 'login_as') {
 
 api_protect_admin_script(true);
 
+/**
+ * Prepares the shared SQL query for the user table.
+ * See get_user_data() and get_number_of_users().
+ *
+ * @param boolean Whether to count, or get data
+ * @return string SQL query
+ */
+function prepare_user_sql_query($is_count) {
+    $sql = "";
+    $user_table = Database::get_main_table(TABLE_MAIN_USER);
+    $admin_table = Database::get_main_table(TABLE_MAIN_ADMIN);
+
+    if ($is_count) {
+        $sql .= "SELECT COUNT(u.user_id) AS total_number_of_items FROM $user_table u";
+    } else {
+        $sql .= "SELECT u.user_id AS col0, u.official_code AS col2, ";
+
+        if (api_is_western_name_order())
+            $sql .= "u.firstname AS col3, u.lastname AS col4, ";
+        else
+            $sql .= "u.lastname AS col3, u.firstname AS col4, ";
+
+        $sql .= "u.username AS col5, u.email AS col6, ".
+                    "u.status AS col7, u.active AS col8, ".
+                    "u.user_id AS col9, u.registration_date AS col10, ".
+                    "u.expiration_date AS exp, u.password ".
+                    "FROM $user_table u";
+    }
+
+    // adding the filter to see the user's only of the current access_url
+    if ((api_is_platform_admin() || api_is_session_admin()) && api_get_multiple_access_url()) {
+        $access_url_rel_user_table= Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
+        $sql.= " INNER JOIN $access_url_rel_user_table url_rel_user ON (u.user_id=url_rel_user.user_id)";
+    }
+
+    foreach ($_GET as $key => $value) {
+        /* Because this query uses LIKE very liberally we need to escape
+         * LIKE wildcards, concretely "_" and "%". This is only relevant
+         * for *LIKE* statements.
+         *
+         * See: http://stackoverflow.com/a/3683868 */
+
+        // Remove buggy whitespaces and escape for both SQL and LIKE.
+        if ($key == "keyword_status")
+            $$key = Database::escape_string(trim($value));
+        else
+            $$key = Database::escape_sql_wildcards(Database::escape_string(trim($value)));
+    }
+
+    if (isset($keyword_extra_data) && !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($keyword)) {
+        $sql .= " WHERE (".
+                    "u.firstname LIKE '%". $keyword ."%' ".
+                    "OR u.lastname LIKE '%". $keyword ."%' ".
+                    "OR concat(u.firstname,' ',u.lastname) LIKE '%". $keyword ."%' ".
+                    "OR concat(u.lastname,' ',u.firstname) LIKE '%". $keyword ."%' ".
+                    "OR u.username LIKE '%". $keyword ."%' ".
+                    "OR u.official_code LIKE '%". $keyword ."%' ".
+                    "OR u.email LIKE '%". $keyword ."%')";
+    } elseif (isset($keyword_firstname)) {
+        $query_admin_table = '';
+        $keyword_admin = '';
+
+        if ($keyword_status == SESSIONADMIN) {
+           $keyword_status = '%';
+           $query_admin_table = " , $admin_table a ";
+           $keyword_admin = ' AND a.user_id = u.user_id ';
+        }
+
+        $keyword_extra_value = '';
+
+        if (isset($keyword_extra_data) && !empty($keyword_extra_data) &&
+            !empty($keyword_extra_data_text)) {
+            $keyword_extra_value = " AND ufv.field_value LIKE '%".trim($keyword_extra_data_text)."%' ";
+        }
+
+        $sql .= " $query_admin_table ".
+                "WHERE (u.firstname LIKE '%". $keyword_firstname ."%' ".
+                    "AND u.lastname LIKE '%". $keyword_lastname ."%' ".
+                    "AND u.username LIKE '%". $keyword_username ."%' ".
+                    "AND u.email LIKE '%". $keyword_email ."%' ".
+                    "AND u.official_code LIKE '%". $keyword_officialcode ."%' ".
+                    "AND u.status LIKE '$keyword_status' ".
+                    "$keyword_admin $keyword_extra_value";
+
+        if (isset($keyword_active) && !isset($keyword_inactive)) {
+            $sql .= " AND u.active='1'";
+        } elseif(isset($keyword_inactive) && !isset($keyword_active)) {
+            $sql .= " AND u.active='0'";
+        }
+        $sql .= " ) ";
+    }
+
+    // adding the filter to see the user's only of the current access_url
+    if ((api_is_platform_admin() || api_is_session_admin())
+        && api_get_multiple_access_url()) {
+        $sql .= " AND url_rel_user.access_url_id=".api_get_current_access_url_id();
+    }
+
+    return $sql;
+}
+
 /**
 *	Make sure this function is protected because it does NOT check password!
 *
@@ -274,82 +381,17 @@ function login_user($user_id) {
 		}
 	}
 }
+
 /**
  * Get the total number of users on the platform
  * @see SortableTable#get_total_number_of_items()
  */
 function get_number_of_users() {
-	$user_table = Database :: get_main_table(TABLE_MAIN_USER);
-	$sql = "SELECT COUNT(u.user_id) AS total_number_of_items FROM $user_table u";
-
-	// adding the filter to see the user's only of the current access_url
-    if ((api_is_platform_admin() || api_is_session_admin()) && api_get_multiple_access_url()) {
-    	$access_url_rel_user_table= Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
-    	$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 ";
-        }
-    }
+    $sql = prepare_user_sql_query (true);
 
-	if ( isset ($_GET['keyword'])) {
-		$keyword = Database::escape_string(trim($_GET['keyword']));
-		$sql .= " WHERE (u.firstname LIKE '%".$keyword."%' OR u.lastname LIKE '%".$keyword."%'  OR concat(u.firstname,' ',u.lastname) LIKE '%".$keyword."%'  OR concat(u.lastname,' ',u.firstname) LIKE '%".$keyword."%' OR u.username LIKE '%".$keyword."%' OR u.email LIKE '%".$keyword."%'  OR u.official_code LIKE '%".$keyword."%') ";
-	} elseif (isset ($_GET['keyword_firstname'])) {
-		$admin_table = Database :: get_main_table(TABLE_MAIN_ADMIN);
-		$keyword_firstname = Database::escape_string($_GET['keyword_firstname']);
-		$keyword_lastname = Database::escape_string($_GET['keyword_lastname']);
-		$keyword_email = Database::escape_string($_GET['keyword_email']);
-		$keyword_officialcode = Database::escape_string($_GET['keyword_officialcode']);
-		$keyword_username = Database::escape_string($_GET['keyword_username']);
-		$keyword_status = Database::escape_string($_GET['keyword_status']);
-		$query_admin_table = '';
-		$keyword_admin = '';
-		if ($keyword_status == SESSIONADMIN) {
-			$keyword_status = '%';
-			$query_admin_table = " , $admin_table a ";
-			$keyword_admin = ' AND a.user_id = u.user_id ';
-		}
-
-        $keyword_extra_value = '';
-        if (isset($_GET['keyword_extra_data'])) {
-            if (!empty($_GET['keyword_extra_data']) && !empty($_GET['keyword_extra_data_text'])) {
-                $keyword_extra_data_text = Database::escape_string($_GET['keyword_extra_data_text']);
-                $keyword_extra_value = " AND ufv.field_value LIKE '%".trim($keyword_extra_data_text)."%' ";
-            }
-        }
-
-		$keyword_active = isset($_GET['keyword_active']);
-		$keyword_inactive = isset($_GET['keyword_inactive']);
-		$sql .= $query_admin_table .
-				" WHERE (u.firstname LIKE '%".$keyword_firstname."%' " .
-				"AND u.lastname LIKE '%".$keyword_lastname."%' " .
-				"AND u.username LIKE '%".$keyword_username."%'  " .
-				"AND u.email LIKE '%".$keyword_email."%'   " .
-				"AND u.official_code LIKE '%".$keyword_officialcode."%'" .
-				"AND u.status LIKE '".$keyword_status."'" .
-				$keyword_admin.$keyword_extra_value;
-		if($keyword_active && !$keyword_inactive) {
-			$sql .= " AND u.active='1'";
-		} elseif($keyword_inactive && !$keyword_active) {
-			$sql .= " AND u.active='0'";
-		}
-		$sql .= " ) ";
-	}
-
-    // adding the filter to see the user's only of the current access_url
-	if ((api_is_platform_admin() || api_is_session_admin()) && api_get_multiple_access_url()) {
-    		$sql.= " AND url_rel_user.access_url_id=".api_get_current_access_url_id();
-    }
-
-	$res = Database::query($sql);
-	$obj = Database::fetch_object($res);
-	return $obj->total_number_of_items;
+    $res = Database::query($sql);
+    $obj = Database::fetch_object($res);
+    return $obj->total_number_of_items;
 }
 
 /**
@@ -361,94 +403,7 @@ function get_number_of_users() {
  * @see SortableTable#get_table_data($from)
  */
 function get_user_data($from, $number_of_items, $column, $direction) {
-	global $origin;
-
-	$user_table = Database :: get_main_table(TABLE_MAIN_USER);
-	$admin_table = Database :: get_main_table(TABLE_MAIN_ADMIN);
-	$sql = "SELECT
-                 u.user_id				AS col0,
-                 u.official_code		AS col2,
-				 ".(api_is_western_name_order()
-                 ? "u.firstname 			AS col3,
-                 u.lastname 			AS col4,"
-                 : "u.lastname 			AS col3,
-                 u.firstname 			AS col4,")."
-                 u.username				AS col5,
-                 u.email				AS col6,
-                 u.status				AS col7,
-                 u.active				AS col8,
-                 u.user_id				AS col9,
-                 u.registration_date    AS col10,
-                 u.expiration_date      AS exp,
-                 u.password ".
-            " FROM $user_table u ";
-
-    // adding the filter to see the user's only of the current access_url
-    if ((api_is_platform_admin() || api_is_session_admin()) && api_get_multiple_access_url()) {
-    	$access_url_rel_user_table= Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
-    	$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'])) {
-		$keyword = Database::escape_string(trim($_GET['keyword']));
-		$sql .= " WHERE (u.firstname LIKE '%".$keyword."%' OR u.lastname LIKE '%".$keyword."%' OR concat(u.firstname,' ',u.lastname) LIKE '%".$keyword."%' OR concat(u.lastname,' ',u.firstname) LIKE '%".$keyword."%' OR u.username LIKE '%".$keyword."%'  OR u.official_code LIKE '%".$keyword."%' OR u.email LIKE '%".$keyword."%' )";
-	} elseif (isset ($_GET['keyword_firstname'])) {
-		$keyword_firstname = Database::escape_sql_wildcards(Database::escape_string($_GET['keyword_firstname']));
-		$keyword_lastname = Database::escape_sql_wildcards(Database::escape_string($_GET['keyword_lastname']));
-		$keyword_email = Database::escape_sql_wildcards(Database::escape_string($_GET['keyword_email']));
-		$keyword_officialcode = Database::escape_sql_wildcards(Database::escape_string($_GET['keyword_officialcode']));
-		$keyword_username = Database::escape_sql_wildcards(Database::escape_string($_GET['keyword_username']));
-		$keyword_status = Database::escape_string($_GET['keyword_status']);
-
-		$query_admin_table = '';
-		$keyword_admin = '';
-
-		if ($keyword_status == SESSIONADMIN) {
-			$keyword_status = '%';
-			$query_admin_table = " , $admin_table a ";
-			$keyword_admin = ' AND a.user_id = u.user_id ';
-		}
-
-		$keyword_extra_value = '';
-
-        if (isset($_GET['keyword_extra_data'])) {
-        	if (!empty($_GET['keyword_extra_data']) && !empty($_GET['keyword_extra_data_text'])) {
-            	$keyword_extra_data_text = Database::escape_string($_GET['keyword_extra_data_text']);
-                $keyword_extra_value = " AND ufv.field_value LIKE '%".trim($keyword_extra_data_text)."%' ";
-			}
-		}
-
-		$keyword_active = isset($_GET['keyword_active']);
-		$keyword_inactive = isset($_GET['keyword_inactive']);
-		$sql .= $query_admin_table." WHERE (u.firstname LIKE '%".$keyword_firstname."%' " .
-				"AND u.lastname LIKE '%".$keyword_lastname."%' " .
-				"AND u.username LIKE '%".$keyword_username."%'  " .
-				"AND u.email LIKE '%".$keyword_email."%'   " .
-				"AND u.official_code LIKE '%".$keyword_officialcode."%'    " .
-				"AND u.status LIKE '".$keyword_status."'" .
-				$keyword_admin.$keyword_extra_value;
-
-		if ($keyword_active && !$keyword_inactive) {
-			$sql .= " AND u.active='1'";
-		} elseif($keyword_inactive && !$keyword_active) {
-			$sql .= " AND u.active='0'";
-		}
-		$sql .= " ) ";
-	}
-
-    // adding the filter to see the user's only of the current access_url
-	if ((api_is_platform_admin() || api_is_session_admin()) && api_get_multiple_access_url()) {
-		$sql.= " AND url_rel_user.access_url_id=".api_get_current_access_url_id();
-    }
+    $sql = prepare_user_sql_query (false);
 
     $checkPassStrength = isset($_GET['check_easy_passwords']) && $_GET['check_easy_passwords'] == 1 ? true : false;
 
@@ -698,16 +653,16 @@ if (!empty($action)) {
                 break;
 			case 'show_message' :
                 if (!empty($_GET['message'])) {
-                    $message = Display :: return_message(stripslashes($_GET['message']), 'confirmation');
-                }
-
-                if (!empty($_GET['warn'])) {
-                	// to prevent too long messages
-                	if ($_GET['warn'] == 'session_message'){
-                        $_GET['warn'] = $_SESSION['session_message_import_users'];
-                	}
-                	$message = Display::return_message(urldecode($_GET['warn']),'warning', false);
-                }
+                    $message = Display::return_message(stripslashes($_GET['message']), 'confirmation');
+                } else {
+                    if (!empty($_GET['warn'])) {
+                        // to prevent too long messages
+                    	if ($_GET['warn'] == 'session_message'){
+                            $_GET['warn'] = $_SESSION['session_message_import_users'];
+                    	}
+                    	$message = Display::return_message(Security::remove_XSS($_GET['warn']), 'warning', false);
+                    }
+               }
 
 				break;
 			case 'delete_user' :

+ 15 - 7
main/announcements/announcements.inc.php

@@ -572,20 +572,27 @@ class AnnouncementManager
             $to_already_selected = array();
         }
 
-        echo "<table id=\"recipient_list\" style=\"display: none;\">";
+        echo "<table id=\"recipient_list\" >";
         echo '<tr>';
+        echo '<td>';
+        echo '<label><input type="checkbox" id="send_to_all_users">'.get_lang('SendToAllUsers') . "</label>";
+        echo "</td>";
+        echo '</tr>';
+        echo '<tr>';
+
 
         // the form containing all the groups and all the users of the course
         echo '<td>';
         echo "<strong>" . get_lang('Users') . "</strong><br />";
+
         self::construct_not_selected_select_form($group_list, $user_list, $to_already_selected);
         echo "</td>";
 
         // the buttons for adding or removing groups/users
         echo '<td valign="middle">';
-        echo '<button class="arrowr" type="button" onClick="javascript: move(this.form.elements[0], this.form.elements[3])" onClick="javascript: move(this.form.elements[0], this.form.elements[3])"></button>';
+        echo '<button class="arrowr" type="button" onClick="javascript: move(this.form.elements[1], this.form.elements[4])" onClick="javascript: move(this.form.elements[1], this.form.elements[4])"></button>';
         echo '<br /> <br />';
-        echo '<button class="arrowl" type="button" onClick="javascript: move(this.form.elements[3], this.form.elements[0])" onClick="javascript: move(this.form.elements[3], this.form.elements[0])"></button>';
+        echo '<button class="arrowl" type="button" onClick="javascript: move(this.form.elements[4], this.form.elements[1])" onClick="javascript: move(this.form.elements[4], this.form.elements[1])"></button>';
         echo "</td>";
 
         echo "<td>";
@@ -603,10 +610,10 @@ class AnnouncementManager
      */
     public static function show_to_form_group($group_id)
     {
-        echo "<table id=\"recipient_list\" style=\"display: none;\">";
+        echo "<table id=\"recipient_list\" >";
         echo "<tr>";
         echo "<td>";
-        echo "<select name=\"not_selected_form[]\" size=5 style=\"width:200px\" multiple>";
+        echo "<select id=\"not_selected_form\" name=\"not_selected_form[]\" size=5 style=\"width:200px\" multiple>";
         $group_users = GroupManager::getStudentsAndTutors($group_id);
         foreach ($group_users as $user) {
             echo '<option value="' . $user['user_id'] . '" title="' . sprintf(get_lang('LoginX'), $user['username']) . '" >' .
@@ -637,7 +644,7 @@ class AnnouncementManager
      */
     public static function construct_not_selected_select_form($group_list = null, $user_list = null, $to_already_selected)
     {
-        echo '<select name="not_selected_form[]" size="7" class="span4" multiple>';
+        echo '<select id="not_selected_form" name="not_selected_form[]" size="7" class="span4" multiple>';
         // adding the groups to the select form
         if ($group_list) {
             foreach ($group_list as $this_group) {
@@ -658,7 +665,8 @@ class AnnouncementManager
         if ($user_list) {
             foreach ($user_list as $this_user) {
                 if (is_array($to_already_selected)) {
-                    if (!in_array("USER:" . $this_user['user_id'], $to_already_selected)) { // $to_already_selected is the array containing the users (and groups) that are already selected
+                    if (!in_array("USER:" . $this_user['user_id'], $to_already_selected)) {
+                        // $to_already_selected is the array containing the users (and groups) that are already selected
                         echo "<option value=\"USER:" . $this_user['user_id'] . "\" title='" . sprintf(get_lang('LoginX'), $this_user['username']) . "'>",
                         "", api_get_person_name($this_user['firstname'], $this_user['lastname']),
                         "</option>";

+ 14 - 14
main/announcements/announcements.php

@@ -53,7 +53,6 @@ $length 	= '36';
 // Database Table Definitions
 $tbl_courses			= Database::get_main_table(TABLE_MAIN_COURSE);
 $tbl_sessions			= Database::get_main_table(TABLE_MAIN_SESSION);
-
 $tbl_announcement		= Database::get_course_table(TABLE_ANNOUNCEMENT);
 $tbl_item_property  	= Database::get_course_table(TABLE_ITEM_PROPERTY);
 
@@ -73,8 +72,8 @@ $course_id = api_get_course_int_id();
 event_access_tool(TOOL_ANNOUNCEMENT);
 
 /*	POST TO	*/
-$safe_emailTitle = $_POST['emailTitle'];
-$safe_newContent = $_POST['newContent'];
+$safe_emailTitle = isset($_POST['emailTitle']) ? $_POST['emailTitle'] : null;
+$safe_newContent = isset($_POST['newContent']) ? $_POST['newContent'] : null;
 
 $content_to_modify = $title_to_modify 	= '';
 
@@ -98,10 +97,10 @@ if (!empty($_POST['To'])) {
 */
 
 $setting_select_groupusers = true;
-if (empty($_POST['To']) and !$_SESSION['select_groupusers']) {
+if (empty($_POST['To']) and !isset($_SESSION['select_groupusers'])) {
 	$_SESSION['select_groupusers'] = "hide";
 }
-$select_groupusers_status=$_SESSION['select_groupusers'];
+$select_groupusers_status = isset($_SESSION['select_groupusers']) ? $_SESSION['select_groupusers']:null;
 if (!empty($_POST['To']) and ($select_groupusers_status=="hide")) {
 	$_SESSION['select_groupusers'] = "show";
 }
@@ -168,7 +167,7 @@ if (!empty($group_id)) {
 	$interbreadcrumb[] = array ("url"=>"../group/group_space.php?gidReq=".$group_id, "name"=> get_lang('GroupSpace').' '.$group_properties['name']);
 }
 
-$announcement_id = intval($_GET['id']);
+$announcement_id = isset($_GET['id']) ? intval($_GET['id']) : null;
 $message = null;
 
 if (empty($_GET['origin']) or $_GET['origin'] !== 'learnpath') {
@@ -557,8 +556,10 @@ if (api_is_allowed_to_edit() && $announcement_number > 1) {
 	if (api_get_group_id() == 0 ) {
 		if (!$show_actions)
 			echo '<div class="actions">';
-			if (!in_array($_GET['action'], array('add', 'modify','view')))
-                echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&action=delete_all\" onclick=\"javascript:if(!confirm('".get_lang("ConfirmYourChoice")."')) return false;\">".Display::return_icon('delete_announce.png',get_lang('AnnouncementDeleteAll'),'',ICON_SIZE_MEDIUM)."</a>";
+			if (!isset($_GET['action'])) {
+                echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&action=delete_all\" onclick=\"javascript:if(!confirm('".get_lang("ConfirmYourChoice")."')) return false;\">".
+                    Display::return_icon('delete_announce.png',get_lang('AnnouncementDeleteAll'),'',ICON_SIZE_MEDIUM)."</a>";
+            }
     	}	// if announcementNumber > 1
 }
 
@@ -605,12 +606,11 @@ if ($display_form) {
 	if (empty($group_id)) {
 		echo '	<div class="control-group">
 					<label class="control-label">'.
-						Display::return_icon('group.png', get_lang('ModifyRecipientList'), array ('align' => 'absmiddle'),ICON_SIZE_SMALL).'<a href="#" onclick="toggle_sendto();">'.get_lang('SentTo').'</a>
+						Display::return_icon('group.png', get_lang('ModifyRecipientList'), array ('align' => 'absmiddle'),ICON_SIZE_SMALL).' '.get_lang('SentTo').'
 					</label>
 					<div class="controls">';
-		if (isset($_GET['id']) && is_array($to)) {
-			echo '<span id="recipient_overview">&nbsp;</span>';
-		} elseif (isset($_GET['remind_inactive'])) {
+
+		if (isset($_GET['remind_inactive'])) {
 			$email_ann = '1';
 			$_SESSION['select_groupusers']="show";
 			$content_to_modify = sprintf(get_lang('RemindInactiveLearnersMailContent'), api_get_setting('siteName'), 7);
@@ -640,7 +640,7 @@ if ($display_form) {
 				$content_to_modify = get_lang('YourAccountIsActiveYouCanLoginAndCheckYourCourses');
 			}
 		} else {
-			echo '<span id="recipient_overview">' . get_lang('Everybody') . '</span>';
+			//echo '<span id="recipient_overview">' . get_lang('Everybody') . '</span>';
 		}
 		AnnouncementManager::show_to_form($to);
 		echo '		</div>
@@ -739,7 +739,7 @@ if ($display_form) {
 	if (empty($group_id)) {
 		echo '<input type="hidden" name="submitAnnouncement" value="OK">';
 		echo '<input type="hidden" name="sec_token" value="'.$stok.'" />';
-		echo '<button class="btn save" type="button"  value="'.'  '.get_lang('Send').'  '.'" onclick="selectAll(this.form.elements[3],true)" >'.get_lang('ButtonPublishAnnouncement').'</button><br /><br />';
+		echo '<button class="btn save" type="button"  value="'.'  '.get_lang('Send').'  '.'" onclick="selectAll(this.form.elements[4],true)" >'.get_lang('ButtonPublishAnnouncement').'</button><br /><br />';
 	} else {
 		echo '<input type="hidden" name="submitAnnouncement" value="OK">';
 		echo '<input type="hidden" name="sec_token" value="'.$stok.'" />';

+ 58 - 28
main/announcements/resources/js/main.js

@@ -8,6 +8,35 @@ $(function() {
     $('.resizable-vertical').resizable({
         handles: "n, s"
     });
+
+    $('#send_to_all_users').click(function() {
+        var checked = $(this).attr('checked');
+
+        if (!checked) {
+            $('#selectedform option').each(function() {
+                var val = $(this).val();
+                var text = $(this).text();
+                if (val.substr(0 , 4) == 'USER') {
+                    $('#selectedform').find('[value="'+val+'"]').remove();
+                    $('#not_selected_form').append(new Option(text, val));
+                }
+            });
+        }
+
+        $('#not_selected_form option').each(function() {
+            var val = $(this).val();
+            var text = $(this).text();
+            if (val.substr(0 , 4) == 'USER') {
+                if (checked) {
+                    // Add
+                    $('#selectedform').append(new Option(text, val));
+                    $('#not_selected_form').find('[value="'+val+'"]').remove();
+                }
+            }
+        });
+
+
+    });
 });
 
 var Announcement = {};
@@ -66,7 +95,7 @@ function move_selected_option(from, to){
 }
 
 function update_hidden_field(name){
-    
+
     var select = $('#' + name + '_selected');
     var options = $("option", select)
     //update hidden field
@@ -77,7 +106,7 @@ function update_hidden_field(name){
         keys.push(option.val());
     });
     keys = keys.join(',');
-    
+
     var hidden = $('#' + name);
     hidden.val(keys);
 }
@@ -96,9 +125,9 @@ function toggle_list_selector(name)
         list.hide();
         overview.show();
     }
-    
+
     var select = $('#' + name + '_selected');
-    
+
     //update overview
     var content = [];
     var options = $("option", select)
@@ -107,16 +136,17 @@ function toggle_list_selector(name)
         option = $(option);
         content.push(option.text());
     });
-    
+
     content = content.join(', ');
     content = (content == '') ? lang.Everybody : content;
     overview.text(content);
 }
 
 
+
 function toggle_sendto()
 {
-    var list = $('#recipient_list');
+    /*var list = $('#recipient_list');
     var overview = $('#recipient_overview');
     if(list.css('display') == 'none'){
         list.show();
@@ -127,11 +157,11 @@ function toggle_sendto()
         list.hide();
         overview.show();
     }
-    
+
     var selected = $('#selectedform');
     var content = list_box_content(selected[0])
     content = (content == '') ? lang.Everybody : content;
-    overview.text(content);
+    overview.text(content);*/
 }
 
 function list_box_content(box)
@@ -158,7 +188,7 @@ function move(fbox, tbox) {
     var arrFboxIsDisabled = []; // if this from checkbox after move is disabled or not
     var arrTboxIsDisabled = []; // if this to checkbox after move is disabled or not
     var key_value = "";         // key for arrays arrFboxIsDisabled and arrTboxIsDisabled, use associative array key_value is the value of the array element (eg : GROUP:1 or USER:24)
-    
+
     var i;
     for (i = 0; i < tbox.options.length; i++) {
         arrLookup[tbox.options[i].text] = tbox.options[i].value;
@@ -178,8 +208,8 @@ function move(fbox, tbox) {
         {
             arrTbox[tLength] = fbox.options[i].text;
             tLength++;
-        } 
-        else 
+        }
+        else
         {
             arrFbox[fLength] = fbox.options[i].text;
             key_value = fbox.options[i].value;
@@ -187,14 +217,14 @@ function move(fbox, tbox) {
             fLength++;
         }
     }
-    
+
     arrFbox.sort();
     arrTbox.sort();
-    
+
     var arrFboxGroup = [];
     var arrFboxUser = [];
     var prefix_x;
-    
+
     var x;
     for (x = 0; x < arrFbox.length; x++) {
         prefix_x = arrFbox[x].substring(0, 2);
@@ -204,15 +234,15 @@ function move(fbox, tbox) {
             arrFboxUser.push(arrFbox[x]);
         }
     }
-    
+
     arrFboxGroup.sort();
     arrFboxUser.sort();
     arrFbox = arrFboxGroup.concat(arrFboxUser);
-    
+
     var arrTboxGroup = [];
     var arrTboxUser = [];
     var prefix_y;
-    
+
     var y;
     for (y = 0; y < arrTbox.length; y++) {
         prefix_y = arrTbox[y].substring(0, 2);
@@ -222,16 +252,16 @@ function move(fbox, tbox) {
             arrTboxUser.push(arrTbox[y]);
         }
     }
-    
+
     arrTboxGroup.sort();
     arrTboxUser.sort();
     arrTbox = arrTboxGroup.concat(arrTboxUser);
-    
+
     fbox.length = 0;
     tbox.length = 0;
-    
+
     var c;
-    for (c = 0; c < arrFbox.length; c++) 
+    for (c = 0; c < arrFbox.length; c++)
     {
         var no = new Option();
         no.value = arrLookup[arrFbox[c]];
@@ -242,7 +272,7 @@ function move(fbox, tbox) {
         }
         fbox[c] = no;
     }
-    for (c = 0; c < arrTbox.length; c++) 
+    for (c = 0; c < arrTbox.length; c++)
     {
         var no = new Option();
         no.value = arrLookup[arrTbox[c]];
@@ -250,12 +280,12 @@ function move(fbox, tbox) {
         key_value = no.value;
         if (arrTboxIsDisabled[key_value]) {
             no.disabled = "disabled";
-        }        
+        }
         tbox[c] = no;
     }
 }
 
-function validate() 
+function validate()
 {
     "use strict";
     var f = document.new_calendar_item;
@@ -266,7 +296,7 @@ function validate()
 
 function selectAll(cbList, bSelect, showwarning) {
     "use strict";
-    
+
     if (document.getElementById('emailTitle').value == '') {
         document.getElementById('msg_error').innerHTML = lang.FieldRequired;
         document.getElementById('msg_error').style.display = 'block';
@@ -286,11 +316,11 @@ function selectAll(cbList, bSelect, showwarning) {
     }
 }
 
-function reverseAll(cbList) 
+function reverseAll(cbList)
 {
     "use strict";
     var i;
-    for (i = 0; i < cbList.length; i++) 
+    for (i = 0; i < cbList.length; i++)
     {
         cbList[i].checked = !(cbList[i].checked);
         cbList[i].selected = !(cbList[i].selected);
@@ -308,4 +338,4 @@ function plus_attachment() {
         document.getElementById('plus').innerHTML = '&nbsp;<img style="vertical-align:middle;" src="../img/div_show.gif" alt="" />&nbsp;' + lang.AddAnAttachment;
     }
 }
-// End
+// End

+ 21 - 6
main/auth/cas/authcas.php

@@ -160,13 +160,28 @@ function cas_is_authenticated()
 }
 
 /**
-* Logs out the user of the cas 
-* The user MUST be logged in with cas to use this function 
-**/ 
-function cas_logout()
+ * Logs out the user of the cas
+ * The user MUST be logged in with cas to use this function
+ *
+ * @param $uinfo array user info (not needed)
+ * @param $location string redirect url
+ *
+ * @see online_logout()
+ */
+function cas_logout($uinfo=null, $location=null)
 {
-	//phpCAS::logoutWithRedirectService("fmc.univ-paris5.fr");		
-	phpCAS::logoutWithRedirectService(api_get_path(WEB_PATH));		
+    global $cas_auth_ver, $cas_auth_server, $cas_auth_port, $cas_auth_uri;
+    global $PHPCAS_CLIENT;
+    if (!is_object($PHPCAS_CLIENT)) {
+        phpCAS::client($cas_auth_ver, $cas_auth_server, $cas_auth_port, $cas_auth_uri);
+        phpCAS::setNoCasServerValidation();
+    }
+
+    if (!isset($location)) {
+        $location = api_get_path(WEB_PATH);
+    }
+
+    phpCAS::logoutWithRedirectService($location);
 }
 
 

+ 6 - 5
main/auth/gotocourse.php

@@ -1,11 +1,12 @@
 <?php
-/* For licensing terms, see /license.txt */
-
 /**
- * Author : hubert.borderiou@grenet.fr
- * Allow the user to login to a course after reaching a course URL like
- * http://chamilo.chamilo.org/courses/MYCOURSE/?id_session=0
+ * For licensing terms, see /license.txt
+ *
+ * Allow the user to login to a course after reaching a course URL (e.g. http://chamilo.chamilo.org/courses/MYCOURSE/?id_session=0 )
  * See https://support.chamilo.org/issues/6768
+ *
+ * Author : hubert.borderiou@grenet.fr
+ *
  */
 
 require('../inc/global.inc.php');

+ 28 - 0
main/auth/inscription.php

@@ -137,6 +137,34 @@ if ($user_already_registered_show_terms == false) {
         $form->addElement('radio', 'status', null, get_lang('RegAdmin'), COURSEMANAGER);
     }
 
+    $allowCaptcha = isset($_configuration['allow_captcha']) ? $_configuration['allow_captcha'] : false;
+
+    if ($allowCaptcha) {
+
+        $ajax = api_get_path(WEB_AJAX_PATH).'form.ajax.php?a=get_captcha';
+
+        $options = array(
+                'width'        => 220,
+                'height'       => 90,
+                'callback'     => $ajax.'&var='.basename(__FILE__, '.php'),
+                'sessionVar'   => basename(__FILE__, '.php'),
+                'imageOptions' => array(
+                    'font_size' => 20,
+                    'font_path' => api_get_path(LIBRARY_PATH).'pchart/fonts/',
+                    'font_file' => 'tahoma.ttf',
+                        //'output' => 'gif'
+                )
+        );
+
+        $captcha_question =  $form->addElement('CAPTCHA_Image', 'captcha_question', '', $options);
+        $form->addElement('static', null, null, get_lang('ClickOnTheImageForANewOne'));
+
+        $form->addElement('text', 'captcha', get_lang('EnterTheLettersYouSee'), array('size' => 40));
+        $form->addRule('captcha', get_lang('EnterTheCharactersYouReadInTheImage'), 'required', null, 'client');
+
+        $form->addRule('captcha', get_lang('TheTextYouEnteredDoesNotMatchThePicture'), 'CAPTCHA', $captcha_question);
+    }
+
     //	EXTENDED FIELDS
     if (api_get_setting('extended_profile') == 'true' && api_get_setting('extendedprofile_registration', 'mycomptetences') == 'true') {
         $form->add_html_editor('competences', get_lang('MyCompetences'), false, false, array('ToolbarSet' => 'register', 'Width' => '100%', 'Height' => '130'));

+ 14 - 38
main/calendar/agenda.inc.php

@@ -1518,8 +1518,11 @@ function load_edit_users($tool, $id)
     $TABLE_ITEM_PROPERTY = Database::get_course_table(TABLE_ITEM_PROPERTY);
     $course_id = api_get_course_int_id();
 
-    $sql = "SELECT * FROM $TABLE_ITEM_PROPERTY WHERE c_id = $course_id AND tool='$tool' AND ref='$id'";
-    $result = Database::query($sql) or die(Database::error());
+    $sql = "SELECT * FROM $TABLE_ITEM_PROPERTY
+            WHERE c_id = $course_id AND tool='$tool' AND ref='$id'";
+    $result = Database::query($sql);
+
+    $to = array();
     while ($row = Database::fetch_array($result)) {
         $to_group = $row['to_group_id'];
         switch ($to_group) {
@@ -1710,33 +1713,6 @@ function store_edited_agenda_item($event_id, $id_attach, $file_comment)
     } else {
         edit_agenda_attachment_file($file_comment, $id, $id_attach);
     }
-
-    // step 2: editing the item_property table (=delete all and add the new destination users/groups)
-    /*if ($edit_result = true) {
-        // 2.a. delete everything for the users
-        $sql_delete = "DELETE FROM ".$TABLE_ITEM_PROPERTY." WHERE c_id = $course_id AND ref='$id' AND tool='".TOOL_CALENDAR_EVENT."'";
-
-        $result = Database::query($sql_delete) or die(Database::error());
-        // 2.b. storing the new users/groups
-        if (!is_null($to)) { // !is_null($to): when no user is selected we send it to everyone
-            $send_to = separate_users_groups($to);
-            // storing the selected groups
-            if (is_array($send_to['groups'])) {
-                foreach ($send_to['groups'] as $group) {
-                    api_item_property_update($_course, TOOL_CALENDAR_EVENT, $id, "AgendaModified", api_get_user_id(), $group, '', $start_date, $end_date);
-                }
-            }
-            // storing the selected users
-            if (is_array($send_to['users'])) {
-                foreach ($send_to['users'] as $user) {
-                    api_item_property_update($_course, TOOL_CALENDAR_EVENT, $id, "AgendaModified", api_get_user_id(), '', $user, $start_date, $end_date);
-                }
-            }
-        } else {
-            // the message is sent to everyone, so we set the group to 0
-            api_item_property_update($_course, TOOL_CALENDAR_EVENT, $id, "AgendaModified", api_get_user_id(), '', '', $start_date, $end_date);
-        }
-    }*/
     // step 3: update the attachments (=delete all and add those in the session
     update_added_resources("Agenda", $id);
 
@@ -1797,11 +1773,9 @@ function delete_agenda_item($id)
                     }
                 }
                 $sql_del = "DELETE FROM $t_agenda_r WHERE cal_id = $id";
-                $res_del = Database::query($sql_del);
+                Database::query($sql_del);
             }
-            //$sql = "DELETE FROM ".$TABLEAGENDA." WHERE id='$id'";
-            //$sql= "UPDATE ".$TABLE_ITEM_PROPERTY." SET visibility='2' WHERE tool='Agenda' and ref='$id'";
-            //$result = Database::query($sql) or die (Database::error());
+
             api_item_property_update($_course, TOOL_CALENDAR_EVENT, $id, 'delete', api_get_user_id());
 
             // delete the resources that were added to this agenda item
@@ -1813,8 +1787,8 @@ function delete_agenda_item($id)
 
             // displaying the result message in the yellow box
             Display::display_confirmation_message(get_lang("AgendaDeleteSuccess"));
-        }   // if (isset($id)&&$id&&isset($action)&&$action=="delete")
-    } // if ($is_allowed_to_edit)
+        }
+    }
 }
 
 /**
@@ -2249,7 +2223,7 @@ function show_add_form($id = '', $type = null)
     global $MonthsLong;
     $htmlHeadXtra[] = to_javascript();
     // the default values for the forms
-    if ($_GET['originalresource'] !== 'no') {
+    if (!isset($_GET['originalresource'])) {
         $day = date('d');
         $month = date('m');
         $year = date('Y');
@@ -2262,12 +2236,15 @@ function show_add_form($id = '', $type = null)
         $end_hours = 17;
         $end_minutes = '00';
         $repeat = false;
+        $content = null;
+        $title = null;
+
     } else {
         // we are coming from the resource linker so there might already have been some information in the form.
         // When we clicked on the button to add resources we stored every form information into a session and now we
         // are doing the opposite thing: getting the information out of the session and putting it into variables to
         // display it in the forms.
-        $form_elements = $_SESSION['formelements'];
+        $form_elements = isset($_SESSION['formelements']) ? $_SESSION['formelements'] : null;
         $day = $form_elements['day'];
         $month = $form_elements['month'];
         $year = $form_elements['year'];
@@ -2281,7 +2258,6 @@ function show_add_form($id = '', $type = null)
         $title = $form_elements['title'];
         $content = $form_elements['content'];
         $id = $form_elements['id'];
-
         $to = $form_elements['to'];
         $repeat = $form_elements['repeat'];
     }

+ 2 - 1
main/calendar/agenda.lib.php

@@ -768,7 +768,8 @@ class Agenda
             while ($row = Database::fetch_array($result, 'ASSOC')) {
                 // to gather sent_tos
                 $sql = "SELECT to_user_id, to_group_id
-                    FROM ".$tlb_course_agenda." agenda, ".$tbl_property." ip
+                    FROM ".$tbl_property." ip INNER JOIN ".$tlb_course_agenda." agenda
+                    ON      ip.ref          = agenda.id
                     WHERE   ip.tool         = '".TOOL_CALENDAR_EVENT."' AND
                             ref             = {$row['ref']} AND
                             ip.visibility   = '1' AND

+ 2 - 2
main/calendar/agenda.php

@@ -235,9 +235,9 @@ if (api_is_allowed_to_edit(false, true) OR
                 $event_start = (int) $_POST['fyear'].'-'.(int) $_POST['fmonth'].'-'.(int) $_POST['fday'].' '.(int) $_POST['fhour'].':'.(int) $_POST['fminute'].':00';
                 $event_stop = (int) $_POST['end_fyear'].'-'.(int) $_POST['end_fmonth'].'-'.(int) $_POST['end_fday'].' '.(int) $_POST['end_fhour'].':'.(int) $_POST['end_fminute'].':00';
                 $safe_title = Security::remove_XSS($_POST['title']);
-                $safe_file_comment = Security::remove_XSS($_POST['file_comment']);
+                $safe_file_comment = isset($_POST['file_comment']) ? Security::remove_XSS($_POST['file_comment']) : null;
 
-                if ($_POST['empty_end_date'] == 'on') {
+                if (isset($_POST['empty_end_date']) && $_POST['empty_end_date'] == 'on') {
                     $event_stop = '0000-00-00 00:00:00';
                 }
                 $agenda->type = 'course';

+ 5 - 5
main/course_home/activity.php

@@ -76,7 +76,7 @@ if ($session_id == 0 && api_is_course_admin() && api_is_allowed_to_edit(null, tr
 	}
     $my_list = CourseHome::get_tools_category(TOOL_AUTHORING);
 	$items = CourseHome::show_tools_category($my_list);
-    $content .= return_block(get_lang('Authoring'),  $items);
+    $content .= return_block(get_lang('Authoring'),  $items, 'course-tools-author');
 
     $my_list = CourseHome::get_tools_category(TOOL_INTERACTION);
 
@@ -85,12 +85,12 @@ if ($session_id == 0 && api_is_course_admin() && api_is_allowed_to_edit(null, tr
     $my_list = array_merge($my_list,$list2);
     $items =  CourseHome::show_tools_category($my_list);
 
-    $content .= return_block(get_lang('Interaction'),  $items);
+    $content .= return_block(get_lang('Interaction'),  $items, 'course-tools-interaction');
 
     $my_list = CourseHome::get_tools_category(TOOL_ADMIN_PLATFORM);
     $items = CourseHome::show_tools_category($my_list);
 
-    $content .= return_block(get_lang('Administration'),  $items);
+    $content .= return_block(get_lang('Administration'),  $items , 'course-tools-administration');
 
 } elseif (api_is_coach()) {
 	if (api_get_setting('show_session_data') == 'true' && $session_id > 0) {
@@ -117,7 +117,7 @@ if ($session_id == 0 && api_is_course_admin() && api_is_allowed_to_edit(null, tr
 	}
 }
 
-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>';
+function return_block($title, $content, $class) {
+    $html = '<div class="row course-title-tools"><div class="span12"><div class="page-header"><h3>'.$title.'</h3></div></div></div><div class="row '.$class.'">'.$content.'</div>';
     return $html;
 }

+ 13 - 9
main/course_info/delete_course.php

@@ -10,6 +10,7 @@
 /**
  * Code
  */
+use \ChamiloSession as Session;
 
 // Language files that need to be included
 $language_file = array('admin', 'course_info');
@@ -18,39 +19,42 @@ require_once '../inc/global.inc.php';
 require_once '../gradebook/lib/be/gradebookitem.class.php';
 require_once '../gradebook/lib/be/category.class.php';
 $this_section = SECTION_COURSES;
-$current_course_tool  = TOOL_COURSE_MAINTENANCE;
+$current_course_tool = TOOL_COURSE_MAINTENANCE;
 api_protect_course_script(true);
 
+$_course = api_get_course_info();
+
 $current_course_code = $_course['official_code'];
 $current_course_name = $_course['name'];
 
 if (!api_is_allowed_to_edit()) {
 	api_not_allowed(true);
 }
+
 $tool_name = get_lang('DelCourse');
 
 if (isset($_GET['delete']) && $_GET['delete'] == 'yes') {
-	CourseManager :: delete_course($_course['sysCode']);
+	CourseManager::delete_course($_course['sysCode']);
 	$obj_cat = new Category();
 	$obj_cat->update_category_delete($_course['sysCode']);
 
 	// DELETE CONFIRMATION MESSAGE
-	unset($_course);
-	unset($_cid);
+    Session::erase('_cid');
+    Session::erase('_real_cid');
 	$noPHP_SELF = true;
 	$message = '<h2>'.get_lang('Course').' : '.$current_course_name.' ('.$current_course_code.') </h2>';
     $message .=get_lang('HasDel');
 	$message .= '<br /><br /><a href="../../index.php">'.get_lang('BackHome').' '.api_get_setting('siteName').'</a>';
 
-} else {	
+} else {
     $message = '<h3>'.get_lang('Course').' : '.$current_course_name.' ('.$current_course_code.') </h3>';
-    $message .= '<p>'.get_lang('ByDel').'</p><p><a class="btn btn-primary" href="maintenance.php">'.get_lang('No').'</a>&nbsp;<a class="btn" href="'.api_get_self().'?delete=yes">'.get_lang('Yes').'</a></p>';
+    $message .= '<p>'.get_lang('ByDel').'</p>';
+    $message .= '<p><a class="btn btn-primary" href="'.api_get_path(WEB_CODE_PATH).'course_info/maintenance.php?'.api_get_cidreq().'">'.
+        get_lang('No').'</a>&nbsp;<a class="btn" href="'.api_get_self().'?delete=yes&'.api_get_cidreq().'">'.
+        get_lang('Yes').'</a></p>';
 	$interbreadcrumb[] = array('url' => 'maintenance.php', 'name' => get_lang('Maintenance'));
 }
 Display :: display_header($tool_name, 'Settings');
 echo Display::page_header($tool_name);
 Display::display_warning_message($message, false);
-
-/*	FOOTER */
-
 Display :: display_footer();

+ 129 - 65
main/coursecopy/classes/CourseRecycler.class.php

@@ -21,11 +21,13 @@ class CourseRecycler
      * @param course $course The course-object which contains the items to
      * delete
      */
-    function CourseRecycler($course) {
+    function CourseRecycler($course)
+    {
         $this->course = $course;
         $this->course_info = api_get_course_info($this->course->code);
         $this->course_id = $this->course_info['real_id'];
     }
+
     /**
      * Delete all items from the course.
      * This deletes all items in the course-object from the current Chamilo-
@@ -33,8 +35,11 @@ class CourseRecycler
      * @param string The type of recycling we want (full_backup or select_items)
      * @assert (null) === false
      */
-    function recycle($type) {
-        if (empty($type)) { return false; }
+    function recycle($type)
+    {
+        if (empty($type)) {
+            return false;
+        }
         $this->type = $type;
 
         $table_tool_intro 		= Database::get_course_table(TABLE_TOOL_INTRO);
@@ -61,23 +66,30 @@ class CourseRecycler
 
         foreach ($this->course->resources as $type => $resources) {
             foreach ($resources as $id => $resource) {
-                $sql = "DELETE FROM ".$table_linked_resources." WHERE c_id = ".$this->course_id." AND  (source_type = '".$type."' AND source_id = '".$id."') OR (resource_type = '".$type."' AND resource_id = '".$id."')  ";
+                $sql = "DELETE FROM ".$table_linked_resources."
+                        WHERE
+                            c_id = ".$this->course_id." AND
+                            (source_type = '".$type."' AND source_id = '".$id."') OR
+                            (resource_type = '".$type."' AND resource_id = '".$id."') ";
                 Database::query($sql);
                 if (is_numeric($id)) {
-                    $sql = "DELETE FROM ".$table_item_properties." WHERE c_id = ".$this->course_id." AND tool ='".$resource->get_tool()."' AND ref=".$id;
+                    $sql = "DELETE FROM ".$table_item_properties."
+                            WHERE c_id = ".$this->course_id." AND tool ='".$resource->get_tool()."' AND ref=".$id;
                     Database::query($sql);
                 } elseif ($type == RESOURCE_TOOL_INTRO) {
-                    $sql = "DELETE FROM $table_tool_intro WHERE c_id = ".$this->course_id." AND  id='$id'";
+                    $sql = "DELETE FROM $table_tool_intro
+                            WHERE c_id = ".$this->course_id." AND id='$id'";
                     Database::query($sql);
                 }
             }
         }
-
     }
+
     /**
      * Delete documents
      */
-    function recycle_documents() {
+    function recycle_documents()
+    {
         if ($this->course->has_resources(RESOURCE_DOCUMENT)) {
             $table = Database :: get_course_table(TABLE_DOCUMENT);
             foreach ($this->course->resources[RESOURCE_DOCUMENT] as $id => $document) {
@@ -92,13 +104,11 @@ class CourseRecycler
     /**
      * Delete wiki
      */
-    function recycle_wiki() {
+    function recycle_wiki()
+    {
         if ($this->course->has_resources(RESOURCE_WIKI)) {
             $table_wiki 		= Database::get_course_table(TABLE_WIKI);
             $table_wiki_conf 	= Database::get_course_table(TABLE_WIKI_CONF);
-            //$table_wiki_discuss = Database::get_course_table(TABLE_WIKI_DISCUSS);
-            //$table_wiki_mailcue = Database::get_course_table(TABLE_WIKI_MAILCUE);
-
             $pages = array();
             foreach ($this->course->resources[RESOURCE_WIKI] as $resource) {
                 $pages[] = $resource->page_id;
@@ -116,7 +126,8 @@ class CourseRecycler
     /**
      * Delete glossary
      */
-    function recycle_glossary() {
+    function recycle_glossary()
+    {
         if ($this->course->has_resources(RESOURCE_GLOSSARY)) {
             $table_glossary	= Database::get_course_table(TABLE_GLOSSARY);
             $ids = implode(',', (array_keys($this->course->resources[RESOURCE_GLOSSARY])));
@@ -128,7 +139,8 @@ class CourseRecycler
     /**
      * Delete links
      */
-    function recycle_links() {
+    function recycle_links()
+    {
         if ($this->course->has_resources(RESOURCE_LINK)) {
             $table = Database :: get_course_table(TABLE_LINK);
             $ids = implode(',', (array_keys($this->course->resources[RESOURCE_LINK])));
@@ -140,7 +152,8 @@ class CourseRecycler
     /**
      * Delete forums
      */
-    function recycle_forums() {
+    function recycle_forums()
+    {
 
         $table_category = Database :: get_course_table(TABLE_FORUM_CATEGORY);
         $table_forum = Database :: get_course_table(TABLE_FORUM);
@@ -171,10 +184,8 @@ class CourseRecycler
             Database::query($sql);
             $sql = "DELETE FROM ".$table_thread_qualify_log." WHERE c_id = ".$this->course_id;
             Database::query($sql);
-
             $sql = "DELETE FROM ".$table_thread_qualify_log." WHERE c_id = ".$this->course_id;
             Database::query($sql);
-
         }
 
         if ($this->course->has_resources(RESOURCE_FORUMCATEGORY)) {
@@ -195,40 +206,56 @@ class CourseRecycler
                 " AND ".$table_post.".forum_id IN(".$forum_ids.");";
             Database::query($sql);
 
-            $sql = "DELETE FROM ".$table_mail_queue." USING ".$table_mail_queue." INNER JOIN ".$table_post.
-                " WHERE  ".$table_post.".c_id = ".$this->course_id." AND ".$table_mail_queue.".c_id = ".$this->course_id." AND  ".$table_mail_queue.".post_id = ".$table_post.".post_id".
-                " AND ".$table_post.".forum_id IN(".$forum_ids.");";
+            $sql = "DELETE FROM ".$table_mail_queue." USING ".$table_mail_queue." INNER JOIN $table_post
+                    WHERE
+                        ".$table_post.".c_id = ".$this->course_id." AND
+                        ".$table_mail_queue.".c_id = ".$this->course_id." AND
+                        ".$table_mail_queue.".post_id = ".$table_post.".post_id AND
+                        ".$table_post.".forum_id IN(".$forum_ids.");";
             Database::query($sql);
 
             // Just in case, deleting in the same table using thread_id as record-linker.
-            $sql = "DELETE FROM ".$table_mail_queue.
-                " USING ".$table_mail_queue." INNER JOIN ".$table_thread.
-                " WHERE $table_mail_queue.c_id = ".$this->course_id." AND $table_thread.c_id = ".$this->course_id." AND ".$table_mail_queue.".thread_id = ".$table_thread.".thread_id".
-                " AND ".$table_thread.".forum_id IN(".$forum_ids.");";
+            $sql = "DELETE FROM $table_mail_queue
+                    USING ".$table_mail_queue." INNER JOIN $table_thread
+                    WHERE
+                        $table_mail_queue.c_id = ".$this->course_id." AND
+                        $table_thread.c_id = ".$this->course_id." AND
+                        $table_mail_queue.thread_id = ".$table_thread.".thread_id AND
+                        $table_thread.forum_id IN(".$forum_ids.");";
             Database::query($sql);
 
-            $sql = "DELETE FROM ".$table_thread_qualify.
-                " USING ".$table_thread_qualify." INNER JOIN ".$table_thread.
-                " WHERE $table_thread_qualify.c_id = ".$this->course_id." AND  $table_thread.c_id = ".$this->course_id." AND ".$table_thread_qualify.".thread_id = ".$table_thread.".thread_id".
-                " AND ".$table_thread.".forum_id IN(".$forum_ids.");";
+            $sql = "DELETE FROM $table_thread_qualify
+                    USING $table_thread_qualify INNER JOIN $table_thread
+                    WHERE
+                        $table_thread_qualify.c_id = ".$this->course_id." AND
+                        $table_thread.c_id = ".$this->course_id." AND
+                        $table_thread_qualify.thread_id = $table_thread.thread_id AND
+                        $table_thread.forum_id IN(".$forum_ids.");";
             Database::query($sql);
 
             $sql = "DELETE FROM ".$table_thread_qualify_log.
                 " USING ".$table_thread_qualify_log." INNER JOIN ".$table_thread.
-                " WHERE  $table_thread_qualify_log.c_id = ".$this->course_id." AND $table_thread.c_id = ".$this->course_id." AND ".$table_thread_qualify_log.".thread_id = ".$table_thread.".thread_id".
-                " AND ".$table_thread.".forum_id IN(".$forum_ids.");";
+                " WHERE
+                    $table_thread_qualify_log.c_id = ".$this->course_id." AND
+                    $table_thread.c_id = ".$this->course_id." AND
+                    ".$table_thread_qualify_log.".thread_id = ".$table_thread.".thread_id AND
+                    ".$table_thread.".forum_id IN(".$forum_ids.");";
             Database::query($sql);
 
-            $sql = "DELETE FROM ".$table_notification." WHERE c_id = ".$this->course_id." AND forum_id IN(".$forum_ids.")";
+            $sql = "DELETE FROM ".$table_notification."
+                    WHERE c_id = ".$this->course_id." AND forum_id IN(".$forum_ids.")";
             Database::query($sql);
 
-            $sql = "DELETE FROM ".$table_post." WHERE c_id = ".$this->course_id." AND forum_id IN(".$forum_ids.")";
+            $sql = "DELETE FROM ".$table_post."
+                    WHERE c_id = ".$this->course_id." AND forum_id IN(".$forum_ids.")";
             Database::query($sql);
 
-            $sql = "DELETE FROM ".$table_thread." WHERE c_id = ".$this->course_id." AND forum_id IN(".$forum_ids.")";
+            $sql = "DELETE FROM ".$table_thread."
+                    WHERE c_id = ".$this->course_id." AND forum_id IN(".$forum_ids.")";
             Database::query($sql);
 
-            $sql = "DELETE FROM ".$table_forum." WHERE c_id = ".$this->course_id." AND forum_id IN(".$forum_ids.")";
+            $sql = "DELETE FROM ".$table_forum."
+                    WHERE c_id = ".$this->course_id." AND forum_id IN(".$forum_ids.")";
             Database::query($sql);
         }
 
@@ -238,15 +265,21 @@ class CourseRecycler
      * Delete forum-categories
      * Deletes all forum-categories from current course without forums
      */
-    function recycle_forum_categories() {
+    function recycle_forum_categories()
+    {
         $table_forum = Database :: get_course_table(TABLE_FORUM);
         $table_forumcat = Database :: get_course_table(TABLE_FORUM_CATEGORY);
         $sql = "SELECT fc.cat_id FROM ".$table_forumcat." fc
-                        LEFT JOIN ".$table_forum." f ON fc.cat_id=f.forum_category AND fc.c_id = ".$this->course_id." AND f.c_id = ".$this->course_id."
+                LEFT JOIN ".$table_forum." f
+                ON
+                    fc.cat_id=f.forum_category AND
+                    fc.c_id = ".$this->course_id." AND
+                    f.c_id = ".$this->course_id."
         		WHERE f.forum_id IS NULL";
         $res = Database::query($sql);
         while ($obj = Database::fetch_object($res)) {
-            $sql = "DELETE FROM ".$table_forumcat." WHERE c_id = ".$this->course_id." AND cat_id = ".$obj->cat_id;
+            $sql = "DELETE FROM ".$table_forumcat."
+                    WHERE c_id = ".$this->course_id." AND cat_id = ".$obj->cat_id;
             Database::query($sql);
         }
     }
@@ -255,16 +288,21 @@ class CourseRecycler
      * Delete link-categories
      * Deletes all empty link-categories (=without links) from current course
      */
-    function recycle_link_categories() {
+    function recycle_link_categories()
+    {
         $link_cat_table = Database :: get_course_table(TABLE_LINK_CATEGORY);
         $link_table = Database :: get_course_table(TABLE_LINK);
         $sql = "SELECT lc.id FROM ".$link_cat_table." lc
                 LEFT JOIN ".$link_table." l
-                    ON lc.id=l.category_id AND lc.c_id = ".$this->course_id." AND l.c_id = ".$this->course_id."
+                ON
+                    lc.id=l.category_id AND
+                    lc.c_id = ".$this->course_id." AND
+                    l.c_id = ".$this->course_id."
         		WHERE l.id IS NULL";
         $res = Database::query($sql);
         while ($obj = Database::fetch_object($res)) {
-            $sql = "DELETE FROM ".$link_cat_table." WHERE c_id = ".$this->course_id." AND id = ".$obj->id;
+            $sql = "DELETE FROM ".$link_cat_table."
+                    WHERE c_id = ".$this->course_id." AND id = ".$obj->id;
             Database::query($sql);
         }
     }
@@ -278,26 +316,31 @@ class CourseRecycler
             $table_attachment = Database :: get_course_table(TABLE_AGENDA_ATTACHMENT);
 
             $ids = implode(',', (array_keys($this->course->resources[RESOURCE_EVENT])));
-            $sql = "DELETE FROM ".$table." WHERE c_id = ".$this->course_id." AND id IN(".$ids.")";
+            $sql = "DELETE FROM ".$table."
+                    WHERE c_id = ".$this->course_id." AND id IN(".$ids.")";
             Database::query($sql);
 
-            $sql = "DELETE FROM ".$table_attachment." WHERE c_id = ".$this->course_id." AND agenda_id IN(".$ids.")";
+            $sql = "DELETE FROM ".$table_attachment."
+                    WHERE c_id = ".$this->course_id." AND agenda_id IN(".$ids.")";
             Database::query($sql);
         }
     }
     /**
      * Delete announcements
      */
-    function recycle_announcements() {
+    function recycle_announcements()
+    {
         if ($this->course->has_resources(RESOURCE_ANNOUNCEMENT)) {
             $table = Database :: get_course_table(TABLE_ANNOUNCEMENT);
             $table_attachment = Database :: get_course_table(TABLE_ANNOUNCEMENT_ATTACHMENT);
 
             $ids = implode(',', (array_keys($this->course->resources[RESOURCE_ANNOUNCEMENT])));
-            $sql = "DELETE FROM ".$table." WHERE c_id = ".$this->course_id." AND id IN(".$ids.")";
+            $sql = "DELETE FROM ".$table."
+                    WHERE c_id = ".$this->course_id." AND id IN(".$ids.")";
             Database::query($sql);
 
-            $sql = "DELETE FROM ".$table_attachment." WHERE c_id = ".$this->course_id." AND announcement_id IN(".$ids.")";
+            $sql = "DELETE FROM ".$table_attachment."
+                    WHERE c_id = ".$this->course_id." AND announcement_id IN(".$ids.")";
             Database::query($sql);
         }
     }
@@ -400,7 +443,8 @@ class CourseRecycler
     /**
      * Recycle surveys - removes everything
      */
-    function recycle_surveys() {
+    function recycle_surveys()
+    {
         if ($this->course->has_resources(RESOURCE_SURVEY)) {
             $table_survey = Database :: get_course_table(TABLE_SURVEY);
             $table_survey_q = Database :: get_course_table(TABLE_SURVEY_QUESTION);
@@ -420,10 +464,12 @@ class CourseRecycler
             Database::query($sql);
         }
     }
+
     /**
      * Recycle learnpaths
      */
-    function recycle_learnpaths() {
+    function recycle_learnpaths()
+    {
         if ($this->course->has_resources(RESOURCE_LEARNPATH)) {
             $table_main = Database :: get_course_table(TABLE_LP_MAIN);
             $table_item = Database :: get_course_table(TABLE_LP_ITEM);
@@ -436,9 +482,9 @@ class CourseRecycler
                 // See task #875.
                 if ($learnpath->lp_type == 2) {
                     // This is a learning path of SCORM type.
-                    if (trim($learnpath->path) != '')   // A sanity check for avoiding removal of the parent folder scorm/
-                                                        // when $learnpath->path value is incorrect for some reason.
-                    {
+                    // A sanity check for avoiding removal of the parent folder scorm/
+                    if (trim($learnpath->path) != '') {
+                        // when $learnpath->path value is incorrect for some reason.
                         // The directory trat contains files of the SCORM package is to be deleted.
                         $scorm_package_dir = realpath($this->course->path . 'scorm/' . $learnpath->path);
                         rmdirr($scorm_package_dir);
@@ -446,40 +492,47 @@ class CourseRecycler
                 }
 
                 //remove links from course homepage
-                $sql = "DELETE FROM $table_tool WHERE c_id = ".$this->course_id."  AND link LIKE '%lp_controller.php%lp_id=$id%' AND image='scormbuilder.gif'";
+                $sql = "DELETE FROM $table_tool
+                        WHERE c_id = ".$this->course_id." AND link LIKE '%lp_controller.php%lp_id=$id%' AND image='scormbuilder.gif'";
                 Database::query($sql);
                 //remove elements from lp_* tables (from bottom-up) by removing interactions, then item_view, then views and items, then paths
-                $sql_items = "SELECT id FROM $table_item WHERE  c_id = ".$this->course_id."  AND lp_id=$id";
+                $sql_items = "SELECT id FROM $table_item
+                              WHERE c_id = ".$this->course_id."  AND lp_id=$id";
                 $res_items = Database::query($sql_items);
                 while ($row_item = Database::fetch_array($res_items)) {
                     //get item views
-                    $sql_iv = "SELECT id FROM $table_iv WHERE  c_id = ".$this->course_id."  AND lp_item_id=".$row_item['id'];
+                    $sql_iv = "SELECT id FROM $table_iv
+                               WHERE  c_id = ".$this->course_id."  AND lp_item_id=".$row_item['id'];
                     $res_iv = Database::query($sql_iv);
                     while ($row_iv = Database::fetch_array($res_iv)) {
                         //delete interactions
-                        $sql_iv_int_del = "DELETE FROM $table_iv_int WHERE  c_id = ".$this->course_id."  AND lp_iv_id = ".$row_iv['id'];
-                        $res_iv_int_del = Database::query($sql_iv_int_del);
+                        $sql_iv_int_del = "DELETE FROM $table_iv_int
+                                           WHERE c_id = ".$this->course_id."  AND lp_iv_id = ".$row_iv['id'];
+                        Database::query($sql_iv_int_del);
                     }
                     //delete item views
-                    $sql_iv_del = "DELETE FROM $table_iv WHERE c_id = ".$this->course_id."  AND lp_item_id=".$row_item['id'];
-                    $res_iv_del = Database::query($sql_iv_del);
+                    $sql_iv_del = "DELETE FROM $table_iv
+                                   WHERE c_id = ".$this->course_id."  AND lp_item_id=".$row_item['id'];
+                    Database::query($sql_iv_del);
                 }
                 //delete items
                 $sql_items_del = "DELETE FROM $table_item WHERE c_id = ".$this->course_id."  AND lp_id=$id";
-                $res_items_del = Database::query($sql_items_del);
+                Database::query($sql_items_del);
                 //delete views
                 $sql_views_del = "DELETE FROM $table_view WHERE c_id = ".$this->course_id."  AND lp_id=$id";
-                $res_views_del = Database::query($sql_views_del);
+                Database::query($sql_views_del);
                 //delete lps
                 $sql_del = "DELETE FROM $table_main WHERE c_id = ".$this->course_id."  AND id = $id";
-                $res_del = Database::query($sql_del);
+                Database::query($sql_del);
             }
         }
     }
+
     /**
      * Delete course description
      */
-    function recycle_cours_description() {
+    function recycle_cours_description()
+    {
         if ($this->course->has_resources(RESOURCE_COURSEDESCRIPTION)) {
             $table = Database :: get_course_table(TABLE_COURSE_DESCRIPTION);
             $ids = implode(',', (array_keys($this->course->resources[RESOURCE_COURSEDESCRIPTION])));
@@ -487,10 +540,12 @@ class CourseRecycler
             Database::query($sql);
         }
     }
+
     /**
     * Recycle Thematics
     */
-    function recycle_thematic($session_id = 0) {
+    function recycle_thematic($session_id = 0)
+    {
         if ($this->course->has_resources(RESOURCE_THEMATIC)) {
             $table_thematic         = Database :: get_course_table(TABLE_THEMATIC);
             $table_thematic_advance = Database :: get_course_table(TABLE_THEMATIC_ADVANCE);
@@ -522,7 +577,8 @@ class CourseRecycler
     /**
     * Recycle Attendances
     */
-    function recycle_attendance($session_id = 0) {
+    function recycle_attendance($session_id = 0)
+    {
         if ($this->course->has_resources(RESOURCE_ATTENDANCE)) {
             $table_attendance          = Database :: get_course_table(TABLE_ATTENDANCE);
             $table_attendance_calendar = Database :: get_course_table(TABLE_ATTENDANCE_CALENDAR);
@@ -541,10 +597,12 @@ class CourseRecycler
             }
         }
     }
+
     /**
      * Recycle Works
      */
-    function recycle_work($session_id = 0) {
+    function recycle_work($session_id = 0)
+    {
         if ($this->course->has_resources(RESOURCE_WORK)) {
             $table_work          = Database :: get_course_table(TABLE_STUDENT_PUBLICATION);
             $table_work_assignment = Database :: get_course_table(TABLE_STUDENT_PUBLICATION_ASSIGNMENT);
@@ -560,7 +618,13 @@ class CourseRecycler
                     // Finally, delete the main task registry
                     $cond = array('id = ? AND c_id = ?'=>array($last_id, $this->course_id));
                     Database::delete($table_work, $cond);
-                    api_item_property_update($this->course_info, TOOL_STUDENTPUBLICATION, $last_id,'StudentPublicationDeleted', api_get_user_id());
+                    api_item_property_update(
+                        $this->course_info,
+                        TOOL_STUDENTPUBLICATION,
+                        $last_id,
+                        'StudentPublicationDeleted',
+                        api_get_user_id()
+                    );
                 }
             }
         }

+ 73 - 7
main/coursecopy/classes/CourseRestorer.class.php

@@ -2108,22 +2108,88 @@ class CourseRestorer
 
                 // check resources inside html from fckeditor tool and copy correct urls into recipient course
                 $obj->params['description'] = DocumentManager::replace_urls_inside_content_html_from_copy_course($obj->params['description'], $this->course->code, $this->course->destination_path, $this->course->backup_path, $this->course->info['path']);
+                $id_work = $obj->params['id'];
                 $obj->params['id'] = null;
                 $obj->params['c_id'] = $this->destination_course_id;
 
-                $last_id = Database::insert($table_work, $obj->params);
                 // re-create dir
                 // @todo check security against injection of dir in crafted course backup here!
                 $path = $obj->params['url'];
                 $path = '/'.str_replace('/','',substr($path,1));
                 $destination_path = api_get_path(SYS_COURSE_PATH).$this->course->destination_path.'/work'.$path;
-                $r = @mkdir($destination_path, $perm);
-                if ($r === false) {
-                    error_log('Failed creating directory '.$destination_path.' in course restore for work tool');
-                }
+                if (!file_exists($destination_path) && is_dir($destination_path)) {
+                    $r = @mkdir($destination_path, $perm);
+                    if ($r === false) {
+                        error_log('Failed creating directory '.$destination_path.' in course restore for work tool');
+                    }
 
-                if (is_numeric($last_id)) {
-                    api_item_property_update($this->destination_course_info, 'work', $last_id,"DirectoryCreated", api_get_user_id());
+                    $last_id = Database::insert($table_work, $obj->params);
+                    if (is_numeric($last_id)) {
+                        $sql = 'SELECT *
+                                FROM '.$table_work_assignment.'
+                                WHERE  c_id = '.$this->course_origin_id.' AND
+                                       publication_id = '.$id_work;
+
+                        $result = Database::query($sql);
+                        $cant = Database::num_rows($result);
+                        if ($cant > 0) {
+                            $row = Database::fetch_assoc($result);
+                            $expires_date = $row['expires_on'];
+                            $end_date = $row['ends_on'];
+                            $add_to_calendar = $row['add_to_calendar'];
+                            $enable_calification = $row['enable_calification'];
+                            $sql_add_homework = "INSERT INTO $table_work_assignment SET
+                                                        c_id                 = $this->destination_course_id ,
+                                                        expires_on       		= '$expires_date',
+                                                        ends_on        	 	 = '$end_date',
+                                                        add_to_calendar  		= '$add_to_calendar',
+                                                        enable_qualification = '$enable_calification',
+                                                        publication_id 			= '$last_id'";
+                            Database::query($sql_add_homework);
+                        }
+                        api_item_property_update($this->destination_course_info, 'work', $last_id,"DirectoryCreated", api_get_user_id());
+                    }
+                } elseif ($this->file_option == FILE_RENAME) {
+                    $i = 1;
+                    $new_path = $destination_path.'_'.$i;
+                    $folder_exists = file_exists($new_path);
+                    while ($folder_exists) {
+                        $i ++;
+                        $new_path = $destination_path.'_'.$i;
+                        $folder_exists = file_exists($path.$new_path);
+                    }
+                    $r = @mkdir($new_path, $perm);
+                    if ($r === false) {
+                        error_log('Failed creating directory '.$new_path.' in course restore for work tool');
+                    }
+                    $obj->params['url'] .= '_'.$i;
+                    $obj->params['title'] .= '_'.$i;
+                    $last_id = Database::insert($table_work, $obj->params);
+                    if (is_numeric($last_id)) {
+                        $sql = 'SELECT *
+                            FROM '.$table_work_assignment.'
+                            WHERE  c_id = '.$this->course_origin_id.' AND
+                                   publication_id = '.$id_work;
+
+                        $result = Database::query($sql);
+                        $cant = Database::num_rows($result);
+                        if ($cant > 0) {
+                            $row = Database::fetch_assoc($result);
+                            $expires_date = $row['expires_on'];
+                            $end_date = $row['ends_on'];
+                            $add_to_calendar = $row['add_to_calendar'];
+                            $enable_calification = $row['enable_calification'];
+                            $sql_add_homework = "INSERT INTO $table_work_assignment SET
+                                                    c_id                 = $this->destination_course_id ,
+                                                    expires_on       		= '$expires_date',
+                                                    ends_on        	 	 = '$end_date',
+                                                    add_to_calendar  		= '$add_to_calendar',
+                                                    enable_qualification = '$enable_calification',
+                                                    publication_id 			= '$last_id'";
+                            Database::query($sql_add_homework);
+                        }
+                        api_item_property_update($this->destination_course_info, 'work', $last_id,"DirectoryCreated", api_get_user_id());
+                    }
                 }
             }
         }

+ 29 - 8
main/coursecopy/classes/CourseSelectForm.class.php

@@ -146,7 +146,11 @@ class CourseSelectForm
 		echo '<form method="post" id="upload_form" name="course_select_form" onsubmit="javascript: myUpload.start(\'dynamic_div\',\''.api_get_path(WEB_CODE_PATH).'img/progress_bar.gif\',\''.get_lang('PleaseStandBy', '').'\',\'upload_form\')">';
 		echo '<input type="hidden" name="action" value="course_select_form"/>';
 
-		if (!empty($hidden_fields['destination_course']) && !empty($hidden_fields['origin_course']) && !empty($hidden_fields['destination_session']) && !empty($hidden_fields['origin_session']) ) {
+		if (!empty($hidden_fields['destination_course']) &&
+            !empty($hidden_fields['origin_course']) &&
+            !empty($hidden_fields['destination_session']) &&
+            !empty($hidden_fields['origin_session'])
+        ) {
 			echo '<input type="hidden" name="destination_course" 	value="'.$hidden_fields['destination_course'].'"/>';
 			echo '<input type="hidden" name="origin_course" 		value="'.$hidden_fields['origin_course'].'"/>';
 			echo '<input type="hidden" name="destination_session" 	value="'.$hidden_fields['destination_session'].'"/>';
@@ -298,13 +302,22 @@ class CourseSelectForm
 			}
 		}
 
+        $recycleOption = isset($_POST['recycle_option']) ? true : false;
+
 		if (empty($element_count)) {
 		    Display::display_warning_message(get_lang('NoDataAvailable'));
 		} else {
     		if (!empty($hidden_fields['destination_session'])) {
-    			echo '<br /><button class="save" type="submit" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES, $charset))."'".')) return false;" >'.get_lang('Ok').'</button>';
+    			echo '<br /><button class="save" type="submit" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES, $charset))."'".')) return false;" >'.
+                    get_lang('Ok').'</button>';
     		} else {
-    			echo '<br /><button class="save" type="submit" onclick="checkLearnPath(\''.addslashes(get_lang('DocumentsWillBeAddedToo')).'\')">'.get_lang('Ok').'</button>';
+                if ($recycleOption) {
+                    echo '<br /><button class="save" type="submit">'.
+                        get_lang('Ok').'</button>';
+                } else {
+    			    echo '<br /><button class="save" type="submit" onclick="checkLearnPath(\''.addslashes(get_lang('DocumentsWillBeAddedToo')).'\')">'.
+                    get_lang('Ok').'</button>';
+                }
     		}
 		}
 
@@ -314,8 +327,11 @@ class CourseSelectForm
 		echo '<div id="dynamic_div" style="display:block;margin-left:40%;margin-top:10px;height:50px;"></div>';
 	}
 
-
-    static function display_hidden_quiz_questions($course) {
+    /**
+     * @param $course
+     */
+    static function display_hidden_quiz_questions($course)
+    {
 		if(is_array($course->resources)){
 			foreach ($course->resources as $type => $resources) {
 				if (count($resources) > 0) {
@@ -331,7 +347,11 @@ class CourseSelectForm
 		}
 	}
 
-	static function display_hidden_scorm_directories($course) {
+    /**
+     * @param $course
+     */
+    static function display_hidden_scorm_directories($course)
+    {
         if (is_array($course->resources)){
 			foreach ($course->resources as $type => $resources) {
 				if (count($resources) > 0) {
@@ -521,7 +541,8 @@ class CourseSelectForm
 	 * @param array $hidden_fiels Hidden fields to add to the form.
 	 * @param boolean the document array will be serialize. This is used in the course_copy.php file
 	 */
-	 function display_form_session_export($list_course, $hidden_fields = null, $avoid_serialize=false) {
+	 function display_form_session_export($list_course, $hidden_fields = null, $avoid_serialize=false)
+     {
 ?>
 		<script>
 			function exp(item) {
@@ -620,4 +641,4 @@ class CourseSelectForm
 		echo '</form>';
 		echo '<div id="dynamic_div" style="display:block;margin-left:40%;margin-top:10px;height:50px;"></div>';
 	}
-}
+}

+ 8 - 8
main/coursecopy/recycle_course.php

@@ -26,7 +26,10 @@ if (!api_is_allowed_to_edit()) {
 $this_section = SECTION_COURSES;
 
 // Breadcrumbs
-$interbreadcrumb[] = array('url' => '../course_info/maintenance.php', 'name' => get_lang('Maintenance'));
+$interbreadcrumb[] = array(
+    'url' => api_get_path(WEB_CODE_PATH).'course_info/maintenance.php',
+    'name' => get_lang('Maintenance')
+);
 
 // Displaying the header
 $nameTools = get_lang('RecycleCourse');
@@ -49,21 +52,20 @@ if ((isset($_POST['action']) && $_POST['action'] == 'course_select_form') || (is
 	} else {
 		$cb = new CourseBuilder();
 		$course = $cb->build();
-	}    
+	}
 	$recycle_type = "";
 	if (isset($_POST['recycle_option']) && $_POST['recycle_option'] == 'full_backup') {
 	    $recycle_type = 'full_backup';
-	}
-	else if (isset($_POST['action']) && $_POST['action'] == 'course_select_form') {
+	} else if (isset($_POST['action']) && $_POST['action'] == 'course_select_form') {
 	    $recycle_type = 'select_items';
 	}
 	$cr = new CourseRecycler($course);
 	$cr->recycle($recycle_type);
-	
+
 	Display::display_confirmation_message(get_lang('RecycleFinished'));
 } elseif (isset($_POST['recycle_option']) && $_POST['recycle_option'] == 'select_items') {
 	$cb = new CourseBuilder();
-	$course = $cb->build();    
+	$course = $cb->build();
 	CourseSelectForm::display_form($course);
 } else {
 	$cb = new CourseBuilder();
@@ -74,10 +76,8 @@ if ((isset($_POST['action']) && $_POST['action'] == 'course_select_form') || (is
 		Display::display_warning_message(get_lang('RecycleWarning'), false);
         $form = new FormValidator('recycle_course', 'post', 'recycle_course.php?'.api_get_cidreq());
 		$form->addElement('header', get_lang('SelectOptionForBackup'));
-		
 		$form->addElement('radio', 'recycle_option', null, get_lang('FullRecycle'), 'full_backup');
         $form->addElement('radio', 'recycle_option', null, get_lang('LetMeSelectItems'), 'select_items');
-        
         $form->addElement('style_submit_button', 'submit', get_lang('RecycleCourse'), 'class="save"');
         $form->setDefaults(array('recycle_option' => 'select_items'));
         $form->display();

+ 7 - 2
main/cron/import_csv.php

@@ -666,7 +666,10 @@ class ImportCsv
             $this->daysCoachAccessBeforeBeginning,
             $this->daysCoachAccessAfterBeginning,
             $this->defaultSessionVisibility,
-            $avoid
+            $avoid,
+            false,
+            false,
+            true
         );
 
         if (!empty($result['error_message'])) {
@@ -827,7 +830,9 @@ $stream = new StreamHandler(api_get_path(SYS_ARCHIVE_PATH).'import_csv.log', $mi
 $logger->pushHandler(new BufferHandler($stream, 0, $minLevel));
 $logger->pushHandler(new RotatingFileHandler('import_csv', 5, $minLevel));
 
-$import = new ImportCsv($logger, $_configuration['cron_import_csv_conditions']);
+$cronImportCSVConditions = isset($_configuration['cron_import_csv_conditions']) ? $_configuration['cron_import_csv_conditions'] : null;
+
+$import = new ImportCsv($logger, $cronImportCSVConditions);
 
 if (isset($_configuration['default_admin_user_id_for_cron'])) {
     $import->defaultAdminId = $_configuration['default_admin_user_id_for_cron'];

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 665 - 1691
main/css/academica/default.css


+ 23 - 103
main/css/academica/frames.css

@@ -20,7 +20,7 @@ img {
 }
 /* End hide from IE5-mac */
 
-/*****************************************************
+/***************************************************** 
  *  HEADER STYLES                                    *
  *****************************************************/
 #header {
@@ -55,97 +55,17 @@ img {
 	float: right;
 	font-weight: bold;
 }
-/* Header 2: Containing My Courses, My Profile,... */
-#header2 {
-	font-size: 12px;
-	padding: 4px;
-	background-color: #4271B5;
-	color: #fff;
-	border-bottom: 1px solid white;
-}
-#header2 .banner_links {
-	margin: 0;
-}
-#header2 a {
-	text-decoration: none;
-	color: #fff;
-	background: transparent;
-	font-weight:normal;
-	font-size: 12px;
-}
-#header2 input.logout {
-	/* makes an input appear like a link in this header */
-	margin: 0;
-	padding: 0;
-	background-color: transparent;
-	border: none;
-	color: #fff;
-	font-size: 12px;
-	font-weight:normal;
-	font-family: verdana, arial, helvetica, sans-serif;
-}
-#header2 a:hover, #header2 input.logout:hover {
-	border-bottom: 1px solid #fff;
-}
 #logout {
 	float: right;
 	width:20%;
 	text-align:right;
 }
-/* Header 3: Containing breadcrumbs, online users, student/teacher view, help */
-#header3 {
-	position: relative; /* to avoid the IE peekabo bug*/
-	font-size: 12px;
-	font-weight: normal;
-	padding: 4px;
-	background-color: #90AFDD;
-	color: #fff;
-	border-bottom: 1px solid white;
-}
-#header3 a {
-	color: #ffffff;
-	text-decoration: none;
-	font-weight:normal;
-}
-#header3 a:hover {
-	text-decoration: underline;
-}
-/* Header3Right: online users, student/teacher view, help */
-#Header3Right ul {
-	position: relative; /* to avoid the IE peekabo bug*/
-	float: right;
-	width: 50%;
-	margin: 0;
-	padding: 0;
-	list-style-type: none;
-	text-align: right;
-}
-#Header3Right ul li {
-	display: inline;
-}
-#Header3Right ul li a {
-	padding: 4px 6px 4px 4px;
-	color:#fff;
-}
-/* Header 4: not used */
-#header4 {
-	background-color: #fff;
-	color: #009;
-	padding: 4px;
-	margin-bottom: 2px;
-}
-#header4 a {
-	color: #4171b5;
-}
-#header4 a:hover {
-	text-decoration: none;
-	color: #f00;
-}
+
 /* The tool shortcuts */
 #toolshortcuts {
 	text-align: right;
 }
-/*****************************************************
+/***************************************************** 
  *  FOOTER STYLES                                    *
  *****************************************************/
 #footer {
@@ -157,7 +77,7 @@ img {
 #footer .copyright {
 	float: right;
 }
-/*****************************************************
+/***************************************************** 
  *  MAIN STYLES                                      *
  *****************************************************/
 #main {
@@ -233,7 +153,7 @@ img {
 	font-size: 12px;
 	color: #f00;
 }
-/*** layout divs for course and tool pages (being tested in some pages) ****/
+/*** layout divs for course and tool pages (being tested in some pages) ****/  
 #contentfloatholder {/* also makes the right "sliding" tab  */
 	/*background: url(../pics/sidebar-r.gif) repeat-y 100% 0;
 background: url(../pics/bg_fountain.jpg) no-repeat 100% 0; */
@@ -252,11 +172,11 @@ content: ".";
 #centerwrap {
 	float: left;
 	width: 100%;
-	margin-right: -95%;/* this needs to be less than 100% for Moz/Mac which thinks
-         it's empty otherwise. The difference is made up by putting a
+	margin-right: -95%;/* this needs to be less than 100% for Moz/Mac which thinks 
+         it's empty otherwise. The difference is made up by putting a 
          negative left margin on the left float:
-	   Note IE/Mac doesn't like this method ~ it wants the 100% so it can
-	   be fed in using IE only CSS below becasue IE/Win also works with the 100% method.
+	   Note IE/Mac doesn't like this method ~ it wants the 100% so it can 
+	   be fed in using IE only CSS below becasue IE/Win also works with the 100% method.  
 	*/
 }
 #center {
@@ -325,10 +245,10 @@ content: ".";
 	color:#4171B5;
 	display: block;
 }
-/* --- end of left side definition list menu section  --- */
+/* --- end of left side definition list menu section  --- */ 
 
 
-
+ 
 /* various sections in course-home.php file  */
 #toolremove {
 	width: 40%;
@@ -426,7 +346,7 @@ content: ".";
 	border: 1px solid #fff;
 	border-collapse: collapse;
 }
-/*The caption of the calendar (displays the month and the << and >> links*/
+/*The caption of the calendar (displays the month and the << and >> links*/ 
 #agenda_list #title {
 	background-color: #4171B5;
 	font-weight: bold;
@@ -463,7 +383,7 @@ content: ".";
 	border: 1px solid #264269;
 	border-collapse: collapse;
 }
-/* The cells for the days (1->31) */
+/* The cells for the days (1->31) */ 
 #agenda_list .days_week {
 	height: 40px;
 	width: 12%;
@@ -518,7 +438,7 @@ content: ".";
 	border: 0px solid #4171B5;
 	border-collapse: collapse;
 }
-/*text in the cells: display of agenda items (invisible)*/
+/*text in the cells: display of agenda items (invisible)*/   
 #agenda_list .data_hidden {
 	background-color: #eee;
 	text-align: left;
@@ -546,7 +466,7 @@ content: ".";
 	border-collapse: collapse;
 	color: #999999;
 }
-/*text in the cells: display of agenda items (highlighted)*/
+/*text in the cells: display of agenda items (highlighted)*/    
 #agenda_list .datanow {
 	background-color: #FFCC00;
 	text-align: left;
@@ -573,7 +493,7 @@ content: ".";
 }
 /* ---------------------------------------------------
 	styles for the mini agenda
------------------------------------------------------*/
+-----------------------------------------------------*/ 
 #smallcalendar {
 	width: 100%;
 	margin: 0 auto;
@@ -905,7 +825,7 @@ padding-top: 0px;	padding-right: 0px;	padding-bottom: 0px;	padding-left: 0px;}
 	font-family: Verdana, Arial, Helvetica, sans-serif;
 	font-size: 9px
 }
-/*****************************************************
+/***************************************************** 
  *  DATA TABLE STYLES                                *
  *****************************************************/
 .cell_header {
@@ -1061,9 +981,9 @@ div.system_announcement_content {
 	border-left: 1px solid gray;
 	padding-left: 5px;
 }
-/* tips Abbr-plugin for FCKeditor */
-abbr {
-      border-bottom: 1px dotted rgb(102, 102, 102);
-      background-color:#F00;
-      cursor: help;
-}
+/* tips Abbr-plugin for FCKeditor */
+abbr {
+      border-bottom: 1px dotted rgb(102, 102, 102);
+      background-color:#F00;
+      cursor: help;
+}

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


BIN
main/css/academica/images/bar_1.gif


BIN
main/css/academica/images/bar_1m.gif


BIN
main/css/academica/images/bar_1r.gif


BIN
main/css/academica/images/bar_1u.gif


BIN
main/css/corporate/images/tab_left.gif → main/css/academica/images/bg-button.gif


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


BIN
main/css/academica/images/bg-main.png


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


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


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


BIN
main/css/academica/images/blue_arrow.png


BIN
main/css/academica/images/bullet.gif


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


BIN
main/css/academica/images/button_plus.gif


BIN
main/css/academica/images/chamilo-welcome.png


BIN
main/css/academica/images/crystal3.gif


BIN
main/css/academica/images/crystal3.png


BIN
main/css/academica/images/crystal5.png


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


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


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


BIN
main/css/academica/images/header-logo.png


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


BIN
main/css/academica/images/icon-chamilo.png


+ 0 - 6
main/css/academica/images/index.html

@@ -1,6 +0,0 @@
-<html>
-<head>
-</head>
-<body>
-</body>
-</html>

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


BIN
main/css/academica/images/loading2.gif


BIN
main/css/academica/images/shadow.gif


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


BIN
main/css/academica/images/sprite-icon-social.png


BIN
main/css/academica/images/sprite-icon.png


BIN
main/css/academica/images/start-level.png


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


BIN
main/css/academica/images/tab.png


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


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


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


BIN
main/css/academica/images/vineta.png


BIN
main/css/academica/images/white_arrow.png


+ 21 - 7
main/css/academica/learnpath.css

@@ -1,3 +1,16 @@
+div.text {
+	margin-left : 6;
+	margin-right : 6;
+	margin-top : 5;
+	margin-bottom : 5;
+	text-align : justify;
+}
+span.messagesmall {
+	font-style : italic;
+	color : Red;
+}
+/* newscorm/learnpath */ 
+
 div.lp_actions {
 	background:#F8F8F8;
 	border-bottom:1px solid #999999;
@@ -67,7 +80,7 @@ div.lp_tree {
 	height:100%;
 	padding:3px 10px 3px 0;
 	overflow-x : auto;
-	overflow-y : scroll;
+	overflow-y : auto;
 	width:190px;
 }
 hr {
@@ -108,7 +121,8 @@ table.lp_build td {
 	vertical-align:top;
 }
 table.lp_build td.tree {
-	border-right:1px solid #999999;
+	/* border-right:1px solid #999999;*/
+	padding-right: 5px;
 	width:205px;
 }
 table.lp_build td.workspace {
@@ -145,22 +159,22 @@ table.lp_form th {
 table.lp_overview th.exercise {
 	width:50px;
 }
-table.lp_form input,  table.lp_form select,  table.lp_form textarea {
-	background:#F8F8F8;
+table.lp_form input, table.lp_form select, table.lp_form textarea {
+/*	background:#F8F8F8;
 	border:1px solid #999999;
 	font-family:Arial, Verdana, Helvetica, sans-serif;
 	font-size:12px;
 	padding:1px 2px;
-	width:300px;
+	width:300px;*/
 }
-table.lp_form td.radio input,  table.lp_form td.exercise input {
+table.lp_form td.radio input, table.lp_form td.exercise input {
 	width:auto;
 }
 table.lp_form .small_form {
 	background:#FFFFFF;
 }
 table.lp_form select {
-	padding:0;
+/*	padding:0;*/
 }
 table.lp_form input.button {
 	width:75px;

+ 31 - 5
main/css/academica/print.css

@@ -763,26 +763,52 @@ padding-top: 0px;	padding-right: 0px;	padding-bottom: 0px;	padding-left: 0px;}
 	padding: 5px;
 }
 .data_table th {
-	padding-right: 20px;
+	/*padding-right: 20px;*/
 	border: 1px solid gray;
 	background-color: #E5EDF9;
+	text-align: left;
 }
 .data_table tr.row_odd {
-	background-color: #fafafa;
+	background-color: #fafafa;	
 }
 .data_table tr.row_odd:hover, .data_table tr.row_even:hover {
 	background-color: #f0f0f0;
 }
 .data_table tr.row_even {
-	background-color: #fff;
+	background-color: #fff;	
+}
+.data_table td .highlight {
+    font-weight: bold;
 }
 .data_table td {
-	padding: 5px;
-	vertical-align: top;
+	padding: 5px;	
 	border-bottom: 1px solid #b0b0b0;
 	border-right: 1px dotted #e1e1e1;
 	border-left: 1px dotted #e1e1e1;
+	text-align: left;
 }
+
+
+.data_table_no_border {
+    border-collapse: collapse;
+    border-spacing: 0;
+    font-size: 12px;
+    margin-bottom: 15px;
+    margin-top: 8px;
+    text-align: left;
+    width: 100%;    
+}
+
+.data_table_no_border td {
+    line-height: normal;
+    padding: 6px;
+    text-align: left;
+    vertical-align: middle;
+}
+.data_table_no_border .highlight {
+    font-weight: bold;
+}
+
 /* admin page tool list definitions */
 .tool_list dt {
 	font-weight: bold;

+ 278 - 114
main/css/academica/scorm.css

@@ -162,157 +162,321 @@
 
 
 .scormpage {
-	height: 100%;
+    height: 100%;
 }
 .scormpage .menu {
-	width: 180px;
-	float: left;
-	margin: 1px;
-	padding: 0px;
-	margin-top: 0px;
-	padding-top: 0px;
-	font-size: small;
+    width: 180px;
+    float: left;
+    margin: 1px;
+    padding: 0px;
+    margin-top: 0px;
+    padding-top: 0px;
+    font-size: small;
 }
 .lp_toc {
-	background-color: white;
-	height: 380px;
-	width: 99%;
-	border-right: 1px none;
+    background-color: white;
+    height: 380px;
+    width: 99%;
+    border-right: 1px none;
 }
+
 .inner_lp_toc {
-	overflow: auto;
-	background-color: white;
-	height: 210px;
+    overflow: auto;
+    background-color: white;
+    height: 210px;   
 }
-.inner_lp_toc .scorm_item {
-	font-size: 11px;
-	margin-left: 10px;
-	margin-right:10px;
-	padding-bottom: 2px;
-	text-decoration: none;
-}
-.inner_lp_toc .scorm_item A {
-	font-size: 11px;
-	margin-right: 1px;
-	padding-bottom: 2px;
-	text-decoration: none;
-	font-weight: normal;
-}
-.inner_lp_toc .scorm_item A.chapter_module {
-	font-weight: normal;
-	margin-right: 10px;
+
+.inner_lp_toc .scorm_item a {
+    font-weight: normal;
+    font-size: 12px;
+    margin-right: 1px;
+    padding-bottom: 2px;
+    text-decoration: none;
+    font-family: Helvetica,Arial,sans-serif;
+    color: #2F3E46;    
 }
-.inner_lp_toc .scorm_item_highlight {
-	font-size: 11px;
-	margin-right: 1px;
-	padding-bottom: 2px;
-	text-decoration: none;
-	font-weight: normal;
-	background:#aaa;
-}
-.inner_lp_toc .scorm_item_highlight A {
-	font-size: 11px;
-	margin-right: 1px;
-	text-decoration: none;
-	font-weight: normal;
+
+.inner_lp_toc .scorm_item a.chapter_module {
+    font-weight: normal;
+    margin-right: 10px;
+}
+.inner_lp_toc .scorm_item_highlight {   
+    border:1px solid #00aad4;
+    background:#00aad4;
+    font-weight:normal;
+    background-image:none;
+    margin-right: 0px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;  
 }
+
+.inner_lp_toc .scorm_item_highlight a {
+    color:#fff;
+    margin-right: 1px;
+    text-decoration: none;
+    font-weight: normal;
+}
+
+.inner_lp_toc .scorm_item_section {
+    border:1px solid #222;
+    background:#333;
+    font-weight:normal;
+    color:#fff;
+    text-shadow:0 -1px 1px #000;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#555),to(#333));
+    background-image:-webkit-linear-gradient(top,#555,#333);
+    background-image:-moz-linear-gradient(top,#555,#333);
+    background-image:-ms-linear-gradient(top,#555,#333);
+    background-image:-o-linear-gradient(top,#555,#333);
+    background-image:linear-gradient(top,#555,#333);
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;  
+    
+}
+
+.inner_lp_toc .scorm_item {
+    font-size: 16px;
+    margin-left: 10px;
+    margin-right:10px;
+    text-decoration: none;
+    border-color: rgba(255, 255, 255, 0.3);  
+}
+
 .inner_lp_toc .scorm_item_1 {
-	font-size: 11px;
-	margin-right: 1px;
-	padding-bottom: 2px;
-	text-decoration: none;
-	font-weight: normal;
-	background:#ddd;
+    border-bottom: 1px solid #CCCCCC;
+    background:#eee;
+    font-weight:bold;
+    color:#444;
+    text-shadow:0 1px 1px #f6f6f6;
+    background-image:none;
+    
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+    /* background:#FDFDFD; */   
 }
-.inner_lp_toc .scorm_item_2 {
-	font-size: 11px;
-	margin-right: 1px;
-	padding-bottom: 2px;
-	text-decoration: none;
-	font-weight: normal;
-	background:#eee;
+
+.inner_lp_toc .scorm_item_2 {    
+    background-image:none;
+    border-bottom: 1px solid #CCCCCC;
+    color: #444444;
+    font-weight: normal;
+    margin-right: 1px;  
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
 }
+
 .inner_lp_toc .scorm_title {
-	font-weight: bold;
-	background:#ccc;
-	font-size: 12px;
-	color: #444;
+    font-weight: bold;
+    background:#ccc;
+    font-size: 14px;
+    color: #444;
 }
 .inner_lp_toc .scorm_title_text {
-	margin-left: 10px;
+    margin-left: 10px;
 }
 .inner_lp_toc .scorm_status_img {
-	margin:0px;
-	margin-left: -10px;
-	width:10px;
+    margin:0px;
+    margin-left: -10px;
+    width:10px;
 }
 .lp_navigation {
-	overflow: auto;
-	background-color: white;
-	height: 44px;
-	width:180px;
-	padding-top: 4px;
-	padding-bottom:0px;
-	border: none;
-	margin-top: -18px;
-	border-top: 1px dotted black;
-	border-bottom: 1px dotted black;
+    overflow: auto;
+    background-color: white;
+    height: 44px;
+    width:180px;
+    padding-top: 4px;
+    padding-bottom:0px;
+    border: none;
+    margin-top: -18px;
+    border-top: 1px dotted black;
+    border-bottom: 1px dotted black;
 }
 .lp_navigation_elem {
-	padding-left: 15px;
-	padding-top: 0px;
+    padding-left: 15px;
+    padding-top: 0px;
 }
 /*.scormpage .menu */
 .lp_navigation_elem .progresstext {
-	margin-top: -20px;
-	margin-left: 40%;
-//em  font-size: normal;
+    margin-top: -20px;
 }
 /*.scormpage .menu */
 .lp_navigation_elem .buttons {
-	margin-left: 0px;
-	margin-right: 0em;
-	margin-top: 0.4em;
+    margin-left: 0px;
+    margin-right: 0em;
+    margin-top: 0.4em;
 }
 .scormpage .menu .notification {
-	background-color: white;
-	height: 50px;
+    background-color: white;
+    height: 50px;
 }
 .scormpage .menu .notification .message {
-	background-color: white;
-	height: 50px;
-	width: 180px;
-	border: none;
+    background-color: white;
+    height: 50px;
+    width: 180px;
+    border: none;
 }
 .scormpage .content {
-	/*float: left;
-	width: 60%;*/
-	margin-top: 0px;
-	padding-top: 0px;
-	padding-left: 180px;
-	background-color: white;
+    /*float: left;
+    width: 60%;*/
+    margin-top: 0px;
+    padding-top: 0px;
+    padding-left: 180px;
+    background-color: white;
 }
 .iframe {
-	border: 0px solid black;
-	height: 580px;
-	width: 95%;
-	margin: 0px;
-	padding-right: 0px;
-	overflow: auto;
-	vertical-align: top;
+    border: 0px solid black;
+    height: 100%;
+    width: 95%;
+    margin: 0px;
+    padding-right: 0px;
+    overflow: auto;
+    vertical-align: top;
 }
 .scormpage .footer {
-	clear: both;
+    clear: both;
+}
+#image_preview {
+    padding-left: 17px;
+}
+#msg_div_id {
+    padding-left: 17px;
+    padding-top: 4px;
+}
+
+
+
+#learning_path_breadcrumb_zone .breadcrumb{
+    background-image: none;
+    background-color: #2e75a3;
+    color: #fff;
+    text-transform: capitalize;
+}
+#learning_path_breadcrumb_zone .breadcrumb a{
+    color: #FFF;
+}
+#learning_path_breadcrumb_zone .breadcrumb a:hover{
+    text-decoration: underline;
+}
+#scorm_title {
+    font-weight: bold;
+    background:none;
+    font-size: 20px;
+    background-image: none;
+    color: #0088aa;
+    padding-top: 5px;
+    padding-bottom: 15px;
+}
+#learning_path_main #control {
+  opacity: 1;
+}
+.buttons a img:hover{
+opacity: 0.7;
+}
+#author_image{
+    background-color: #d7eef4;
+    -webkit-border-radius: 10px;
+    -moz-border-radius: 10px;
+    border-radius: 10px;
+    border: 1px solid  #b4cbff;
+    margin-top: 10px;
+}
+#author_icon img{
+    background-color: #fff;
+    padding: 5px;
+    -webkit-border-radius: 10px;
+    -moz-border-radius: 10px;
+    border-radius: 10px;
+}
+#author_image .progresstext{
+    font-size: 20px;
+    color: #0088aa;
+    font-weight: bold;
+}
+#learning_path_left_zone #header {
+  font-size: 14px;
+  margin-top: 10px;
+}
+#learning_path_left_zone .no-border{
+    background: none;
+    color: #2e75a3;
+    font-weight: normal;
+}
+.progress {
+  height: 18px;
+  margin-bottom: 18px;
+  overflow: hidden;
+  background-color: #f7f7f7;
+  background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9);
+  background-image: -ms-linear-gradient(top, #f5f5f5, #f9f9f9);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));
+  background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9);
+  background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9);
+  background-image: linear-gradient(top, #f5f5f5, #f9f9f9);
+  background-repeat: repeat-x;
+  -webkit-border-radius: 4px;
+     -moz-border-radius: 4px;
+          border-radius: 4px;
+  filter: progid:dximagetransform.microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#f9f9f9', GradientType=0);
+  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
+     -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
+          box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
+}
+.progress-striped .bar {
+  background-color: #149BDF;
+  background-size: 40px 40px;
+  background-image: none;
 }
-.preview_image {
-	padding-left: 17px;
+
+/*STYLES PROCESS LESSION*/
+.inner_lp_toc .scrom_completed {
+    
+    background-image: url("images/blue_arrow.png") !important;
+    background-position: 250px center !important;
+    background-repeat: no-repeat;
 }
-.scorm_title_text {
-	margin-left: 10px;
-	font-weight: bold;
-	background:#ccc;
-	font-size: 14px;
-	color: #444;
-	width: 89%;
-	padding: 1px 5px 3px 8px;
+
+.inner_lp_toc .scorm_item_highlight {
+    background-color: #00aad4;
+    background-image: url("images/white_arrow.png") !important;
+    background-position: 250px center !important;
+    background-repeat: no-repeat;
+    border: 1px solid #00aad4;
 }
+
+
+.inner_lp_toc .scorm_item_1 {
+  background-color: #d7eef4;
+  background-image: none;
+  border-bottom-color: #CCCCCC;
+  border-bottom-style: solid;
+  border-bottom-width: 1px;
+  color: #444444;
+  font-weight: normal;
+  margin-right: 1px;
+  padding-bottom: 10px;
+  padding-left: 0;
+  padding-right: 0;
+  padding-top: 10px;
+  text-shadow: 0 1px 1px #F6F6F6;
+}
+#learning_path_main #control {
+  background-image: none;
+  background-color: #d7eef4;
+  bottom: 0;
+  height: 34px;
+  margin-bottom: auto;
+  margin-left: auto;
+  margin-right: auto;
+  margin-top: auto;
+  padding-bottom: 8px;
+  padding-left: 0;
+  padding-right: 0;
+  padding-top: 8px;
+  position: absolute;
+  text-align: center;
+  width: 100%;
+}

+ 15 - 20
main/css/academica/scormfs.css

@@ -5,39 +5,30 @@
 	padding: 0px;
 	font-size: small;
 	position: absolute;
-	background-color: white;/*
-	filter:alpha(opacity=50);
-	opacity: 0.50;
-	-moz-border-radius: 25px;
-	margin-right: 5%;
-	margin-left: 75%;
-	margin-top: 10px;
-*/
+	background-color: white;
 }
 .scormpage .menu .lp_nav {
 	height: 50px;
 	width: 160px;
 	padding-top: 4px;
 	padding-bottom:0px;
-	/*
+	/*	
 	margin-left: 10px;
 	margin-right: 10px;
 */
 	margin-top: 0px;
 }
 .lp_navigation_elem {
-	padding-top: 2px;
-	position: absolute;
-	left: 50%;
-	margin-left: -70px;
+	padding-left: 15px;
+	padding-top: 0px;
 }
+/*.scormpage .menu */
 .lp_navigation_elem .progresstext {
-	margin-top: -12px;
-	margin-left: 4em;
 	font-size: smaller;
 }
+/*.scormpage .menu */
 .lp_navigation_elem .buttons {
-	margin-left: 1em;
+	margin-left: 5px;
 	margin-right: 0em;
 	margin-top: 0.4em;
 }
@@ -80,8 +71,12 @@
 .scormpage .footer {
 	clear: both;
 }
-.preview_image {
-	text-align: right;
-	margin-right: 5px;
-	padding-left: 15px;
+#image_preview {
+	padding-left: 17px;
+}
+#author_name {
+	padding-left: 5px;
+	padding-top: 5px;
+	font-size: 11px;
+	color:#888;
 }

+ 822 - 1832
main/css/baby_orange/default.css

@@ -1,1950 +1,940 @@
 /*****************************************************
- *  MAIN - BABY     	                             *
+ *  MAIN  - CHAMILO CSS
  *****************************************************/
-/* Adding default generic style for non chamilo_X themes */
-@import url('../base.css');
 
-/* Redefining html styles */
-body {
-	/* hack ignored by non-IE to enable ie to support :hover on button */        
-    behavior:url("/main/css/csshover3.htc");
-	font-family: arial, verdana, helvetica, sans-serif;
-	font-size: 12px;
-	color: #000;
-	background-color: #fff;
-	margin: 0;
-	padding: 0;
-}
-img {
-	border: none;
-}
-a {
-	font-family:Arial, Helvetica, sans-serif;
-	font-weight: bold;
-	text-decoration: none;
-}
+/* Adding default style for the chamilo_X themes */
+@import url('../base_chamilo.css');
+/* the following for regular <a> elements */
 a {
-	color: #317100;
+    text-decoration: none;
+    color :#6E6E6E;
 }
 a:visited {
-	
+    text-decoration: none;    
 }
 a:hover {
-	color: #683000;
+    text-decoration: none;
+    color: #FE9A2E;
 }
 a:active {
+    text-decoration: none;
 }
-
-#my_courses {
-	float: right;
-	font-weight: bold;
+.navbar .nav > li > a {
+    float: none;
+    line-height: 24px;
+    padding-bottom: 13px;
+    padding-right: 10px;
+    padding-top: 13px;
+    color: #FFFFFF;
+    text-shadow: none;
 }
-
-
-/* The tool shortcuts */
-#toolshortcuts {
-	text-align: right;
-	clear: right;
-	margin-left: auto;
-	margin-right: auto;
-	width: 99%
+.subnav .navbar-inner {
+    background: #F9F9F9;
+    border: 1px solid #E1E1E0;
+    margin-bottom: 5px;
 }
 
-/* footer styles */
-
-footer {
-	background-color: #e26200;
-	background-image: url(images/bg.jpg);
-	background-repeat:repeat-x;
-	color: #F7D77E;
-	font-weight:bold;
-	min-height: 100px;		
-	width: 100%;	
+.subnav .nav > li > a {
+    border-left: none;
+    border-right: none;
+    color: #666;
+    font-weight: normal;
+    font-size: 13px;
+    box-shadow: 1px 1px #EDEDED !important;
 }
-.push {
-	height: 9em; /* Very important */
+.subnav .nav > li > a:hover{
+  background: #3D3D3D;
+  color: #FFFFFF;
+  line-height: 22px;
 }
 
-#footer a {
-	color: #fff;
-	font-weight:normal;
+.subnav .nav > #current > a,
+.subnav .nav > #current > a:hover {  
+    color: #fff;
+    background-color: #EC5923;
+    border: 1px solid #EC5923;
+    box-shadow:0 1px 1px rgba(0, 0, 0, 0.15) inset;
+    line-height: 22px;
 }
 
-
-/* main styles */
-#main {
-	padding-left: 30px;
-	position: relative;
-	min-height: 320px;
-	padding-left: 20px;
-	padding-right: 15px;
-	padding-bottom: 5px;
+.subnav li a {
+    color:#fff;
 }
-
-/*
------------------------------------------------------------------------------
-Side-Menu Slider (JQuery) see banner.inc.php
------------------------------------------------------------------------------
-*/
-ul#navigation {
-    position: fixed;
-    margin: 0px;
-    padding: 0px;
-    top: 10px;
-    right: -10px;
-    list-style: none;
-    z-index:9999;
+/*#main .nav .dropdown .dropdown-toggle{
 }
+#main .nav .dropdown .dropdown-toggle:hover{
+    margin-top: 0;
+*/
 
-ul#navigation li {
-    width: 73px;
+/* Green hover */
+.subnav .navbar-inner li a:hover {
+    color: #fff;
+    background-color: #3A4751;
+    border: none;
+    box-shadow:none;
+    line-height: 24px;
 }
-
-ul#navigation li a {
-    display: block;
-    margin-left: 1px;
-    width: 65px;
-    height: 60px;
-    background-color:#CFCFCF;
-    background-repeat:no-repeat;
-    background-position:center center;
-    border:1px solid #AFAFAF;
-    -moz-border-radius:10px 0px 0px 10px;
-    -webkit-border-bottom-right-radius: 10px;
-    -webkit-border-top-right-radius: 10x;
-    -khtml-border-bottom-right-radius: 10px;
-    -khtml-border-top-right-radius: 10px;
-    -moz-box-shadow: 0px 4px 3px #000;
-    opacity: 0.6;
-    filter:progid:DXImageTransform.Microsoft.Alpha(opacity=60);
-    -webkit-box-shadow: 0px 4px 3px #000;
+.well .nav-list > li > a:hover {
+  text-decoration: none;
+  background: none;
 }
-
-ul#navigation .help a {
-    -moz-border-radius:8px 0 0 8px;
-    -moz-box-shadow:0 2px 2px #000000;
-    background-color:#879DAA;
-    background-position:center center;
-    background-repeat:no-repeat;
-    border:1px solid #FFFFFF;
-    display:block;
-    height:44px;
-    margin-left:1px;
-    opacity:0.6;
-    width:65px;
-    padding: 6px 0 8px 6px;
+.sidebar-nav h4{
+    color: #037FB2;
+    padding-bottom: 3px;
+    padding-left: 15px;
+    padding-right: 15px;
+    padding-top: 3px;
 }
-
-
-ul#navigation .report a {
-    -moz-border-radius:8px 0 0 8px;
-    -moz-box-shadow:0 2px 2px #000000;
-    background-color:#8fd400;
-    background-position:center center;
-    background-repeat:no-repeat;
-    border:1px solid #FFFFFF;
-    display:block;
-    height:44px;
-    margin-left:1px;
-    opacity:0.6;
-    width:65px;
-    padding: 6px 0 8px 6px;
+.dropdown .dropdown-menu li a:hover {
+    -webkit-border-radius: 0;
+    -moz-border-radius: 0;
+    border-radius: 0;
 }
-
-
-ul#navigation .student a {
-    -moz-border-radius:8px 0 0 8px;
-    -moz-box-shadow:0 2px 2px #000000;
-    background-color:#b27651 ;
-    background-position:center center;
-    background-repeat:no-repeat;
-    border:1px solid #FFFFFF;
-    display:block;
-    height:44px;
-    margin-left:1px;
-    opacity:0.6;
-    width:65px;
-        padding-bottom: 8px;
+#logout_button{
+  margin-top: 4px;
+  border: none;
 }
+#logout_button:hover{
+  margin-top: 4px;
+  background: none;
+  box-shadow: none;
 
-
-ul#navigation .user-online a {
-    -moz-border-radius:8px 0 0 8px;
-    -moz-box-shadow:0 2px 2px #000000;
-    background-color:#ccbc67 ;
-    background-position:center center;
-    background-repeat:no-repeat;
-    border:1px solid #FFFFFF;
-    display:block;
-    height:44px;
-    margin-left:1px;
-    opacity:0.6;
-    width:65px;
-    padding: 6px 0 8px 6px;
 }
-
-/* Other colors for other tabs in the earth tones */
-    ul#navigation .user-connect a {
-    -moz-border-radius:8px 0 0 8px;
-    -moz-box-shadow:0 2px 2px #000000;
-    background-color:#fac97a ;
-    background-position:center center;
-    background-repeat:no-repeat;
-    border:1px solid #FFFFFF;
-    display:block;
-    height:44px;
-    margin-left:1px;
-    opacity:0.6;
-    width:65px;
-    padding: 6px 0 8px 6px;
+/*****************************************************
+ *  STYLE THEME CHAMILO                              *
+ *****************************************************/
+ /*.page-section{
+    background:url(images/bg-header.jpg) repeat-x;
+    margin-top: -5px;
+ }*/
+.navbar-inner{
+  background: #ec5923; /* Old browsers */
+  background: -moz-linear-gradient(top, #ec5923 0%, #ec5923 100%); /* FF3.6+ */
+  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ec5923), color-stop(100%,#ec5923)); /* Chrome,Safari4+ */
+  background: -webkit-linear-gradient(top, #ec5923 0%,#ec5923 100%); /* Chrome10+,Safari5.1+ */
+  background: -o-linear-gradient(top, #ec5923 0%,#ec5923 100%); /* Opera 11.10+ */
+  background: -ms-linear-gradient(top, #ec5923 0%,#ec5923 100%); /* IE10+ */
+  background: linear-gradient(to bottom, #ec5923 0%,#ec5923 100%); /* W3C */
+  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ec5923', endColorstr='#ec5923',GradientType=0 ); /* IE6-9 */
+
+}
+.dropdown-menu li > a:hover, .dropdown-menu .active > a, .dropdown-menu .active > a:hover {
+  background-color: #3A4751;
+  color: #FFFFFF;
+}
+.navbar-search {
+  margin-bottom: 0;
+  margin-top: 11px;
+  position: relative;
+}
+.navbar-search .search-query {
+  background:#FFFFFF;
+  color: #666;
+  border: 1px solid #ffffff;
+}
+.navbar .nav .active > a, .navbar .nav .active > a:hover {
+  background:none;
+  color: #FFFFFF;
+}
+.welcome-mascot{
+  background: url(images/chamilo-welcome.png) no-repeat right 0;
+  padding-right: 200px;
+  padding-bottom: 2em;
+  padding-top: 2em;
+}
+
+.nav-list > li > a {
+    font-size: 14px;
+    padding-bottom: 6px;
+   /* padding-left: 15px;
+    padding-right: 15px;*/
+    padding-top: 6px;
+}
+.controls .btn{
+    background:#EC5923;
+    color: #ffffff;
+    border:1px solid rgba(0, 0, 0, 0.15);
+    padding: 5px 25px;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.17);
+}
+.controls .btn:hover{
+    background: #EC5923; /* Old browsers */
+    color: #FFFFFF;
+    border:1px solid rgba(0, 0, 0, 0.15);
+    padding: 5px 25px;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.17);
+
+}
+.form-actions {
+  background:transparent;
+}
+.breadcrumb {
+  margin-bottom: 0;
+  background: #ffffff; /* Old browsers */
+  background: -moz-linear-gradient(top, #ffffff 0%, #f6f6f6 47%, #ededed 100%); /* FF3.6+ */
+  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(47%,#f6f6f6), color-stop(100%,#ededed)); /* Chrome,Safari4+ */
+  background: -webkit-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* Chrome10+,Safari5.1+ */
+  background: -o-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* Opera 11.10+ */
+  background: -ms-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* IE10+ */
+  background: linear-gradient(to bottom, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* W3C */
+  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ededed',GradientType=0 ); /* IE6-9 */
+  padding-top: 5px;
+  padding-bottom: 5px;
+  border: 1px solid #E1E1E0;
+  box-shadow: none;
+  color: #666;  
+}
+.breadcrumb a{
+  color: #666;
+  font-size: 13px;
+  line-height: 30px;
+  text-transform: none;
+}
+
+.breadcrumb li{
+    font-size: 14px;
+    text-shadow: none;
+}
+.breadcrumb a.btn-mini{
+    font-size: 12px;
+    line-height: 17px;
+    text-transform: none;
+    color: #FFFFFF;
+}
+.breadcrumb a.btn-success {
+  background: #f68a7a; /* Old browsers */
+background: -moz-linear-gradient(top, #f68a7a 0%, #f26954 100%); /* FF3.6+ */
+background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f68a7a), color-stop(100%,#f26954)); /* Chrome,Safari4+ */
+background: -webkit-linear-gradient(top, #f68a7a 0%,#f26954 100%); /* Chrome10+,Safari5.1+ */
+background: -o-linear-gradient(top, #f68a7a 0%,#f26954 100%); /* Opera 11.10+ */
+background: -ms-linear-gradient(top, #f68a7a 0%,#f26954 100%); /* IE10+ */
+background: linear-gradient(to bottom, #f68a7a 0%,#f26954 100%); /* W3C */
+filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f68a7a', endColorstr='#f26954',GradientType=0 ); /* IE6-9 */
+  border: 1px solid #FD6600;
+  color: #FFFFFF;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.17);
+}
+.breadcrumb a.btn-success:hover{
+  background: #f68a7a; /* Old browsers */
+background: -moz-linear-gradient(top, #f68a7a 0%, #ef7f70 100%); /* FF3.6+ */
+background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f68a7a), color-stop(100%,#ef7f70)); /* Chrome,Safari4+ */
+background: -webkit-linear-gradient(top, #f68a7a 0%,#ef7f70 100%); /* Chrome10+,Safari5.1+ */
+background: -o-linear-gradient(top, #f68a7a 0%,#ef7f70 100%); /* Opera 11.10+ */
+background: -ms-linear-gradient(top, #f68a7a 0%,#ef7f70 100%); /* IE10+ */
+background: linear-gradient(to bottom, #f68a7a 0%,#ef7f70 100%); /* W3C */
+filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f68a7a', endColorstr='#ef7f70',GradientType=0 ); /* IE6-9 */
+text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.17);
+}
+.btn{
+  display: inline-block;
+  padding: 3px 25px;
+  margin-bottom: 0;
+  font-size: 14px;
+  font-weight: normal;
+  line-height: 1.428571429;
+  text-align: center;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.17);
+  cursor: pointer;
+  color: #FFFFFF;
+  background: #3D3D3D; /* Old browsers */
+  border:1px solid rgba(0, 0, 0, 0.15);
+}
+.btn:hover{
+  background: #4E5B65; /* Old browsers */
+  color: #ffffff;
+  text-decoration: none;
+}
+.btn-primary{
+    background:#EC5923;
+    color: #ffffff;
+    border:1px solid rgba(0, 0, 0, 0.15);
+    padding: 3px 25px;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.17);
+}
+.btn-primary:hover{
+    background: #EA4E15; /* Old browsers */
+    color: #FFFFFF;
+    border:1px solid rgba(0, 0, 0, 0.15);
+    
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.17);
+}
+
+/* styles for the star rater */
+.star-rating{
+    list-style:none;
+    margin: 0px;
+    padding:0px;
+    width: 125px;
+    height: 25px;
+    position: relative;
+    overflow:hidden;
+    background: url(images/start-level.png) top left repeat-x;
 }
-
-ul#navigation .student-connect a {
-    -moz-border-radius:8px 0 0 8px;
-    -moz-box-shadow:0 2px 2px #000000;
-    background-color:#d0d5d1 ;
-    background-position:center center;
-    background-repeat:no-repeat;
-    border:1px solid #FFFFFF;
+.star-rating li{
+    padding:0px;
+    margin:0px;
+    width:25px;
+    height:25px;
+    float: left;
+}
+.star-rating li a{
     display:block;
-    height:44px;
-    margin-left:1px;
-    opacity:0.6;
-    width:65px;
-    padding: 6px 0 8px 6px;
+    width:25px;
+    height: 25px;
+    line-height:25px;
+    text-decoration: none;
+    text-indent: -9000px;
+    z-index: 20;
+    position: absolute;
+    padding: 0px;
+    overflow:hidden;
 }
-
-
-/* my courses styles */
-
-.maincontent {
-	/* float: left; */
-	width: 71%;
-	min-height: 333px;
-	margin-top:0;
-	float: right;
-	clear: right;
-}
-.coursestatusicons {
-	border: 0px solid #000;
-	float: left;
-	padding-right: 5px;
-	width: auto;
-}
-.courseslist {
-}
-.courses {
-	list-style-type: none;
-	margin-bottom: 5px;
-}
-.courses a {
-	text-decoration:underline;
-}
-.user_course_category {
-	background: transparent url("images/thindivider.jpg") no-repeat left;
-	background-color: #fff;
-	padding-top: 10px;
-	font-weight: bold;
-	color: #666;
-	list-style-type: none;
-	margin: 5px;
-	padding: 5px;
-	padding-left: 130px;
+.star-rating li a:hover{
+    background: url(images/start-level.png) left bottom;
+    z-index: 2;
+    left: 0px;
+    border:none;
 }
-
-.note {
-	width: auto;
-	margin: 24px 6px 0 6px;
-	padding: 3px;
-	border: 2px outset;
-	border-color:#4171b5;
-}
-/* form styles */
-.form {
-	width: 75%;
-	float: left;
-}
-form div.row {
-	clear: both;
-	padding-top: 5px;
-}
-.form_header {
-	white-space: nowrap;
-	padding: 2px;
-	background-color: #f0f0f0;
-	border: 1px solid #bbb;
-	font-weight: bold;
+.star-rating a.one-star{
+    left: 0px;
 }
-
-form span.form_required {
-	color: #f00;
+.star-rating a.one-star:hover{
+    width:25px;
 }
-form span.form_error {
-	color: #f00;
-	font-size: x-small;
-	margin: 2px;
+.star-rating a.two-stars{
+    left:25px;
 }
-
-/* New training */
-.bottom-link {
-	background-image:url(images/button_back.jpg);
+.star-rating a.two-stars:hover{
+    width: 50px;
 }
-
-/* other styles */
-.clear {
-	clear: both;
-	line-height: 0px;
-	height: 0;
-}
-/* actions */
-.actions_lp {
-	background-color:#FDDEAA;
-	border-bottom:1px solid #EE4C03;
-	border-top:1px solid #EE4C03;
-	height:29px;	
-	margin-bottom: 1px;		
-}
-.actions_lp img {
-	vertical-align:middle;
-}
-.actions_lp span {
-	margin-right: 10px;
-	vertical-align:middle;
-}
-.actions_lp form {
-	margin-right: 10px;
-	vertical-align:middle;
-}
-.actions {
-	margin: 5px 0px; padding-top: 1px; 
-    border-top-width: 1px; top: 10px; right: 10px; 
-    bottom: 0px; left: 10px; 
-    padding-bottom: 1px;
-	background-color:#FDDEAA;
-	border-bottom:1px solid #EE4C03;
-	border-top:1px solid #EE4C03;
-	/*height:35px;*/
-	padding:2px;
-	margin-bottom: 5px;
-	vertical-align:middle;
-}
-.actions img {
-	/*display:inline-block;*/
-	border: none;
-	text-decoration: none;
-	/*background-color: #FDDEAA;*/
-	padding-right: 5px;
-	vertical-align:middle;
-}
-.actions a {
-	display:inline-block;
-	margin-right: 10px;
-	vertical-align:middle;
-}
-.actions span {
-	margin-right: 10px;
-	vertical-align:middle;
-}
-.actions form {
-	margin-right: 10px;
-	vertical-align:middle;
-}
-/* big actions */
-.actionsbig {
-	background:#F8F8F8;
-	border-bottom:1px solid #4171b5;
-	border-top:1px solid #4171b5;
-	background-color:#efefef;
-	padding:2px;
-	margin-bottom: 5px;
-	vertical-align:middle;
-	float:left;
-	width:100%;
-}
-.actionsbig a {
-	float:left;
-	padding-left:12px;
-	padding-right:12px;
-	text-align:center;
-}
-.content_table {
-	padding:2px;
-	margin-bottom: 5px;
-	vertical-align:middle;
-	float:left;
-	width:100%;
+.star-rating a.three-stars{
+    left: 50px;
 }
-
-.actions img {
-	vertical-align:middle;
-}
-.actions a {
-	margin-right: 10px;
-	vertical-align:middle;
-}
-.actions-title {
-	background:#efefef;
-	border-bottom:1px dotted #999999;
-	border-top:1px dotted #999999;
-	/*height:35px;*/
-    padding:4px;
-	margin-bottom: 5px;
-	font-size:14px;
-	font-weight:bolder;
-	/*background:url(images/actions.jpg) repeat-x;*/
-    vertical-align:middle;
-}
-.actions-message {
-	white-space: nowrap;
-	padding: 2px;
-	background-color: #f0f0f0;
-	border: 1px solid #bbb;
-}
-/* styles for the profile page */
-.profile_image {
-	float: right;
-	margin-right: 20px;
-}
-.profile_form {
-	float: left;
-	width: 75%;
-}
-/* course introduction */
-#courseintrocenter {
-	position: relative;
-	width: 80%;
-	margin: 25px auto 10px;
-}
-#courseintro_iconscenter {
-	position: relative;
-	width: 80%;
-	margin: 0px auto 10px;
-}
-#courseintroleft {
-	position: relative;
-	width: 80%;
-	margin-bottom: 5px;
-}
-#courseintro_iconsleft {
-	position: relative;
-	width: 80%;
+.star-rating a.three-stars:hover{
+    width: 75px;
 }
-
-/* Login form */
-#formLogin div {
-	margin-bottom: 3px;
-}
-#formLogin div input[type=submit] {
-	width: 109px;
-}
-/* normal table*/
-.normal_table {
-	margin: 3px;
-	border-collapse: collapse;
-	width: 98%;
-	padding: 5px;
-}
-/* Data table */
-.data_table {
-	margin: 3px;
-	border-collapse: collapse;
-	width: 100%;
-	padding: 5px;
-}
-.data_table th {
-	text-transform: capitalize;
-	padding: .2em;
-	background: #FDDEAA url('images/headertables.jpg') repeat-x;
-	color: #3c471c;
-	border-right: 1px solid #fff;
-}
-.data_table th a {
-	text-decoration:none;
-}
-.data_table th a:hover {
-}
-.data_table tr.row_odd {
-	border-right: 1px solid #fff;
-	background: #ffea9f;
-	padding: .2em;
-	color: #00122B;
-	margin: 0;
-}
-.data_table tr.row_odd:hover, .data_table tr.row_even:hover {
-	background-color: #eebb03;
-}
-.data_table tr.row_even {
-	border-right: 1px solid #fff;
-	background: #ffdc9f;
-	padding: .2em;
-	color: #00122B;
-	margin: 0;
-}
-.data_table td {
-	padding: 5px;
-	vertical-align: top;
-	border-bottom: 2px solid #fff;
-	border-right: 2px solid #fff;
-	border-left: 2px solid #fff;
+.star-rating a.four-stars{
+    left: 75px;
 }
-
-.data_table_pagination {
-	width:100%;
-	margin-top: 8px;	
+.star-rating a.four-stars:hover{
+    width: 100px;
 }
-
-/*  sections in the page */
-.sectiontitle {
-	background: url('images/headertables.jpg') repeat-x top center;
-	background-color: #ffb963;
-	border: 1px solid #EE4C03;
-	font-weight: bold;
-	color: #EE4C03;
-	list-style-type: none;
-	margin: 5px;
-	padding: 5px;
-}
-.sectioncomment {
-	color: #000000;
-	margin: 5px;
-	padding: 5px;
-}
-.sectionvalue {
-	list-style-type: none;
-	margin: 5px;
-	padding: 5px;
-}
-/* invisible styles */
-a.invisible {
-	color: #999999;
-}
-a.invisible:visited {
-	color: #999999;
-}
-a.invisible:active {
-	color: #999999;
-}
-a.invisible:hover {
-	color: #999999;
-}
-/* Platform Administration */
-div.admin_section {
-	width: 40%;
-	float: left;
-	margin: 10px 20px;
-	border: 1px solid #EE4C03;
-	min-height:200px;
-}
-div.admin_section h4 {
-	background-color: #FDDEAA;
-	font-weight: bold;
-	list-style-type: none;
-	margin: 0px;
-	padding: 5px;
-}
-/* Report section */
-div.report_section {
-	width: 40%;
-	float: left;
-	margin: 10px 20px;
-	border: 1px solid #EE4C03;
-}
-div.report_section h4 {
-	background-color: #FDDEAA;
-	font-weight: bold;
-	list-style-type: none;
-	margin: 0px;
-	padding: 5px;
-}
-/* course homepage */
-.courseadminview, .platformadminview {
-	position: relative;
-	width: 80%;
-	margin: 25px auto 10px;
-	padding: 10px;
-	border: 1px solid #EE4C03;
-}
-.courseadminview img, .platformadminview img {
-	display:inline-block;
-	border: none;
-	text-decoration: none;
-	/*background-color: #fff;*/
-	padding-right: 5px;
-	vertical-align:middle;
-}
-.viewcaption {
-	position: relative;
-	top: -20px;
-	font-weight: bold;
-	background-color: #fff;
-	padding: 0 4px;
-}
-.tool-icon {
-	margin-bottom: -3px;
-}
-/* learning path */
-table.lp_build {
-	height:400px;
-	width:100%;
-}
-table.lp_build td {
-	vertical-align:top;
-}
-table.lp_build td.tree {
-	border-right:1px solid #999999;
-	width:240px;
-}
-table.lp_build td.workspace {
-	padding: 0px;
-	padding-left:5px;
-	width:auto;
-}
-table.lp_overview {
-	width:100%;
-}
-table.lp_overview td {
-	border-bottom:1px solid #999999;
-	border-top:1px solid #999999;
-	height:20px;
-	padding:3px;
-	vertical-align:middle;
-	width:auto;
-}
-table.lp_overview td.title {
-	width:200px;
-}
-table.lp_overview td.actions {
-	text-align:center;
-	width:100px;
-}
-table.lp_overview td.move {
-	text-align:center;
-	width:50px;
-}
-table.lp_overview th {
-	background:#FFFFFF;
-	padding-left:3px;
-	text-align:center;
-}
-table.lp_overview tr {
-	background:#F8F8F8;
-}
-table.lp_overview tr:hover {
-	background:#E5EDF9;
-}
-table.lp_overview img {
-	margin-left:3px;
-}
-table.lp_prerequisites th {
-	background:#F8F8F8;
-	border-bottom:1px solid #999999;
-	border-top:1px solid #999999;
-}
-.lp_mediaplayer {
-	float: right;
-	padding-top: 3px;
-	margin-right: 5px;
-}
-div.lp_manipulate {
-	background:#F8F8F8;
-	border-bottom:1px dotted #999999;
-	margin-bottom:0px;
-	padding:3px 0 3px 10px;
-}
-div.lp_manipulate a {
-	padding-right:10px;
-}
-div.lp_resource_header {
-	background:#F0F0F0;
-	border:1px solid #999999;
-	font-weight:bold;
-	padding:10px;
-	width:350px;
-	cursor:pointer;
-	margin-top: -1px;
-}
-div.lp_resource_elements {
-	background:#FAFAFA;
-	border:1px solid #999999;
-	display:none;
-	padding:5px 10px;
-	width:350px;
-	margin-top: -1px;
-}
-.learnpath_chapter_form {
-	width: 300px;
-}
-.learnpath_item_form {
-	width: 300px;
-}
-#learnpath_preview_frame {
-	margin-top: 5px;
-	border:1px solid #CCCCCC;
-	height:490px;
-	width:95%;
-}
-/* exercices styles */
-.exercice_form {
-	width: 300px;
+.star-rating a.five-stars{
+    left: 100px;
 }
-
-span.checkbox {
-	width: 19px;
-	height: 25px;
-	padding: 0 5px 0 0;
-	background: url(images/checkbox.gif) no-repeat;
-	display: block;
-	clear: left;
-	float: left;
-}
-span.radio {
-	width: 19px;
-	height: 25px;
-	padding: 0 5px 0 0;
-	background: url(images/radio.gif) no-repeat;
-	display: block;
-	clear: left;
-	float: left;
-}
-/* forum styles */
-.forum_header {
-	background: transparent url('images/line.jpg') repeat-x bottom center;
-	font-weight: bold;
-}
-.forum_threadheader {
-	background: transparent url('images/line.jpg') repeat-x bottom center;
-	font-weight: bold;
-}
-.forum_message_left {
-	width: 150px;
-	vertical-align: top;
-	/*border-bottom: 1px solid #666666;*/
-	border-right: 1px solid #EE4C03;
-	background: url('images/bglogin.jpg') repeat-y top center;
-	background-color: #ebc41f;
-}
-.forum_message_post_title {
-	border-bottom: 1px solid #EE4C03;
-	font-weight: bold;
-	background-color: #FDDEAA;
-	height: 20px;
-	color: #EE4C03;
-}
-.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;
-}
-/* Survey styles */
-#survey_title {
-	background-color:#dcdcdc;
-	color:#000;
-	padding:2px;
-}
-#survey_subtitle {
-	background-color:#dcdcdc;
-	color:#000;
-	padding:2px;
-}
-.survey_content {
-	background-color:#EFEFEF;
-	color:#264269;
-	padding:5px;
-	border: 1px solid #999;
-}
-.survey_question_wrapper {
-	border: 1px solid #999;
-}
-.survey_question {
-	/* 264269 4271b5 E5EDF9 */
-	background-color:#f0f0f0;
-	color:#999;
-	padding:5px;/*border: 1px solid #264269;*/
-}
-.survey_question_options {
-	/* 264269 4271b5 E5EDF9 */
-	background-color:#FFF;
-	color:#000;
-	padding:5px;/*border: 1px solid #264269;*/
-}
-/* Blog */
-.blog_menu {
-	border-bottom: 1px dashed #dddddd;
-	border-right: 1px dashed #dddddd;
-	border-left: 1px dashed #dddddd;
-	padding: 10px;
-}
-.blogpost {
-	border: 1px solid #DDDDDD;
-	background-color: #ECECEC;
-	margin-bottom: 15px;
-	padding: 10px;
-}
-.blogpost_title {
-	display: block;
-	font-weight: bold;
-	padding-bottom: 5px;
-}
-.blogpost_date {
-	display: block;
-	font-weight: bold;
-	color: #333333;
-	padding-bottom: 10px;
-}
-.blogpost_info {
-	display: block;
-	color: #333333;
-	border-top: 1px solid #dddddd;
-	margin-top: 5px;
-}
-.blogpost_comment {
-	border-top: 1px dashed #dddddd;
-	border-right: 1px dashed #dddddd;
-	border-bottom: 1px dashed #dddddd;
-	border-left: 1px dashed #dddddd;
-	margin-bottom: 10px;
-	padding: 10px;
-	background-color: white;
-	z-index: -1;
-}
-.blogpost_comment_title {
-	display: block;
-	font-weight: bold;
-	color: #1657A9;
-	padding-bottom: 5px;
-}
-.blogpost_comment_date {
-	display: block;
-	font-size: 10px;
-	font-weight: bold;
-	color: #333333;
-	padding-bottom: 10px;
-}
-.blogpost_comment_info {
-	font-size: 10px;
-	display: block;
-	color: #333333;
-	border-top: 1px solid #dddddd;
-	margin-top: 10px;
-}
-.blogpost {
-	border: 1px solid #DDDDDD;
-	background-color: #ECECEC;
-	margin-bottom: 15px;
-	padding: 10px;
-}
-.comments {
-	border: 1px solid #dddddd;
-	margin-bottom: 10px;
-	margin-top: 10px;
-	padding: 10px;
-	background-color: #F4F4F4;
-	margin-left:50px;
-}
-/* tabbed menu */
-#tabbed_menu {
-	border: 1px solid #EE8003;
-	background: transparent url('images/dropbox.jpg') no-repeat top left;
-	width: 300px;
-	margin: 0 0 1em 0;
-}
-#tabbed_menu_tabs {
-	width: 90%;
-	margin: 15px .2em 0 .2em;
-	padding: 0;
-	list-style-type: none;
-}
-#tabbed_menu_tabs li {
-	padding: 0;
-	margin: 0 .8em;
-}
-/* system announcements */
-div.system_announcement {
-	border: 1px solid #EE8003;
-	min-height:20px; 
-}
-.system_announcement_title {
-	color: #794102;
+.star-rating a.five-stars:hover{
+    width: 125px;
 }
-.system_announcements {
-	background: transparent url('images/systemenouvelles.gif') no-repeat top left;
-	padding-top: 30px;
-	width: 50%;
-}
-.system_announcements h3 {
-	text-align: center;
-}
-.system_announcement {
-	background: #ffb963 url('images/headertables.jpg') repeat-x;
-	font: bold 100% arial, sans-serif, sans;
-}
-.system_announcement_content {
-	font: normal 100% 'Lucida Grande', verdana, Arial, sans-serif, sans;
-}
-#image_preview {
-	text-align:center;
-	padding-left: 17px;
-}
-.skip {
-	display: none;
-}
-/* Specific forms: profile,add course,advanced search,advanced course search,etc.. */
-#add_course, #profile, #advanced_course_search, #advanced_search, #category, #course_user_import, #export_users, #update_course, #user_add, #user_import {
-	/*border: 1px solid #EE4C03;
-	background: transparent url("images/headerform.jpg") no-repeat top left;
-	width: 550px;
-	position: relative;
-	padding: 60px 0 1em 0;*/
-}
-#advanced_search, #category, #course_user_import {
-/*	background: transparent url("images/headerform2.jpg") no-repeat top left;*/
-}
-#export_users, #update_course, #user_add, #user_import {
-/*	background: transparent url("images/headerform3.jpg") no-repeat top left;*/
-}
-/* Glossary tool */
-.glossary-term {
-	margin: 1em;
-	background-color: #ffe99b;
-	padding: 0.5em 0.5em 1.8em 0;
-	-moz-border-radius: 0.5em;
-}
-.glossary-term-title {
-	margin: 2em 0 1em 0.5em;
-	font-weight: bold;
-	font-size: 120%;
-}
-.glossary-term-desc {
-	margin-left: 1em;
-}
-.glossary-term-action-links {
-	float: right;
-}
-.glossary-term-edit-form {
-	margin: 1em;
-	background-color: #FFE4C4;
-	padding: 0.5em 0.5em 2em 0;
-	-moz-border-radius: 0.5em;
-}
-.glossary-term-edit-desc {
-	font-weight: bold;
-	font-size: 120%;
-}
-.glossary-term-edit-title {
-	font-weight: bold;
-	font-size: 120%;
-}
-.glossary-add-form {
-	font-weight: bold;
-	font-size: 120%;
-	margin: 1em;
-}
-.glossary-orderby-link {
-	float:right;
-	margin: 1em;
-}
-.glossary-msg-error {
-	color: #FF0000;
-	display :none;
-	font-weight: normal;
-	font-size: 80%;
-}
-/* Notebook */
-.notebook-add-form {
-	margin: 1em;
-	background-color: #c3d9ff;
-	padding: 1em 1em;
-}
-.notebook-add-desc-textarea {
-	background-color: #f2f5f8;
-	border-color: #ffe99b;
-	overflow: hidden;
-}
-.notebook-add-title-text {
-	background-color: #f2f5f8;
-	border-color: #ffe99b;
-}
-.notebook-edit-desc-textarea {
-	background-color: #e0ecff;
-	border-color: #ffe99b;
-	overflow: hidden;
-}
-.notebook-edit-title-text {
-	background-color: #e0ecff;
-	border-color: #ffe99b;
-}
-.notebook-msg-error {
-	color: #FF0000;
-	display :none;
-	background-color: #ffe99b;
-	width: 40%;
-}
-.notebook-list {
-	margin: 1em 1em 0em 1em;
-	background-color: #79b;
-	padding: 0.3em 0.3em;
-	-moz-border-radius: 0.5em;
-}
-.notebook-title-list {
-	color : #fff;
-	padding: 0.3em 0.3em;
-	font-weight: bold;
-	font-size: 120%;
-}
-.notebook-desc-list {
-	margin: 0em;
-	background-color: #f2f5f8;
-	padding: 0.5em 0.3em 2em 0.3em;
-	border: 1px solid #79b;
-}
-.notebook-term-action-links {
-	padding: 0.3em 0.3em;
-	width: 50%;
-	color : #fff;
-}
-.notebook-orderby-link {
-	text-align:right;
-	margin-right: 1em;
-}
-.notebook-search-title {
-	text-align:right;
-	margin: 1em;
-}
-.notebook-date-information {
-	color : #fff;
-	padding: 0.3em;
-	font-size: 120%;
-	font-weight: bold;
-}
-/*SESSIONS*/
-.sessions_list {
-	line-height: 20px;
-	margin-top: 20px;
-}
-.sessions_list_inactive {
-	line-height: 20px;
-}
-.session_box {
-	border: 1px solid #DCE5F3;
-	/* font-weight: bold; */
-	color: #666;
-	list-style-type: none;
-	margin:5px 5px 10px 5px;
-	padding: 5px;	
-	background-color:#FFF;	
-	-webkit-border-radius: 10px;
-	-moz-border-radius: 10px;
-	border-radius: 10px;
-}
-.sub_session_box {
-	 border: 1px solid #DCE5F3; 
-	/* font-weight: bold; */
-	color: #666;
-	list-style-type: none;
-	margin:5px 5px 10px 0px;
-	padding: 5px;	
-	background-color:#FFF;	
-	-webkit-border-radius: 10px;
-	-moz-border-radius: 10px;
-	border-radius: 10px;
-}
-.sub_session_box_title {
-	margin-bottom: 10px;
-	background-color:#F9F9F9;
-}
-.session_box_title {
-	margin-bottom: 10px;
-	background-color:#F9F9F9;
-}
-.session_course_item {
-	margin: 0px;
-	margin-bottom:20px;
-	font-size:135%;
-}
-.session_course_item .item_closed, .userportal-course-item-title .item_closed {
-     font-size:80%; 
-}
-.session_course_item .courses {
-	margin-bottom: 5px;
-	height:35px;
-}
-/*NAVIGATION MENU BAR*/
-
-
-.menucaption {
-	font-size: 12px;
-	font-weight: bold;
-	padding-left: 12px;
-}
-.menusection {
-	
-}
-.menusectioncaption {
-	position: relative;
-	top: -9px;
-	/* background-color: #E5EDF9; */
-	font-size: 12px;
-	padding: 0 8px 0 4px;
-}
-.menulist {
-	list-style: none;
-	margin: 0 0 12px 0;
-	padding: 0;
-}
-#centerwrap {
-	float: left;
-	width: 100%;
-	margin-right: -95%;/* this needs to be less than 100% for Moz/Mac which thinks
-         it's empty otherwise. The difference is made up by putting a
-         negative left margin on the left float:
-	   Note IE/Mac doesn't like this method ~ it wants the 100% so it can
-	   be fed in using IE only CSS below becasue IE/Win also works with the 100% method.
-	*/
-}
-#center {
-	margin: 0 190px 0 0;
-	padding: 10px 0 40px 0;
-	min-height: 300px;
-}
-#toolnav {
-	float:right;
-	overflow:hidden;
-	padding:0;
-	width:180px;
-}
-/* Hide from IE5-mac. Only IE-win sees this. \*/
-* html #toolnav {
-	margin-right: 0px;
-}
-* html #center {
-	height: 1%;
-	margin-left: 0;
-}
-/* End hide from IE5/mac */
-
-/*
------------------------------------------------------------------------------
-Menu Slide JQuery
------------------------------------------------------------------------------
-*/
-ul#navigation {
-	position: fixed;
-	margin: 0px;
-	padding: 0px;
-	top: 80px;
-	right: -10px;
-	list-style: none;
-	z-index:9999;
+.star-rating li.current-rating{
+    background: url(images/start-level.png) left center;
+    position: absolute;
+    height: 25px;
+    display: block;
+    text-indent: -9000px;
+    z-index: 1;
+}
+/*ICON INBOX*/
+.home-icon{
+  background:url(images/icon-chamilo.png) no-repeat 0 0;
+  background-size: 24px auto;
+  padding-left: 30px;
+}
+.home-icon:hover,.messages-icon:hover, .invitations-icon:hover,.shared-profile-icon:hover,.friends-icon:hover,
+.browse-groups-icon:hover ,.search-icon:hover ,.myfiles-icon:hover {
+  opacity: 0.8;
+}
+.messages-icon{
+  background:url(images/icon-chamilo.png) no-repeat 0 -29px;
+  background-size: 24px auto;
+  padding-left: 30px;
+}
+.invitations-icon{
+  background:url(images/icon-chamilo.png) no-repeat 0 -61px;
+  background-size: 24px auto;
+  padding-left: 30px;
+}
+.shared-profile-icon{
+  background:url(images/icon-chamilo.png) no-repeat 0 -96px;
+  background-size: 24px auto;
+  padding-left: 30px;
+}
+.friends-icon{
+  background:url(images/icon-chamilo.png) no-repeat 0 -130px;
+  background-size: 24px auto;
+  padding-left: 30px;
+}
+
+.browse-groups-icon{
+  background:url(images/icon-chamilo.png) no-repeat 0 -163px;
+  background-size: 24px auto;
+  padding-left: 30px;
+}
+
+.search-icon {
+  background:url(images/icon-chamilo.png) no-repeat 0 -198px;
+  background-size: 24px auto;
+  padding-left: 30px;
+}
+
+.myfiles-icon {
+  background:url(images/icon-chamilo.png) no-repeat 0 -229px;
+  background-size: 24px auto;
+  padding-left: 30px;
+}
+
+/* END ICON INBOX */
+.nav-list > .active > a, .nav-list > .active > a:hover {
+  color: #333333;
+  background: none;
+  text-shadow:none;
+}
+.social-menu .well .thumbnail{
+  border: none;
+  border-radius: none;
+  box-shadow: none;
+}
+.invitation_confirm .thumbnail{
+    border: 1px solid rgba(96, 165, 209, 0.1);
+    -webkit-border-radius: 10px;
+    -moz-border-radius: 10px;
+    border-radius: 10px;
+    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
+    display: block;
+    line-height: 1;
+    padding: 4px;
+    background-color: #EEF5FA;
 }
-
-ul#navigation li {
-	width: 73px;
+.invitation_confirm a.thumbnail:hover{
+    border-color: rgba(96, 165, 209, 0.1);
+    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
+    background-color: #FFFFFF;
 }
-
-ul#navigation li a {
-	display: block;
-	margin-left: 1px;
-	width: 65px;
-	height: 60px;
-	background-color:#CFCFCF;
-	background-repeat:no-repeat;
-	background-position:center center;
-	border:1px solid #AFAFAF;
-	-moz-border-radius:10px 0px 0px 10px;
-	-webkit-border-bottom-right-radius: 10px;
-	-webkit-border-top-right-radius: 10x;
-	-khtml-border-bottom-right-radius: 10px;
-	-khtml-border-top-right-radius: 10px;
-	-moz-box-shadow: 0px 4px 3px #000;
-	opacity: 0.6;
-    filter:progid:DXImageTransform.Microsoft.Alpha(opacity=60);
-	-webkit-box-shadow: 0px 4px 3px #000;
+.social-menu .well .thumbnail img{
+  -webkit-border-radius: 10px;
+  -moz-border-radius: 10px;
+  border-radius: 10px;
+  border: 2px solid #FFFFFF;
 }
 
-ul#navigation .help a{
-	background-image: url(images/help2.png);
-}
-
-/* --- course navigation menu as a definition list  --- */
-#swap_menu_link {
-	float: left;
-}
-#toolnavbox {
-	margin: 0 0 0 10px;
-	padding: 0;
-	float: left;
-	border: 1px solid #4271b5;
-}
-#toolnavbox dl {
-	width: 160px;
-	margin: 0 auto;
-	padding: 0;
-	background: transparent;
-	font-size: 12px;
-	text-align: center;
-}
-#toolnavbox dt {
-	margin: 0;
-	padding: 0;
-	font-weight: bold;
-	font-size: 12px;
-	text-align: center;
-	color: #000;
-	border-bottom: 1px solid #fff;
-	background: transparent;
-}
-#toolnavbox dd {
-	margin: 0;
-	padding: 0;
-	color: #009;
-	text-align: left;
-	border-bottom:1px solid #fff;
-	background: #E5EDF9;
-}
-#toolnav img {
-	float: left;
-	width: 25px;
-	height: 25px;
-	margin: 0 4px 0 0;
-}
-#toolnavlist a, #toolnavlist a:link {
-	background: #F4A460;
-	color: #DC143C;
-	padding: 5px 5px 5px 10px;
-	margin: 0;
-	text-decoration: none;
-	display: block;
-	line-height:24px;
-}
-#toolnavlist a:hover {
-	background: #fff;
-	color:#B8860B;
-}
-#toolnavlist a#here {
-	background: #fff;
-	color:#DC143C;
-}
-/* --- end of course navigation menu section  --- */
-
+/*CSS SLIDER ANUNCIOS*/
 
-/**********************************************
- *  EXERCISE TOOL                           *
- **********************************************/
-.exercice_form {
-	width: 300px;
-}
-span.checkbox {
-	width: 19px;
-	height: 25px;
-	padding: 0 5px 0 0;
-	background: url(images/checkbox.gif) no-repeat;
-	display: block;
-	clear: left;
-	float: left;
-}
-span.radio {
-	width: 19px;
-	height: 25px;
-	padding: 0 5px 0 0;
-	background: url(images/radio.gif) no-repeat;
-	display: block;
-	clear: left;
-	float: left;
-}
-#question_title {
-}
-#question_description {
-	padding-left:5px;
-	padding-top:10px;
-}
-#question_score {
-	padding-left:5px;
-	padding-top:10px;
-	padding-bottom:10px;
-	font-weight:bold;
-}
-#question_feedback {
-	background-color:#FCF7BA;
-	border:1px solid #CCCCCC;
-	color:#666666;
-	font-size:11px;
-	font-weight:bold;
-	list-style-type:none;
-	margin-top:5px;
-	padding:5px;
-}
-#exercise_close_link {
-	background: url(images/close.gif) no-repeat;
-	padding-left: 20px;
-}
-#exercise_close_link:hover {
-	background: url(images/close_highlight.gif) no-repeat;
-	padding-left: 20px;
-}
-/* Quizzes tool */
-.quiz_export_link {
-	float: right;
+.pagerslide h2{
+    font-size: 18px;
+    font-weight: normal;
+    background:  #E6E6E6;
+    color: #666;
+    padding-left: 15px;
 }
-/*****************************************************
- *  BUTTONS	                                         *
- *****************************************************/
 
-button:hover input[type="submit"]:hover{
-	background-color:#cbcbcb;
-	color:#545454;
-	border-style: inset;
-}
-/* button with image */
-button.add, button.save, button.cancel, button.refresh, button.upload, button.search, button.login, button.plus, button.minus, button.next, button.back, input[type="submit"].submit_next {
-	padding-left:30px;
-	background-position:10px;
-	background-repeat:no-repeat;
-}
-/*including "save" image*/
-button.save {
-	background-image:url(images/button_accept.gif);
-}
-/*including "add" image*/
-button.add {
-	background-image:url(images/button_add.gif);
-}
-/*including "cancel" image*/
-button.cancel {
-	background-image:url(images/button_delete.gif);
-}
-/*including "search" image*/
-button.search {
-	background-image:url(images/button_search.gif);
-}
-/*including "login" image*/
-button.login {
-	background-image:url(images/button_login.gif);
-	margin:2px 5px 3px 5px !important;
-}
-/*including "plus" image*/
-button.plus {
-	background-image:url(images/button_plus.gif);
-}
-/*including "minus" image*/
-button.minus {
-	background-image:url(images/button_minus.gif);
-}
-/*including "next" image*/
-button.next,input[type="submit"].submit_next  {
-	background-image:url(images/button_next.gif);
-}
-/*including "back" image*/
-button.back {
-	background-image:url(images/button_back.gif);
-}
-/*including "refresh" image*/
-button.refresh {
-    background-image:url(images/button_refresh.gif);
-}
-/*including "upload" image*/
-button.upload {
-    background-image:url(images/button_upload.gif);
-}
-.icon_image_content {
-    width:70px;
-    cursor:hand;
-    height:6em;
-    text-align: center;
-    padding-right: 10px;
-    padding-left: 0px;
-    border: 1px dotted #ccc;
-    background-color: #eee;
-    margin-right: 0.2em;
-    margin-top: 0.1em;
-    -moz-border-radius-topleft : 5px;
-    -moz-border-radius-bottomright : 5px;
-    -moz-border-radius-bottomleft : 5px;
-    -moz-border-radius-topright : 5px;
-}
-.icon_image_content:hover {
-  background-color: #fff; 
-  border: 1px solid #ccc;
-}
-.question_menu {
-	list-style:none;
-	float:left;
-	padding:0px;
-	margin:-2px;
-	min-height:100px;
-}
-.question_menu li {
-	float:left;
-	margin:0px;
-}
-#exercise_admin {
-	margin: 0;
-	padding: 0;
-	border: 0;
-}
-div#friend-header {
-	float:left;
-	width:100%;
-	line-height: 2.1em;
-}
-div#friend-header a {
-	padding-right:6px;
-}
-div#friend-container {
-	float:left;
-}
-div.image_friend_network {
-	float:left;
-	border:1px solid #CCCCCC;
-	margin:2px;
-	padding:4px;
-	background: #EFEFEF;
-	height:125px;
-	width:82px;
-	z-index:5;
-}
-div.image_friend_network span {
-	overflow:hidden;
-	display:block;
-	height:92px;
-	margin: 0px 0px;
-}
-div.image_friend_network img {
-	vertical-align:middle;
-}
-div.image_friend_network center.friend {
-	overflow:hidden;
-	height:30px;
-}
-.friend_invitations {
-	float:left;
-	margin: 0 0 4px 12px;
+#top_main_content #announcements .page-header{
+  display: none;
+  line-height: 1;
+}
+#top_main_content #announcements .span6 {
+  width: 800px;
+}
+
+/*CSS PARA CONTENIDO DE CURSO INTRODUCCION*/
+
+.page-course-intro{
+    padding: 2em;
+    border: 1px solid #DDDDDD;
+    -webkit-border-radius: 10px;
+    -moz-border-radius: 10px;
+    border-radius: 10px;
+    margin-bottom: 2em;
+    background: #FFFFFF;
+}
+
+.page-course-intro ul{
+    list-style-image:url(images/vineta.png);
+    padding-top: 10px;
 }
-button.arrowr, input.arrowr {
-	background-image:url(images/2rightarrow.gif);	
+.page-course-intro a{
+    color: #FD6600;
 }
-button.arrowl, input.arrowl {
-    background-image:url(images/2leftarrow.gif);	
+.page-course-intro a:hover{
+    color: #FD6600;
+    text-decoration: underline;
 }
 
 
-.u-m-answer {
-	width:100%;
+/*FIN DE INTRODUCCION DEL CURSO*/
+.fc-header-title h2{
+    color: #666;
 }
-.u-m-answer p {
-	margin:2px;
+.fc-first .fc-widget-header{
+    font-size: 14px;
+    font-weight: normal;
+    padding-top: 5px;
+    padding-bottom: 5px;
 }
-.refresh {
-	background-image:url(images/refresh.png);
-	background-repeat:no-repeat;
-	padding-left:20px;
-	padding-bottom:2px;
-}
-.portal {
-	background-image:url(images/portal.png);
-	background-repeat:no-repeat;
-	padding-left:28px;
-	padding-bottom:10px;
-	padding-top:8px;
-}
-.legal-terms {
-	height:150px;
-	overflow:auto;
-	background-color:#eee;
-	width:500px;
-}
-
-/* UI improvements for 1.8.6.2 this should be move to the chamilo theme and reproduce in all CSS*/
 
-* {
-	outline :none;
+.well {
+  background: #F9F9F9; /* Old browsers */
+  border: 1px solid #EDEDED;
+  border-radius: 8px;
+  box-shadow: none;
+  margin-bottom: 20px;
+  min-height: 20px;
+  padding: 20px 10px;
 }
-
-/*
-input, select, textarea {	
-	-moz-border-radius-bottomleft:5px;
-	-moz-border-radius-bottomright:5px;
-	-moz-border-radius-topleft:5px;
-	-moz-border-radius-topright:5px;
-	-x-system-font:none;
-	border:1px solid #CCCCCC;
-	color:#666666;
-	font-family:Arial,Helvetica,sans-serif;
-	font-size:120%;
-	font-size-adjust:none;
-	font-stretch:normal;
-	font-style:normal;
-	font-variant:normal;
-	font-weight:normal;
-	line-height:normal;
-	padding:5px;
-}
-input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
-	background-image:url(images/shadow.gif);
-}
-.independent_course_item a {
-	font-size:135%;
-}
-.session_course_item a {
-	font-size:120%;
+input.span3, textarea.span3, .uneditable-input.span3 {
+  margin-right: 10px;
+  width: 260px;
 }
-*/
-
-#maincontent .courseslist li {
-	margin-bottom:8px;
-}
-/*
-a.read {	
-	font-weight:normal;
-}
-.actions {
-	background:#efefef;
-	border:1px solid #ccc;	
-	padding:2px;
-	margin-bottom: 5px;
-	vertical-align:middle;
-}
-.actions-title {	
-	background:#efefef;
-	border:1px solid #ccc;
-	padding:4px;
-	margin-bottom: 5px;
-	font-size:14px;
-	font-weight:bolder;
-	vertical-align:middle;
-}*/
-
-
-/* GROUP TOOL */
-
-#group_description {
-	margin: 10px 0px 10px 0px;
+.sidebar-nav img{
+    -webkit-border-radius: 10px;
+    -moz-border-radius: 10px;
+    border-radius: 10px;
 }
-
-#group_privacy {
-	margin: 10px 0px 10px 0px;
+#homepage .row .span9 h2{
+    font-size: 26px;
+    font-weight: bold;
+    color: #666;
+    padding-bottom: 8px;
 }
-
-#group_permissions {
-	-moz-background-clip:border;
-	-moz-background-inline-policy:continuous;
-	-moz-background-origin:padding;
-	-moz-border-radius-bottomleft:8px;
-	-moz-border-radius-bottomright:8px;
-	-moz-border-radius-topleft:8px;
-	-moz-border-radius-topright:8px;
-	background:#EEE none repeat scroll 0 0;
-
-	margin: 20px 0px 20px 0px;
+#homepage .row .span9 p,#homepage .row .span9 ol {
+    color: #6E6E6E;
 }
-
-#group_permissions ul {	
-	list-style-image:none;
-	list-style-position:outside;
-	list-style-type:none;
-	margin:0;
-	padding:0;
+#homepage .row .span9 a{
+    /*color: #DE3A01;*/
 }
-
-#group_permissions ul li {
-	margin: 10px 0px 10px 5px;
+#homepage .row .span9 a:hover{
+    /*color: #DE3A01;*/
 }
-
-/* Groups boxes */
-
-.groups_grid_container { 
-	width:100%;
+.page-header h2{
+    color: #666;
+    font-weight: bold;
+    font-size: 18px;
+    padding-left: 10px;
+    width: 250px;
 }
-.groups_grid_item {
-	width:80px;
-	float:left;
-	margin:5px;
+#course_tools .course-title-tools h3 {
+    margin-top: 10px;
+    color: #666;
+    font-weight: bold;
+    
+    
 }
-.groups_grid_element_0 { width:100px; float:left; text-align:center; margin-bottom:5px;}
-.groups_grid_element_1 { width:100px; float:left; text-align:left;	margin-bottom:5px;}
-.groups_grid_element_2 { width:150px; float:left;}
-
-/*POPULAR GROUP*/
-
-.popular_grid_item {
-	background: none repeat scroll 0 0 #FFFFFF;
-	border: 1px solid #E5E5E5;
-	border-radius: 11px 11px 11px 11px;
-	
-	-webkit-border-radius: 11px 11px 11px 11px;
-	-opera-border-radius: 11px 11px 11px 11px;
-	-moz-border-radius: 11px 11px 11px 11px;
-	
-	box-shadow: 0 4px 18px #C8C8C8;
-	-webkit-box-shadow: 0 4px 18px #C8C8C8;
-	-opera-box-shadow: 0 4px 18px #C8C8C8;
-	-moz-box-shadow: 0 4px 18px #C8C8C8;
-	
-	float: left;
-	height: auto;
-	margin: 0 8px 15px 15px;
-	padding: 16px 12px 5px;
-	width:90%;
+.page-header {
+  border-bottom-color: #CCCCCC;
+  border-bottom-style: solid;
+  border-bottom-width: 1px;
+  box-shadow: none;
+  padding-bottom: 0px;
 }
-
-.popular_grid_element_0 {
-	width:600px;
-    height:98px;
-    padding-left:10px;
-    padding-right:10px;
-    overflow:hidden;
+.well_border{
+  background: #F9F9F9; /* Old browsers */
+  border: 1px solid #EDEDED;
+  border-radius: 8px;
+  box-shadow: none;
+  margin-bottom: 20px;
+  min-height: 20px;
+  padding: 19px;
 }
-
-/*NEWEST GROUP*/
-
-.newest_grid_item {
-	background: none repeat scroll 0 0 #FFFFFF;
-	border: 1px solid #E5E5E5;
-	border-radius: 11px 11px 11px 11px;
-	
-	-webkit-border-radius: 11px 11px 11px 11px;
-	-opera-border-radius: 11px 11px 11px 11px;
-	-moz-border-radius: 11px 11px 11px 11px;
-	
-	box-shadow: 0 4px 18px #C8C8C8;
-	-webkit-box-shadow: 0 4px 18px #C8C8C8;
-	-opera-box-shadow: 0 4px 18px #C8C8C8;
-	-moz-box-shadow: 0 4px 18px #C8C8C8;
-	
-	float: left;
-	height: auto;
-	margin: 0 8px 15px 15px;
-	padding: 16px 12px 5px;
-	width:90%;
+.well_border .row .span2 {
+  width: 98px;
 }
-
-.newest_grid_element_1 {
-    width:600px;
-    height:98x;
-    padding-left:10px;
-    padding-right:10px;
-    overflow:hidden;
+.well_border .row .span2 .thumbnail {
+  background-color: #FFFFFF;
+  background-image: none;
 }
-
-/*MY GROUPS*/
-
-.mygroups_grid_item {
-	background: none repeat scroll 0 0 #FFFFFF;
-	border: 1px solid #E5E5E5;
-	border-radius: 11px 11px 11px 11px;
-	
-	-webkit-border-radius: 11px 11px 11px 11px;
-	-opera-border-radius: 11px 11px 11px 11px;
-	-moz-border-radius: 11px 11px 11px 11px;
-	
-	box-shadow: 0 4px 18px #C8C8C8;
-	-webkit-box-shadow: 0 4px 18px #C8C8C8;
-	-opera-box-shadow: 0 4px 18px #C8C8C8;
-	-moz-box-shadow: 0 4px 18px #C8C8C8;
-	
-    float: left;
-    height: 88px;
-    margin: 0 8px 15px 15px;
-    padding: 16px 12px 5px;
-    width:600px;
+#hot_courses .row .span9 .well_border .row .span6{
+    width: auto;
 }
-
-.box_description_group_member {
-	color: #999999;
-    font-size: 10px;
+.categories-course-description h3{
+    color: #666;
 }
-
-.mygroups_grid_element_1 {
-    width:600px;
-    height:100px;
-    overflow:hidden;
+#course_tools .content a {
+  font-size: 12px;
+  font-weight: normal;
 }
-
-.box_description_group_title h3 {
-    margin-bottom:4px;
+#main_content .course-box .row .span7{
+  width: 730px;
 }
-
-.box_description_group_title {
-    float:right;width:80%;
-}
-.box_description_group_content {
-    float:right;
-    width:80%;
-    margin-top:5px;
-    /* height:45px;*/
-    font-family:Verdana, Geneva, sans-serif;
-    font-size:12px;
-    color:#666666;
-}
-.box_description_group_actions {
-    float:right;
-    width:80%;
-    text-align:right;
-    margin-top:4px;
-    margin-right:4px;
+#main_content .course-box .row .span7 .row .span6 {
+    width: 615px;
 }
-
-#menu-wrapper {
-	width:200px;
-	float: left;
+#main_content .course-box .row .span7 .row .span6 h3{
+  font-size: 20px;
+}
+#course_category li, #hot_courses h5, .course_item h5, .categories-course-description h5, .course-box h5 {
+  font-weight: normal;
+}
+.bottom_actions_fixed {
+  background: #EC5923;
 }
-#menu {
-	-moz-border-radius: 10px; border: 1px solid #e1e1e0;
-	-webkit-border-radius: 10px; border: 1px solid #e1e1e0;
-	-opera-border-radius: 10px; border: 1px solid #e1e1e0;		
+/*****************************************************
+ *  FOOTER STYLES                                    *
+ *****************************************************/
+footer {
+    height: 10em;    
+    background: #3D3D3D;  
+    color:#ffffff;
+    border-top: 5px solid #CFCFCF; 
 }
-
-/* INVITATIONS */
- 
-.invitation_confirm {
-	border-top:1px solid #D8DFEA;
+footer .container .row {
+  padding-top: 5px;
 }
-.invitation_image {
-	width:110px;
+footer a:link, footer a:visited {
+  color: #F1D40D;
 }
-
-/* DASHBOARD */
-
-/* Head section */
-#head {
-    background-color: #000;
-    height: 100px;
-}
-#head h1 {
-    line-height: 100px;
-    color: #FFF;
-    text-align: center;    
-    text-indent: -9999em
-}
-/* End Head Section */
-
-/* Columns section */
-#columns .column {
+/*****************************************************
+ *  DISPLAY MESSAGES	                             *
+ *****************************************************/
+/*****************************************************
+ *  CSS CHAT                               *
+ *****************************************************/
+.chatboxmain {
+    bottom: 0;
+    display: block;
+    position: fixed;
+    right: 20px;
+    width: 225px;
+    z-index: 9000;
+}
+
+.chatboxheadmain {
+  padding:7px 7px 7px 0px;
+  color: #ffffff;
+  border-right:1px solid #222;
+  border-left:1px solid #222;
+  
+  background-color: #222; 
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222));
+  background-image: -moz-linear-gradient(top, #333333, #222222);
+  background-image: -ms-linear-gradient(top, #333333, #222222);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #222222));
+  background-image: -webkit-linear-gradient(top, #333333, #222222);
+  background-image: -o-linear-gradient(top, #333333, #222222);
+  background-image: linear-gradient(top, #333333, #222222);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);
+  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+  -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+    
+}
+#chatboxtitlemain {
+    cursor: pointer;
     float: left;
-    width: 50%;
-		/* Min-height: */
-		min-height: 400px;
-		height: auto !important; 
-		height: 400px;
+    font-size: 12px;
+    font-weight: normal;
+    width: 160px;
 }
-
-#columns ul, #columns ol {margin:0; padding:0; list-style:none; border:none;}
-
-
-
-
-
-
-
-/* To add in 1.8.7*/
-
-.session_box_title span {
-	font-size: 130%;
-	font-weight: bold;	
+/*****************************************************
+ *  CSS CHAT END                             *
+ *****************************************************/
+.normal-message {
+    color: #00407F;
+    border: 1px solid #CDE6F5;
+    background: url("images/background_message.png") repeat-x scroll 0 0 #EAF8FE;
 }
-
-.sub_session_box_title span {
-	font-size: 130%;
-	font-weight: bold;	
+.warning-message {
+    border: 1px solid #FFB30F;
+    color: #000;
+	background: url("images/background_message.png") repeat-x scroll 0 0 #FFEFA7;
 }
-
-#session_category_title {
-	font-size: 140%;
-	font-weight: bold;
-	padding: 2px 0px 5px 5px;
+.confirmation-message {
+	border: 1px solid #1F8323;
+    color:#1F8323;
+	background: url("images/background_message.png") repeat-x scroll 0 0 #CAF0C7;
 }
-
-/* fixes the * */ 
-span.form_required  {
-	padding-right:5px;
+.error-message {
+    border: 1px solid #FF0000;
+    color: #440000;
+	background: url("images/background_message.png") repeat-x scroll 0 0 #FFD1D1;
 }
 
-.userportal-course-item {
-	-webkit-border-radius: 10px;
-	-moz-border-radius: 10px;
-	border-radius: 10px;
-	background-color:#F9F9F9;
-	padding:5px 10px 5px 10px;
-	height:40px;	
-	margin:5px;
+.social-menu-title {
+	background-color:#00AAE3;
 }
 
-.userportal-course-item-title {
-	font-size:135%;
+#social-content-online {
+    background-color:#00AAE3;
 }
-
-.courseadminview-activity-3col, .platformadminview-activity-3col {
-	-moz-border-radius:5px 5px 5px 5px;
-	border:1px solid #E1E1E0;
-	float:left;
-	margin:0px 20px 10px 2px;
-	padding:11px;
-	width:220px;
-	height:330px;
+		
+.admin_section li {
+    background-image:url(images/bullet.gif);
 }
 
-.courseadminview-activity-3col ul {	
-	padding:0px 20px 10px 4px;	
-	list-style-type:none;
-	height:240px;
-	margin-left:0px;
-	margin: 0px 0px 0px 0px ;
+.system_announcements {
+    background: transparent url('images/systemenouvelles.jpg') no-repeat top  left;
 }
 
-.courseadminview-activity-3col ul li {	
-	padding:4px 0px 4px 0px;
+.topa {
+    background:transparent url('images/logoa4.gif') no-repeat;
 }
-
-#activity-3col {
-	width: 800px ;
-	margin-left: auto ;
-	margin-right: auto ;
+.topb {
+    background:transparent url('images/logob4.gif') no-repeat;
 }
 
-
-.userportal-catalog-item {
-	-webkit-border-radius: 10px;
-	-moz-border-radius: 10px;
-	border-radius: 10px;
-	background-color:#F9F9F9;
-	padding:5px 10px 10px 6px;
-	/* height:40px; */	
+#bottomhellomindfactory {    
+    background:transparent url('images/textologo.jpg') no-repeat;
 }
-
-.userportal-catalog-item .catalog_box li span {
-	font-size:130%;
-	font-weight:bold;
-	margin-left:5px;	
+.new_actions-fixed{
+  top: 49px;
 }
 
-.forum_table_title {
-	border-collapse: collapse;
-	width: 100%;
-	padding: 5px;
-	border-left: 1px solid gray;
-	border-top: 1px solid gray;	
-	border-right: 1px solid gray;
-	padding:5px;	
+/*including "save" image*/
+button.save {
+    background:url(images/accept.png) 0 center no-repeat #F0F0F0;
+    color: #666;
+    text-shadow:none;
 }
-
-.forum_table_title th {
-	padding-right: 12px;
-	/*border: 1px solid gray;*/
-	background-color: #E5EDF9;
+button.save:hover {
+    background:url(images/accept.png) 0 center no-repeat #ffffff;
+    color: #666;
+    text-shadow:none;
 }
-
-
-.forum_table {
-	border-collapse: collapse;
-	width: 100%;
-	padding: 5px;
-	border: 1px solid gray;
-	margin-bottom:15px;	
+/*including "add" image*/
+.controls .btn.add {
+    background:url(images/add.png) 0 center no-repeat #EC5923;
+    padding-left: 36px;
 }
-
-.forum_table .forum_head {
-	padding:5px;	
-	text-align: left;
-	font-size:14px;
-	 
-} 
-
-.forum_table th {
-	padding-right: 12px;
-	/*border: 1px solid gray;*/
-	background-color: #E5EDF9;
+.controls .btn.add:hover {
+    background:url(images/add.png) 0 center no-repeat #EA4E15;
+    padding-left: 36px;
+}
+/*including "cancel" image*/
+button.cancel {
+    background-image:url(images/button_delete.gif);
+}
+/*including "search" image*/
+button.search {
+    background:url(images/buttom.png) 0 center no-repeat #F0F0F0;
+    color: #666;
+    text-shadow:none;
 }
-.forum_table tr.row_odd {
-	background-color: #F2F2F2;
+button.search:hover {
+    background:url(images/buttom.png) 0 center no-repeat #ffffff;
+    color: #666;
+    text-shadow:none;
 }
-.forum_table tr.row_odd:hover, .data_table tr.row_even:hover {
-	background-color: #E5EDF9;
+/*including "plus" image*/
+button.plus {
+    background-image:url(images/button_plus.gif);
 }
-.forum_table tr.row_even {
-	background-color: #fff;
+/*including "minus" image*/
+button.minus {
+    background-image:url(images/button_minus.gif);
 }
-.forum_table td {
-	padding: 5px;
-	vertical-align: top;
-	border-bottom: 1px solid #b0b0b0;
-	border-right: 1px dotted #e1e1e1;
-	border-left: 1px dotted #e1e1e1;
+/*including "next" image*/
+button.next {
+    background:url(images/next.png) 0 center no-repeat #F0F0F0;
 }
-
-.post {
-	border: 1px solid gray;
-	margin-bottom:5px;
+button.next:hover {
+    background:url(images/next.png) 0 center no-repeat #ffffff;
 }
-
-/* Text resize icons in header */
-.resize_font { /* the canvas */
-    margin: 0 5px 0 5px;
-}
-.reset_font {
-    font-size: 1.2em;
-    color: gray;
-    border: 1px solid white;
-    padding: 2px;
-}
-.reset_font:hover {
-    border: 1px solid black;
-    cursor: pointer;
+/*including "back" image*/
+button.back {
+    background:url(images/previus.png) 0 center no-repeat #F0F0F0;
 }
-.increase_font {
-    font-size: 1.8em;
-    color: gray;
-    border: 1px solid white;
-    padding: 2px;
+button.back:hover {
+    background:url(images/previus.png) 0 center no-repeat #ffffff;
 }
-.increase_font:hover {
-    border: 1px solid black;
-    cursor: pointer;
+/*including "refresh" image*/
+button.refresh {
+    background-image:url(images/button_refresh.gif);
 }
-.decrease_font {
-    font-size: 0.6em;
-    color: gray;
-    border: 1px solid white;
-    padding: 2px;
+/*including "upload" image*/
+button.upload {
+    background-image:url(images/button_upload.gif);
 }
-.decrease_font:hover {
-    border: 1px solid black;
-    cursor: pointer;
-} 
-
 
-.online_grid_item {
-    float:left;
-    margin:10px;
-    text-align:center;    
-}
-.online_grid_element_0 {    
-    width: 100px; 
-    height: 100px; 
-    overflow: hidden;
+button.arrowr, input.arrowr {
+  background-image:url(images/2rightarrow.gif); 
 }
-/* input values to crop the image: top, right, bottom, left */
-.online_grid_element_0 img{
-     width: 200px;
-     margin: -10px 0 0 -50px;
-      /* height: 150px; */ 
+button.arrowl, input.arrowl {
+    background-image:url(images/2leftarrow.gif);  
 }
-.online_grid_element_1, .online_grid_element_2 {    
-    font-size:10px;
+.refresh {
+    background-image:url(images/refresh.png);
 }
 
-/* tips Abbr-plugin for FCKeditor */
-abbr {
-      border-bottom: 1px dotted rgb(102, 102, 102);
-	  background-color:#F00;
-      cursor: help;
-}
+.portal {
+    background-image:url(images/portal.png);
+}
+
+/*CSS ICON BLOCK USER*/
+   .inbox-social{
+        background: url("images/icon-chamilo.png") no-repeat 0 -415px;
+        padding-left: 40px;
+    }
+    .inbox-social:hover,.new-message-social:hover,.invitations-social:hover,.profile-social:hover,.add-course:hover,
+    .order-course:hover,.history-course:hover, .list-course:hover{
+        opacity: 0.8;
+    }
+    .new-message-social{
+        background: url("images/icon-chamilo.png") no-repeat 0 -370px;
+        padding-left: 40px;
+    }
+    .invitations-social{
+        background: url("images/icon-chamilo.png") no-repeat 0 -455px;
+        padding-left: 40px;
+    }
+    .profile-social{
+        background: url("images/icon-chamilo.png") no-repeat 0 -496px;
+        padding-left: 40px;
+    }
+    .add-course{
+        background: url("images/icon-chamilo.png") no-repeat 0 -327px;
+        padding-left: 40px;
+    }
+    .order-course{
+        background: url("images/icon-chamilo.png") no-repeat 0 -536px;
+        padding-left: 40px;
+    }
+    .history-course{
+        background: url("images/icon-chamilo.png") no-repeat 0 -576px;
+        padding-left: 40px;
+    }
+    .list-course{
+        background: url("images/icon-chamilo.png") no-repeat 0 -618px;
+        padding-left: 40px;
+    }
+    .forum-btn{
+        background: url("images/icon-chamilo.png") no-repeat 0 -666px;
+        padding-left: 40px;
+    }
+
+/*+++++++++++++++++++++++++++++++++
+RESPONSIVE CSS
++++++++++++++++++++++++++++++++++*/
+
+.navbar .brand {
+  float: left;
+  font-size: 16px;
+  font-weight: 200;
+  line-height: 20px;
+  padding-bottom: 12px;
+  padding-top: 15px;
+  color: #ffffff;
+}
+
+@media (min-width: 481px) and (max-width: 800px) {
+    .navbar .brand {
+      color: #666;
+    }
+    .navbar .nav-collapse .nav.pull-right a{
+      color: #3A4751;
+      line-height: 26px;
+    }
+    .navbar .nav-collapse .nav.pull-right a:hover{
+      color: #FFFFFF;
+    }
+    .sidebar-nav h4 {
+        color: #037FB2;
+        font-size: 18px;
+        padding-bottom: 10px;
+        padding-left: 15px;
+        padding-right: 15px;
+        padding-top: 10px;
+    }
+    #profile_block .nav-list li, #course_block .nav-list li{
+        padding-bottom: 5px;
+        padding-top: 5px;
+    }
+    #top_main_content .menu-column #user_image_block{
+      box-shadow: none;
+    }
+
+}
+@media (max-width: 600px) {
+#main_content .course-box .row .span7 .row .span6 {
+  float: left;
+  /*width: 615px;*/
+  padding-left: 10px;
+}
+#main_content .course-box .row .span7 .row .span6 h3 {
+        font-size: 16px;
+        /*width: 500px;*/
+    }
+}
+
+@media (min-width: 801px){
+  .nav-list > li > a {
+  font-size: 13px;
+  padding-bottom: 8px;
+  padding-top: 8px;
+}
+
+/*CSS ICON BLOCK USER*/
+   .inbox-social{
+        background: url("images/icon-chamilo.png") no-repeat 0 -345px;
+        padding-left: 30px;
+        background-size: 25px auto;
+    }
+    
+    .new-message-social{
+        background: url("images/icon-chamilo.png") no-repeat 0 -307px;
+        padding-left: 30px;
+        background-size: 25px auto;
+    }
+    
+    .invitations-social{
+        background: url("images/icon-chamilo.png") no-repeat 0 -378px;
+        padding-left: 30px;
+        background-size: 25px auto;
+    }
+    
+    .profile-social{
+        background: url("images/icon-chamilo.png") no-repeat 0 -414px;
+        padding-left: 30px;
+        background-size: 25px auto;
+    }
+    
+    .add-course{
+        background: url("images/icon-chamilo.png") no-repeat 0 -274px;
+        padding-left: 30px;
+        background-size: 25px auto;
+    }
+   
+    .order-course{
+        background: url("images/icon-chamilo.png") no-repeat 0 -447px;
+        padding-left: 30px;
+        background-size: 25px auto;
+    }
+    
+    .history-course{
+        background: url("images/icon-chamilo.png") no-repeat 0 -481px;
+        padding-left: 30px;
+        background-size: 25px auto;
+    }
+    
+    .list-course{
+        background: url("images/icon-chamilo.png") no-repeat 0 -517px;
+        padding-left: 30px;
+        background-size: 25px auto;
+    }
+    .forum-btn {
+      background: url("images/icon-chamilo.png") no-repeat scroll 0 -552px / 25px auto rgba(0, 0, 0, 0);
+      padding-left: 30px;
+}
+    
+}
+@media (min-width: 321px) and (max-width: 480px){
+footer {
+    height: 5em;
+  }
+  .welcome-mascot{
+      background: none;
+      padding-right: 0px;
+      padding-bottom: 2em;
+      padding-top: 2em;
+    }
+  #homepage .row .span9 h2 {
+  color: #666;
+  font-size: 18px;
+  font-weight: bold;
+  padding-bottom: 8px;
+  line-height: 25px;
+|}
+#announcements{
+  display: none;
+}
+}
+/*+++++++++++++++++++++++++++++++++
+END RESPONSIVE CSS
++++++++++++++++++++++++++++++++++*/

+ 23 - 103
main/css/baby_orange/frames.css

@@ -20,7 +20,7 @@ img {
 }
 /* End hide from IE5-mac */
 
-/*****************************************************
+/***************************************************** 
  *  HEADER STYLES                                    *
  *****************************************************/
 #header {
@@ -55,97 +55,17 @@ img {
 	float: right;
 	font-weight: bold;
 }
-/* Header 2: Containing My Courses, My Profile,... */
-#header2 {
-	font-size: 12px;
-	padding: 4px;
-	background-color: #4271B5;
-	color: #fff;
-	border-bottom: 1px solid white;
-}
-#header2 .banner_links {
-	margin: 0;
-}
-#header2 a {
-	text-decoration: none;
-	color: #fff;
-	background: transparent;
-	font-weight:normal;
-	font-size: 12px;
-}
-#header2 input.logout {
-	/* makes an input appear like a link in this header */
-	margin: 0;
-	padding: 0;
-	background-color: transparent;
-	border: none;
-	color: #fff;
-	font-size: 12px;
-	font-weight:normal;
-	font-family: verdana, arial, helvetica, sans-serif;
-}
-#header2 a:hover, #header2 input.logout:hover {
-	border-bottom: 1px solid #fff;
-}
 #logout {
 	float: right;
 	width:20%;
 	text-align:right;
 }
-/* Header 3: Containing breadcrumbs, online users, student/teacher view, help */
-#header3 {
-	position: relative; /* to avoid the IE peekabo bug*/
-	font-size: 12px;
-	font-weight: normal;
-	padding: 4px;
-	background-color: #90AFDD;
-	color: #fff;
-	border-bottom: 1px solid white;
-}
-#header3 a {
-	color: #ffffff;
-	text-decoration: none;
-	font-weight:normal;
-}
-#header3 a:hover {
-	text-decoration: underline;
-}
-/* Header3Right: online users, student/teacher view, help */
-#Header3Right ul {
-	position: relative; /* to avoid the IE peekabo bug*/
-	float: right;
-	width: 50%;
-	margin: 0;
-	padding: 0;
-	list-style-type: none;
-	text-align: right;
-}
-#Header3Right ul li {
-	display: inline;
-}
-#Header3Right ul li a {
-	padding: 4px 6px 4px 4px;
-	color:#fff;
-}
-/* Header 4: not used */
-#header4 {
-	background-color: #fff;
-	color: #009;
-	padding: 4px;
-	margin-bottom: 2px;
-}
-#header4 a {
-	color: #4171b5;
-}
-#header4 a:hover {
-	text-decoration: none;
-	color: #f00;
-}
+
 /* The tool shortcuts */
 #toolshortcuts {
 	text-align: right;
 }
-/*****************************************************
+/***************************************************** 
  *  FOOTER STYLES                                    *
  *****************************************************/
 #footer {
@@ -157,7 +77,7 @@ img {
 #footer .copyright {
 	float: right;
 }
-/*****************************************************
+/***************************************************** 
  *  MAIN STYLES                                      *
  *****************************************************/
 #main {
@@ -233,7 +153,7 @@ img {
 	font-size: 12px;
 	color: #f00;
 }
-/*** layout divs for course and tool pages (being tested in some pages) ****/
+/*** layout divs for course and tool pages (being tested in some pages) ****/  
 #contentfloatholder {/* also makes the right "sliding" tab  */
 	/*background: url(../pics/sidebar-r.gif) repeat-y 100% 0;
 background: url(../pics/bg_fountain.jpg) no-repeat 100% 0; */
@@ -252,11 +172,11 @@ content: ".";
 #centerwrap {
 	float: left;
 	width: 100%;
-	margin-right: -95%;/* this needs to be less than 100% for Moz/Mac which thinks
-         it's empty otherwise. The difference is made up by putting a
+	margin-right: -95%;/* this needs to be less than 100% for Moz/Mac which thinks 
+         it's empty otherwise. The difference is made up by putting a 
          negative left margin on the left float:
-	   Note IE/Mac doesn't like this method ~ it wants the 100% so it can
-	   be fed in using IE only CSS below becasue IE/Win also works with the 100% method.
+	   Note IE/Mac doesn't like this method ~ it wants the 100% so it can 
+	   be fed in using IE only CSS below becasue IE/Win also works with the 100% method.  
 	*/
 }
 #center {
@@ -325,10 +245,10 @@ content: ".";
 	color:#4171B5;
 	display: block;
 }
-/* --- end of left side definition list menu section  --- */
+/* --- end of left side definition list menu section  --- */ 
 
 
-
+ 
 /* various sections in course-home.php file  */
 #toolremove {
 	width: 40%;
@@ -426,7 +346,7 @@ content: ".";
 	border: 1px solid #fff;
 	border-collapse: collapse;
 }
-/*The caption of the calendar (displays the month and the << and >> links*/
+/*The caption of the calendar (displays the month and the << and >> links*/ 
 #agenda_list #title {
 	background-color: #4171B5;
 	font-weight: bold;
@@ -463,7 +383,7 @@ content: ".";
 	border: 1px solid #264269;
 	border-collapse: collapse;
 }
-/* The cells for the days (1->31) */
+/* The cells for the days (1->31) */ 
 #agenda_list .days_week {
 	height: 40px;
 	width: 12%;
@@ -518,7 +438,7 @@ content: ".";
 	border: 0px solid #4171B5;
 	border-collapse: collapse;
 }
-/*text in the cells: display of agenda items (invisible)*/
+/*text in the cells: display of agenda items (invisible)*/   
 #agenda_list .data_hidden {
 	background-color: #eee;
 	text-align: left;
@@ -546,7 +466,7 @@ content: ".";
 	border-collapse: collapse;
 	color: #999999;
 }
-/*text in the cells: display of agenda items (highlighted)*/
+/*text in the cells: display of agenda items (highlighted)*/    
 #agenda_list .datanow {
 	background-color: #FFCC00;
 	text-align: left;
@@ -573,7 +493,7 @@ content: ".";
 }
 /* ---------------------------------------------------
 	styles for the mini agenda
------------------------------------------------------*/
+-----------------------------------------------------*/ 
 #smallcalendar {
 	width: 100%;
 	margin: 0 auto;
@@ -905,7 +825,7 @@ padding-top: 0px;	padding-right: 0px;	padding-bottom: 0px;	padding-left: 0px;}
 	font-family: Verdana, Arial, Helvetica, sans-serif;
 	font-size: 9px
 }
-/*****************************************************
+/***************************************************** 
  *  DATA TABLE STYLES                                *
  *****************************************************/
 .cell_header {
@@ -1061,9 +981,9 @@ div.system_announcement_content {
 	border-left: 1px solid gray;
 	padding-left: 5px;
 }
-/* tips Abbr-plugin for FCKeditor */
-abbr {
-      border-bottom: 1px dotted rgb(102, 102, 102);
-      background-color:#F00;
-      cursor: help;
-}
+/* tips Abbr-plugin for FCKeditor */
+abbr {
+      border-bottom: 1px dotted rgb(102, 102, 102);
+      background-color:#F00;
+      cursor: help;
+}

BIN
main/css/baby_orange/images/accept.png


BIN
main/css/baby_orange/images/add.png


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


BIN
main/css/baby_orange/images/bar_1.gif


BIN
main/css/baby_orange/images/bar_1m.gif


BIN
main/css/baby_orange/images/bar_1r.gif


BIN
main/css/baby_orange/images/bar_1u.gif


BIN
main/css/baby_orange/images/bg-button.gif


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


BIN
main/css/baby_orange/images/bg-main.png


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


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


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


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


BIN
main/css/baby_orange/images/blue_arrow.png


BIN
main/css/baby_orange/images/bullet.gif


BIN
main/css/baby_orange/images/buttom.png


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


BIN
main/css/baby_orange/images/button_plus.gif


BIN
main/css/baby_orange/images/chamilo-welcome.png


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


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


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


BIN
main/css/baby_orange/images/header-logo.png


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


Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels