Explorar o código

Merge pull request #36 from chamilo/1.9.x

1.9.x
ycastillo %!s(int64=11) %!d(string=hai) anos
pai
achega
def5a9733f
Modificáronse 49 ficheiros con 5216 adicións e 1256 borrados
  1. 13 10
      main/admin/add_courses_to_session.php
  2. 75 61
      main/admin/add_courses_to_usergroup.php
  3. 203 197
      main/admin/add_sessions_to_usergroup.php
  4. 306 363
      main/admin/add_users_to_group.php
  5. 1 1
      main/admin/add_users_to_usergroup.php
  6. 17 9
      main/admin/user_list.php
  7. 24 46
      main/chat/chat.php
  8. 46 51
      main/chat/chat_chat.php
  9. 34 32
      main/chat/chat_functions.lib.php
  10. 17 16
      main/chat/chat_hidden.php
  11. 47 47
      main/chat/chat_message.php
  12. 48 53
      main/chat/chat_whoisonline.php
  13. 28 35
      main/chat/header_frame.inc.php
  14. 163 0
      main/css/academica/scorm.css
  15. 163 0
      main/css/baby_orange/scorm.css
  16. 0 111
      main/css/base.css
  17. 163 0
      main/css/blue_lagoon/scorm.css
  18. 163 0
      main/css/chamilo/scorm.css
  19. 163 0
      main/css/chamilo_electric_blue/scorm.css
  20. 163 0
      main/css/chamilo_green/scorm.css
  21. 269 110
      main/css/chamilo_orange/scorm.css
  22. 163 4
      main/css/chamilo_red/scorm.css
  23. 163 0
      main/css/chamilo_sport_red/scorm.css
  24. 163 2
      main/css/cool_blue/scorm.css
  25. 163 1
      main/css/corporate/scorm.css
  26. 163 1
      main/css/cosmic_campus/scorm.css
  27. 163 0
      main/css/delicious_bordeaux/scorm.css
  28. 163 2
      main/css/dokeos_blue/scorm.css
  29. 163 0
      main/css/dokeos_classic/scorm.css
  30. 163 1
      main/css/dokeos_classic_2D/scorm.css
  31. 163 0
      main/css/empire_green/scorm.css
  32. 163 2
      main/css/fruity_orange/scorm.css
  33. 163 1
      main/css/medical/scorm.css
  34. 163 0
      main/css/public_admin/scorm.css
  35. 163 2
      main/css/royal_purple/scorm.css
  36. 163 2
      main/css/silver_line/scorm.css
  37. 164 2
      main/css/sober_brown/scorm.css
  38. 163 4
      main/css/steel_grey/scorm.css
  39. 163 2
      main/css/tasty_olive/scorm.css
  40. BIN=BIN
      main/img/lp_section.png
  41. 30 1
      main/inc/lib/course.lib.php
  42. 4 0
      main/inc/lib/main_api.lib.php
  43. 42 42
      main/inc/lib/pear/HTML/QuickForm/Rule/Compare.php
  44. 5 0
      main/inc/lib/template.lib.php
  45. 39 7
      main/inc/lib/usergroup.lib.php
  46. 51 33
      main/newscorm/learnpath.class.php
  47. 3 3
      main/template/default/layout/footer.tpl
  48. 0 1
      main/template/default/layout/head.tpl
  49. 1 1
      main/tracking/courseLog.php

+ 13 - 10
main/admin/add_courses_to_session.php

@@ -5,22 +5,22 @@
  * @todo use formvalidator
  */
 
-// name of the language file that needs to be included
-$language_file='admin';
+// name of the language file that needs to be included.
+$language_file = 'admin';
 
-// resetting the course id
+// resetting the course id.
 $cidReset = true;
 
 require_once '../inc/global.inc.php';
 require_once api_get_path(LIBRARY_PATH).'add_courses_to_session_functions.lib.php';
 
 $id_session = isset($_GET['id_session']) ? intval($_GET['id_session']) : null;
+$add = isset($_GET['add']) ? Security::remove_XSS($_GET['add']) : null;
 
 SessionManager::protect_session_edit($id_session);
 
 $xajax = new xajax();
-//$xajax->debugOn();
-$xajax -> registerFunction (array('search_courses', 'AddCourseToSession', 'search_courses'));
+$xajax->registerFunction (array('search_courses', 'AddCourseToSession', 'search_courses'));
 
 // Setting the section (for the tabs)
 $this_section = SECTION_PLATFORM_ADMIN;
@@ -28,7 +28,7 @@ $this_section = SECTION_PLATFORM_ADMIN;
 // setting breadcrumbs
 $interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
 $interbreadcrumb[] = array('url' => 'session_list.php','name' => get_lang('SessionList'));
-$interbreadcrumb[] = array('url' => "resume_session.php?id_session=".$id_session,"name" => get_lang('SessionOverview'));
+$interbreadcrumb[] = array('url' => "resume_session.php?id_session=".$id_session, "name" => get_lang('SessionOverview'));
 
 // Database Table Definitions
 $tbl_session_rel_course_rel_user	= Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER);
@@ -155,10 +155,11 @@ if (isset($_POST['formSent']) && $_POST['formSent']) {
 	$nbr_courses=count($CourseList);
 	Database::query("UPDATE $tbl_session SET nbr_courses=$nbr_courses WHERE id='$id_session'");
 
-	if (isset($_GET['add']))
+	if (isset($add)) {
 		header('Location: add_users_to_session.php?id_session='.$id_session.'&add=true');
-	else
+    } else {
 		header('Location: resume_session.php?id_session='.$id_session);
+    }
     exit;
 }
 
@@ -166,11 +167,13 @@ if (isset($_POST['formSent']) && $_POST['formSent']) {
 Display::display_header($tool_name);
 
 if ($add_type == 'multiple') {
-	$link_add_type_unique = '<a href="'.api_get_self().'?id_session='.$id_session.'&add='.Security::remove_XSS($_GET['add']).'&add_type=unique">'.Display::return_icon('single.gif').get_lang('SessionAddTypeUnique').'</a>';
+	$link_add_type_unique = '<a href="'.api_get_self().'?id_session='.$id_session.'&add='.$add.'&add_type=unique">'.
+        Display::return_icon('single.gif').get_lang('SessionAddTypeUnique').'</a>';
 	$link_add_type_multiple = Display::return_icon('multiple.gif').get_lang('SessionAddTypeMultiple').' ';
 } else {
 	$link_add_type_unique = Display::return_icon('single.gif').get_lang('SessionAddTypeUnique').'&nbsp;&nbsp;&nbsp;';
-	$link_add_type_multiple = '<a href="'.api_get_self().'?id_session='.$id_session.'&add='.Security::remove_XSS($_GET['add']).'&add_type=multiple">'.Display::return_icon('multiple.gif').get_lang('SessionAddTypeMultiple').'</a>';
+	$link_add_type_multiple = '<a href="'.api_get_self().'?id_session='.$id_session.'&add='.$add.'&add_type=multiple">'.
+        Display::return_icon('multiple.gif').get_lang('SessionAddTypeMultiple').'</a>';
 }
 
 // the form header

+ 75 - 61
main/admin/add_courses_to_usergroup.php

@@ -4,47 +4,44 @@
 *   @package chamilo.admin
 */
 
-// name of the language file that needs to be included
-$language_file = array('admin','registration');
+// Name of the language file that needs to be included.
+$language_file = array('admin', 'registration');
 
-// resetting the course id
+// Resetting the course id.
 $cidReset = true;
 
-// including some necessary files
+// Including some necessary files.
 require_once '../inc/global.inc.php';
 require_once '../inc/lib/xajax/xajax.inc.php';
 require_once api_get_path(LIBRARY_PATH).'usergroup.lib.php';
 
 $xajax = new xajax();
-
-//$xajax->debugOn();
 $xajax->registerFunction('search');
 
-// setting the section (for the tabs)
+// Setting the section (for the tabs).
 $this_section = SECTION_PLATFORM_ADMIN;
 
-// Access restrictions
+// Access restrictions.
 api_protect_admin_script(true);
 
-// setting breadcrumbs
-$interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
-$interbreadcrumb[]=array('url' => 'usergroups.php','name' => get_lang('Classes'));
-
-// Database Table Definitions
+// Setting breadcrumbs.
+$interbreadcrumb[] = array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
+$interbreadcrumb[] = array('url' => 'usergroups.php','name' => get_lang('Classes'));
 
-// setting the name of the tool
-$tool_name=get_lang('SubscribeClassToCourses');
+// Setting the name of the tool.
+$tool_name = get_lang('SubscribeClassToCourses');
 
 $add_type = 'multiple';
-if(isset($_REQUEST['add_type']) && $_REQUEST['add_type']!=''){
+if (isset($_REQUEST['add_type']) && $_REQUEST['add_type']!=''){
     $add_type = Security::remove_XSS($_REQUEST['add_type']);
 }
 
+$add = isset($_GET['add']) ? Security::remove_XSS($_GET['add']) : null;
+
 $htmlHeadXtra[] = $xajax->getJavascript('../inc/lib/xajax/');
 $htmlHeadXtra[] = '
 <script>
 function add_user_to_session (code, content) {
-
     document.getElementById("user_to_add").value = "";
     document.getElementById("ajax_list_users_single").innerHTML = "";
 
@@ -70,23 +67,23 @@ function remove_item(origin) {
 }
 
 function validate_filter() {
-        document.formulaire.add_type.value = \''.$add_type.'\';
-        document.formulaire.form_sent.value=0;
-        document.formulaire.submit();
+    document.formulaire.add_type.value = \''.$add_type.'\';
+    document.formulaire.form_sent.value=0;
+    document.formulaire.submit();
 }
 </script>';
 
-
 $form_sent  = 0;
 $errorMsg   = '';
-$sessions=array();
+$sessions = array();
 $usergroup = new UserGroup();
 $id = intval($_GET['id']);
-if ($_POST['form_sent']) {
+
+if (isset($_POST['form_sent']) && $_POST['form_sent']) {
     $form_sent = $_POST['form_sent'];
     $elements_posted = $_POST['elements_in_name'];
     if (!is_array($elements_posted)) {
-        $elements_posted=array();
+        $elements_posted = array();
     }
     if ($form_sent == 1) {
         $usergroup->subscribe_courses_to_usergroup($id, $elements_posted);
@@ -94,21 +91,59 @@ if ($_POST['form_sent']) {
         exit;
     }
 }
+
+
+// Filters
+$filters = array(
+    array('type' => 'text', 'name' => 'code', 'label' => get_lang('CourseCode')),
+    array('type' => 'text', 'name' => 'title', 'label' => get_lang('Title')),
+    /*array('type' => 'text', 'name' => 'lastname', 'label' => get_lang('LastName')),
+    array('type' => 'text', 'name' => 'official_code', 'label' => get_lang('OfficialCode')),
+    array('type' => 'text', 'name' => 'email', 'label' => get_lang('Email'))*/
+);
+
+$searchForm = new FormValidator('search', 'get', api_get_self().'?id='.$id);
+$searchForm->add_header(get_lang('AdvancedSearch'));
+$renderer =& $searchForm->defaultRenderer();
+$searchForm->addElement('hidden', 'id', $id);
+foreach ($filters as $param) {
+    $searchForm->addElement($param['type'], $param['name'], $param['label']);
+}
+$searchForm->addElement('button', 'submit', get_lang('Search'));
+
+$filterData = array();
+if ($searchForm->validate()) {
+    $filterData = $searchForm->getSubmitValues();
+}
+
+$conditions = array();
+if (!empty($filters) && !empty($filterData)) {
+    foreach ($filters as $filter) {
+        if (isset($filter['name']) && isset($filterData[$filter['name']])) {
+            $value = $filterData[$filter['name']];
+            if (!empty($value)) {
+                $conditions[$filter['name']] = $value;
+            }
+        }
+    }
+}
+
 $data = $usergroup->get($id);
-$course_list_in = $usergroup->get_courses_by_usergroup($id);
-$course_list = CourseManager::get_courses_list(0, 0, 'title', 'asc', -1, null, api_get_current_access_url_id());
+$course_list_in = $usergroup->get_courses_by_usergroup($id, true);
+$course_list = CourseManager::get_courses_list(0, 0, 'title', 'asc', -1, null, api_get_current_access_url_id(), false, $conditions);
+
+$elements_not_in = $elements_in = array();
 
-$elements_not_in = $elements_in= array();
+foreach ($course_list_in as $course) {
+    $elements_in[$course['id']] = $course['title']." (".$course['visual_code'].")";
+}
 
 if (!empty($course_list)) {
     foreach ($course_list as $item) {
-        if (in_array($item['id'], $course_list_in)) {
-            $elements_in[$item['id']] = $item['title']." (".$item['visual_code'].")";
-        } else {
-            $elements_not_in[$item['id']] = $item['title']." (".$item['visual_code'].")";
-        }
+        $elements_not_in[$item['id']] = $item['title']." (".$item['visual_code'].")";
     }
 }
+
 $ajax_search = $add_type == 'unique' ? true : false;
 
 //checking for extra field with filter on
@@ -168,50 +203,29 @@ $xajax->processRequests();
 Display::display_header($tool_name);
 
 if ($add_type == 'multiple') {
-    $link_add_type_unique = '<a href="'.api_get_self().'?id_session='.$id_session.'&add='.Security::remove_XSS($_GET['add']).'&add_type=unique">'.
+    $link_add_type_unique = '<a href="'.api_get_self().'?add='.$add.'&add_type=unique">'.
         Display::return_icon('single.gif').get_lang('SessionAddTypeUnique').'</a>';
     $link_add_type_multiple = Display::return_icon('multiple.gif').get_lang('SessionAddTypeMultiple');
 } else {
     $link_add_type_unique = Display::return_icon('single.gif').get_lang('SessionAddTypeUnique');
-    $link_add_type_multiple = '<a href="'.api_get_self().'?id_session='.$id_session.'&add='.Security::remove_XSS($_GET['add']).'&add_type=multiple">'.
+    $link_add_type_multiple = '<a href="'.api_get_self().'?add='.$add.'&add_type=multiple">'.
         Display::return_icon('multiple.gif').get_lang('SessionAddTypeMultiple').'</a>';
 }
 
 echo '<div class="actions">';
 echo '<a href="usergroups.php">'.Display::return_icon('back.png',get_lang('Back'), array(), ICON_SIZE_MEDIUM).'</a>';
+echo Display::url(get_lang('AdvancedSearch'), '#', array('class' => 'advanced_options', 'id' => 'advanced_search'));
+echo '</div>';
+
+echo '<div id="advanced_search_options" style="display:none">';
+$searchForm->display();
 echo '</div>';
+
 ?>
 
 <form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if(!empty($_GET['add'])) echo '&add=true' ; ?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>>
 
 <?php echo '<legend>'.$data['name'].': '.$tool_name.'</legend>';
-
-if ($add_type=='multiple') {
-    if (is_array($extra_field_list)) {
-        if (is_array($new_field_list) && count($new_field_list) > 0) {
-            echo '<h3>'.get_lang('FilterUsers').'</h3>';
-            foreach ($new_field_list as $new_field) {
-                echo $new_field['name'];
-                $varname = 'field_'.$new_field['variable'];
-                echo '&nbsp;<select name="'.$varname.'">';
-                echo '<option value="0">--'.get_lang('Select').'--</option>';
-                foreach ($new_field['data'] as $option) {
-                    $checked='';
-                    if (isset($_POST[$varname])) {
-                        if ($_POST[$varname]==$option[1]) {
-                            $checked = 'selected="true"';
-                        }
-                    }
-                    echo '<option value="'.$option[1].'" '.$checked.'>'.$option[1].'</option>';
-                }
-                echo '</select>';
-                echo '&nbsp;&nbsp;';
-            }
-            echo '<input type="button" value="'.get_lang('Filter').'" onclick="validate_filter()" />';
-            echo '<br /><br />';
-        }
-    }
-}
 echo Display::input('hidden', 'id', $id);
 echo Display::input('hidden', 'form_sent', '1');
 echo Display::input('hidden', 'add_type', null);

+ 203 - 197
main/admin/add_sessions_to_usergroup.php

@@ -1,8 +1,8 @@
 <?php
 /* For licensing terms, see /license.txt */
 /**
-*   @package chamilo.admin
-*/
+ *   @package chamilo.admin
+ */
 
 // name of the language file that needs to be included
 $language_file=array('admin','registration');
@@ -83,16 +83,16 @@ $sessions=array();
 $usergroup = new UserGroup();
 $id = intval($_GET['id']);
 if($_POST['form_sent']) {
-    $form_sent          = $_POST['form_sent'];    
-    $elements_posted    = $_POST['elements_in_name'];     
+    $form_sent          = $_POST['form_sent'];
+    $elements_posted    = $_POST['elements_in_name'];
     if (!is_array($elements_posted)) {
         $elements_posted = array();
     }
     if ($form_sent == 1) {
-        //added a parameter to send emails when registering a user        
+        //added a parameter to send emails when registering a user
         $usergroup->subscribe_sessions_to_usergroup($id, $elements_posted);
         header('Location: usergroups.php');
-        exit;        
+        exit;
     }
 }
 $data               = $usergroup->get($id);
@@ -103,9 +103,9 @@ $session_list       = SessionManager::get_sessions_list(array(), array('name'));
 $elements_not_in = $elements_in= array();
 
 if (!empty($session_list)) {
-    foreach($session_list as $session) {        
-        if (in_array($session['id'], $session_list_in)) {            
-            $elements_in[$session['id']] = $session['name'];             
+    foreach($session_list as $session) {
+        if (in_array($session['id'], $session_list_in)) {
+            $elements_in[$session['id']] = $session['name'];
         } else {
             $elements_not_in[$session['id']] = $session['name'];
         }
@@ -120,7 +120,7 @@ function search_sessions($needle,$type) {
     global $tbl_user,$elements_in;
     $xajax_response = new XajaxResponse();
     $return = '';
-    if (!empty($needle) && !empty($type)) {
+    if (isset($needle) && !empty($type)) {
 
         // xajax send utf8 datas... datas in db can be non-utf8 datas
         $charset = api_get_system_encoding();
@@ -129,16 +129,19 @@ function search_sessions($needle,$type) {
 
         if ($type == 'single') {
             // search users where username or firstname or lastname begins likes $needle
-          /*  $sql = 'SELECT user.user_id, username, lastname, firstname FROM '.$tbl_user.' user
-                    WHERE (username LIKE "'.$needle.'%"
-                    OR firstname LIKE "'.$needle.'%"
-                OR lastname LIKE "'.$needle.'%") AND user.user_id<>"'.$user_anonymous.'"   AND user.status<>'.DRH.''.
-                $order_clause.
-                ' LIMIT 11';*/
-        } else {
+            /*  $sql = 'SELECT user.user_id, username, lastname, firstname FROM '.$tbl_user.' user
+                      WHERE (username LIKE "'.$needle.'%"
+                      OR firstname LIKE "'.$needle.'%"
+                  OR lastname LIKE "'.$needle.'%") AND user.user_id<>"'.$user_anonymous.'"   AND user.status<>'.DRH.''.
+                  $order_clause.
+                  ' LIMIT 11';*/
+        } else if ($type == 'searchbox') {
+            $session_list = SessionManager::get_sessions_list(array('s.name LIKE' => "%$needle%"));
+        }
+        else {
             $session_list = SessionManager::get_sessions_list(array('s.name LIKE' => "$needle%"));
-        }     
-        $i=0;        
+        }
+        $i=0;
         if ($type=='single') {
             /*
             while ($user = Database :: fetch_array($rs)) {
@@ -153,9 +156,9 @@ function search_sessions($needle,$type) {
             $xajax_response -> addAssign('ajax_list_users_single','innerHTML',api_utf8_encode($return));*/
         } else {
             $return .= '<select id="elements_not_in" name="elements_not_in_name[]" multiple="multiple" size="15" style="width:360px;">';
-            
-            foreach ($session_list as $row ) {         
-                if (!in_array($row['id'], array_keys($elements_in))) {       
+
+            foreach ($session_list as $row ) {
+                if (!in_array($row['id'], array_keys($elements_in))) {
                     $return .= '<option value="'.$row['id'].'">'.$row['name'].'</option>';
                 }
             }
@@ -178,210 +181,213 @@ if ($add_type == 'multiple') {
 }
 
 echo '<div class="actions">';
-echo '<a href="usergroups.php">'.Display::return_icon('back.png',get_lang('Back'),'',ICON_SIZE_MEDIUM).'</a>';       
+echo '<a href="usergroups.php">'.Display::return_icon('back.png',get_lang('Back'),'',ICON_SIZE_MEDIUM).'</a>';
 echo '</div>';
 
 ?>
-<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if(!empty($_GET['add'])) echo '&add=true' ; ?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>>
-<?php
-echo '<legend>'.$data['name'].': '.$tool_name.'</legend>';
-
-if ($add_type=='multiple') {
-    if (is_array($extra_field_list)) {
-        if (is_array($new_field_list) && count($new_field_list)>0 ) {
-            echo '<h3>'.get_lang('FilterUsers').'</h3>';
-            foreach ($new_field_list as $new_field) {
-                echo $new_field['name'];
-                $varname = 'field_'.$new_field['variable'];
-                echo '&nbsp;<select name="'.$varname.'">';
-                echo '<option value="0">--'.get_lang('Select').'--</option>';
-                foreach ($new_field['data'] as $option) {
-                    $checked='';
-                    if (isset($_POST[$varname])) {
-                        if ($_POST[$varname]==$option[1]) {
-                            $checked = 'selected="true"';
+    <form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if(!empty($_GET['add'])) echo '&add=true' ; ?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>>
+        <?php
+        echo '<legend>'.$data['name'].': '.$tool_name.'</legend>';
+
+        if ($add_type=='multiple') {
+            if (is_array($extra_field_list)) {
+                if (is_array($new_field_list) && count($new_field_list)>0 ) {
+                    echo '<h3>'.get_lang('FilterUsers').'</h3>';
+                    foreach ($new_field_list as $new_field) {
+                        echo $new_field['name'];
+                        $varname = 'field_'.$new_field['variable'];
+                        echo '&nbsp;<select name="'.$varname.'">';
+                        echo '<option value="0">--'.get_lang('Select').'--</option>';
+                        foreach ($new_field['data'] as $option) {
+                            $checked='';
+                            if (isset($_POST[$varname])) {
+                                if ($_POST[$varname]==$option[1]) {
+                                    $checked = 'selected="true"';
+                                }
+                            }
+                            echo '<option value="'.$option[1].'" '.$checked.'>'.$option[1].'</option>';
                         }
+                        echo '</select>';
+                        echo '&nbsp;&nbsp;';
                     }
-                    echo '<option value="'.$option[1].'" '.$checked.'>'.$option[1].'</option>';
+                    echo '<input type="button" value="'.get_lang('Filter').'" onclick="validate_filter()" />';
+                    echo '<br /><br />';
                 }
-                echo '</select>';
-                echo '&nbsp;&nbsp;';
             }
-            echo '<input type="button" value="'.get_lang('Filter').'" onclick="validate_filter()" />';
-            echo '<br /><br />';
         }
-    }
-}
-echo Display::input('hidden','id',$id);
-echo Display::input('hidden','form_sent','1');
-echo Display::input('hidden','add_type',null);
-if(!empty($errorMsg)) {
-    Display::display_normal_message($errorMsg); //main API
-}
-?>
-
-<table border="0" cellpadding="5" cellspacing="0" width="100%">
-<tr>
-  <td align="center"><b><?php echo get_lang('SessionsInPlatform') ?> :</b>
-  </td>
-  <td></td>
-  <td align="center"><b><?php echo get_lang('SessionsInGroup') ?> :</b></td>
-</tr>
-
-<?php if ($add_type=='multiple') { ?>
-<tr>
-<td align="center">
-<?php echo get_lang('FirstLetterSessions'); ?> :
-     <select name="firstLetterUser" onchange = "xajax_search_sessions(this.value,'multiple')" >
-      <option value = "%">--</option>
-      <?php
-        echo Display :: get_alphabet_options();
-      ?>
-     </select>
-</td>
-<td align="center">&nbsp;</td>
-</tr>
-<?php } ?>
-<tr>
-  <td align="center">
-  <div id="content_source">
-      <?php           
-      if (!($add_type=='multiple')) {        
-        ?>
-        <input type="text" id="user_to_add" onkeyup="xajax_search_users(this.value,'single')" />
-        <div id="ajax_list_users_single"></div>
-        <?php
-      } else {               
-      ?>
-      <div id="ajax_list_multiple">
-        <?php echo Display::select('elements_not_in_name',$elements_not_in, '',array('style'=>'width:360px', 'multiple'=>'multiple','id'=>'elements_not_in','size'=>'15px'),false); ?> 
-      </div>
-    <?php
-      }
-     ?>
-  </div>
-  </td>
-  <td width="10%" valign="middle" align="center">
-  <?php
-  if ($ajax_search) {
-  ?>
-    <button class="arrowl" type="button" onclick="remove_item(document.getElementById('elements_in'))" ></button>
-  <?php
-  } else {
-  ?>
-    <button class="arrowr" type="button" onclick="moveItem(document.getElementById('elements_not_in'), document.getElementById('elements_in'))" onclick="moveItem(document.getElementById('elements_not_in'), document.getElementById('elements_in'))"></button>
-    <br /><br />
-    <button class="arrowl" type="button" onclick="moveItem(document.getElementById('elements_in'), document.getElementById('elements_not_in'))" onclick="moveItem(document.getElementById('elements_in'), document.getElementById('elements_not_in'))"></button>
-    <?php
-  }
-  ?>
-    <br /><br /><br /><br /><br /><br />
-  </td>
-  <td align="center">
-<?php
-    echo Display::select('elements_in_name[]', $elements_in, '', array('style'=>'width:360px', 'multiple'=>'multiple','id'=>'elements_in','size'=>'15px'),false );
-    unset($sessionUsersList);
-?>
- </td>
-</tr>
-<tr>
-    <td colspan="3" align="center">
-        <br />
-        <?php
-        echo '<button class="save" type="button" value="" onclick="valide()" >'.get_lang('SubscribeClassToSessions').'</button>';
+        echo Display::input('hidden','id',$id);
+        echo Display::input('hidden','form_sent','1');
+        echo Display::input('hidden','add_type',null);
+        if(!empty($errorMsg)) {
+            Display::display_normal_message($errorMsg); //main API
+        }
         ?>
-    </td>
-</tr>
-</table>
-</form>
 
-<script type="text/javascript">
-<!--
-function moveItem(origin , destination){
+        <table border="0" cellpadding="5" cellspacing="0" width="100%">
+            <tr>
+                <td align="center"><b><?php echo get_lang('SessionsInPlatform') ?> :</b>
+                </td>
+                <td></td>
+                <td align="center"><b><?php echo get_lang('SessionsInGroup') ?> :</b></td>
+            </tr>
+
+            <?php if ($add_type=='multiple') { ?>
+                <tr>
+                    <td align="center">
+                        <?php echo get_lang('FirstLetterSessions'); ?> :
+                        <select name="firstLetterUser" onchange = "xajax_search_sessions(this.value,'multiple')" >
+                            <option value = "%">--</option>
+                            <?php
+                            echo Display :: get_alphabet_options();
+                            ?>
+                        </select>
+                        <?php echo '<br />'; ?>
+                        <?php echo get_lang('SearchSessions'); ?> :
+                        <input name="SearchUser" class="span3" onchange = "xajax_search_sessions(this.value,'searchbox')" onkeyup="this.onchange()">
+                    </td>
+                    <td align="center">&nbsp;</td>
+                </tr>
+            <?php } ?>
+            <tr>
+                <td align="center">
+                    <div id="content_source">
+                        <?php
+                        if (!($add_type=='multiple')) {
+                            ?>
+                            <input type="text" id="user_to_add" onkeyup="xajax_search_users(this.value,'single')" />
+                            <div id="ajax_list_users_single"></div>
+                        <?php
+                        } else {
+                            ?>
+                            <div id="ajax_list_multiple">
+                                <?php echo Display::select('elements_not_in_name',$elements_not_in, '',array('style'=>'width:360px', 'multiple'=>'multiple','id'=>'elements_not_in','size'=>'15px'),false); ?>
+                            </div>
+                        <?php
+                        }
+                        ?>
+                    </div>
+                </td>
+                <td width="10%" valign="middle" align="center">
+                    <?php
+                    if ($ajax_search) {
+                        ?>
+                        <button class="arrowl" type="button" onclick="remove_item(document.getElementById('elements_in'))" ></button>
+                    <?php
+                    } else {
+                        ?>
+                        <button class="arrowr" type="button" onclick="moveItem(document.getElementById('elements_not_in'), document.getElementById('elements_in'))" onclick="moveItem(document.getElementById('elements_not_in'), document.getElementById('elements_in'))"></button>
+                        <br /><br />
+                        <button class="arrowl" type="button" onclick="moveItem(document.getElementById('elements_in'), document.getElementById('elements_not_in'))" onclick="moveItem(document.getElementById('elements_in'), document.getElementById('elements_not_in'))"></button>
+                    <?php
+                    }
+                    ?>
+                    <br /><br /><br /><br /><br /><br />
+                </td>
+                <td align="center">
+                    <?php
+                    echo Display::select('elements_in_name[]', $elements_in, '', array('style'=>'width:360px', 'multiple'=>'multiple','id'=>'elements_in','size'=>'15px'),false );
+                    unset($sessionUsersList);
+                    ?>
+                </td>
+            </tr>
+            <tr>
+                <td colspan="3" align="center">
+                    <br />
+                    <?php
+                    echo '<button class="save" type="button" value="" onclick="valide()" >'.get_lang('SubscribeClassToSessions').'</button>';
+                    ?>
+                </td>
+            </tr>
+        </table>
+    </form>
+
+    <script type="text/javascript">
+        <!--
+        function moveItem(origin , destination){
+
+            for(var i = 0 ; i<origin.options.length ; i++) {
+                if(origin.options[i].selected) {
+                    destination.options[destination.length] = new Option(origin.options[i].text,origin.options[i].value);
+                    origin.options[i]=null;
+                    i = i-1;
+                }
+            }
+            destination.selectedIndex = -1;
+            sortOptions(destination.options);
 
-    for(var i = 0 ; i<origin.options.length ; i++) {
-        if(origin.options[i].selected) {
-            destination.options[destination.length] = new Option(origin.options[i].text,origin.options[i].value);
-            origin.options[i]=null;
-            i = i-1;
         }
-    }
-    destination.selectedIndex = -1;
-    sortOptions(destination.options);
-
-}
 
-function sortOptions(options) {
+        function sortOptions(options) {
 
-    newOptions = new Array();
-    for (i = 0 ; i<options.length ; i++)
-        newOptions[i] = options[i];
+            newOptions = new Array();
+            for (i = 0 ; i<options.length ; i++)
+                newOptions[i] = options[i];
 
-    newOptions = newOptions.sort(mysort);
-    options.length = 0;
-    for(i = 0 ; i < newOptions.length ; i++)
-        options[i] = newOptions[i];
+            newOptions = newOptions.sort(mysort);
+            options.length = 0;
+            for(i = 0 ; i < newOptions.length ; i++)
+                options[i] = newOptions[i];
 
-}
+        }
 
-function mysort(a, b){
-    if(a.text.toLowerCase() > b.text.toLowerCase()){
-        return 1;
-    }
-    if(a.text.toLowerCase() < b.text.toLowerCase()){
-        return -1;
-    }
-    return 0;
-}
+        function mysort(a, b){
+            if(a.text.toLowerCase() > b.text.toLowerCase()){
+                return 1;
+            }
+            if(a.text.toLowerCase() < b.text.toLowerCase()){
+                return -1;
+            }
+            return 0;
+        }
 
-function valide(){
-    var options = document.getElementById('elements_in').options;
-    for (i = 0 ; i<options.length ; i++)
-        options[i].selected = true;
-    document.forms.formulaire.submit();
-}
+        function valide(){
+            var options = document.getElementById('elements_in').options;
+            for (i = 0 ; i<options.length ; i++)
+                options[i].selected = true;
+            document.forms.formulaire.submit();
+        }
 
 
-function loadUsersInSelect(select){
+        function loadUsersInSelect(select){
 
-    var xhr_object = null;
+            var xhr_object = null;
 
-    if(window.XMLHttpRequest) // Firefox
-        xhr_object = new XMLHttpRequest();
-    else if(window.ActiveXObject) // Internet Explorer
-        xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
-    else  // XMLHttpRequest non supporté par le navigateur
-    alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");
+            if(window.XMLHttpRequest) // Firefox
+                xhr_object = new XMLHttpRequest();
+            else if(window.ActiveXObject) // Internet Explorer
+                xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
+            else  // XMLHttpRequest non supporté par le navigateur
+                alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");
 
-    //xhr_object.open("GET", "loadUsersInSelect.ajax.php?id_session=<?php echo $id_session ?>&letter="+select.options[select.selectedIndex].text, false);
-    xhr_object.open("POST", "loadUsersInSelect.ajax.php");
+            //xhr_object.open("GET", "loadUsersInSelect.ajax.php?id_session=<?php echo $id_session ?>&letter="+select.options[select.selectedIndex].text, false);
+            xhr_object.open("POST", "loadUsersInSelect.ajax.php");
 
-    xhr_object.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
+            xhr_object.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
 
 
-    nosessionUsers = makepost(document.getElementById('elements_not_in'));
-    sessionUsers = makepost(document.getElementById('elements_in'));
-    nosessionClasses = makepost(document.getElementById('origin_classes'));
-    sessionClasses = makepost(document.getElementById('destination_classes'));
-    xhr_object.send("nosessionusers="+nosessionUsers+"&sessionusers="+sessionUsers+"&nosessionclasses="+nosessionClasses+"&sessionclasses="+sessionClasses);
+            nosessionUsers = makepost(document.getElementById('elements_not_in'));
+            sessionUsers = makepost(document.getElementById('elements_in'));
+            nosessionClasses = makepost(document.getElementById('origin_classes'));
+            sessionClasses = makepost(document.getElementById('destination_classes'));
+            xhr_object.send("nosessionusers="+nosessionUsers+"&sessionusers="+sessionUsers+"&nosessionclasses="+nosessionClasses+"&sessionclasses="+sessionClasses);
 
-    xhr_object.onreadystatechange = function() {
-        if(xhr_object.readyState == 4) {
-            document.getElementById('content_source').innerHTML = result = xhr_object.responseText;
-            //alert(xhr_object.responseText);
+            xhr_object.onreadystatechange = function() {
+                if(xhr_object.readyState == 4) {
+                    document.getElementById('content_source').innerHTML = result = xhr_object.responseText;
+                    //alert(xhr_object.responseText);
+                }
+            }
         }
-    }
-}
 
-function makepost(select){
-    var options = select.options;
-    var ret = "";
-    for (i = 0 ; i<options.length ; i++)
-        ret = ret + options[i].value +'::'+options[i].text+";;";
+        function makepost(select){
+            var options = select.options;
+            var ret = "";
+            for (i = 0 ; i<options.length ; i++)
+                ret = ret + options[i].value +'::'+options[i].text+";;";
 
-    return ret;
-}
--->
-</script>
+            return ret;
+        }
+        -->
+    </script>
 <?php
 Display::display_footer();

+ 306 - 363
main/admin/add_users_to_group.php

@@ -5,180 +5,180 @@
 */
 
 // name of the language file that needs to be included
-$language_file=array('admin','registration','userInfo');
+$language_file = array('admin','registration','userInfo');
 
 // resetting the course id
-$cidReset=true;
+$cidReset = true;
 
 // including some necessary files
 require_once '../inc/global.inc.php';
 require_once '../inc/lib/xajax/xajax.inc.php';
+require_once '../inc/lib/group_portal_manager.lib.php';
 
 // setting the section (for the tabs)
 $this_section = SECTION_PLATFORM_ADMIN;
 
-global $_configuration;
 // Access restrictions
 api_protect_admin_script(true);
 
 // setting breadcrumbs
-$interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
-$interbreadcrumb[]=array('url' => 'group_list.php','name' => get_lang('GroupList'));
+$interbreadcrumb[] = array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
+$interbreadcrumb[] = array('url' => 'group_list.php','name' => get_lang('GroupList'));
 
 // Database Table Definitions
 $tbl_group			= Database::get_main_table(TABLE_MAIN_GROUP);
 $tbl_user			= Database::get_main_table(TABLE_MAIN_USER);
 $tbl_group_rel_user	= Database::get_main_table(TABLE_MAIN_USER_REL_GROUP);
 $tbl_user_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
+$needle = null;
+$user_anonymous = api_get_anonymous_id();
 
 // setting the name of the tool
 $tool_name = get_lang('SubscribeUsersToGroup');
 $group_id = intval($_GET['id']);
+$without_user_id = null;
 
 $add_type = 'multiple';
-if(isset($_REQUEST['add_type']) && $_REQUEST['add_type']!=''){
-	$add_type = Security::remove_XSS($_REQUEST['add_type']);
+if (isset($_REQUEST['add_type']) && $_REQUEST['add_type'] != '') {
+    $add_type = Security::remove_XSS($_REQUEST['add_type']);
 }
 
 //checking for extra field with filter on
 $xajax = new xajax();
 $xajax->registerFunction('search_users');
-function search_users($needle,$type,$relation_type) {    
-	global $tbl_user,$tbl_user_rel_access_url, $tbl_group_rel_user,$group_id,$_configuration;
-	$xajax_response = new XajaxResponse();
-	$return = $return_origin = $return_destination = '';
-	$without_user_id = $without_user_id = $condition_relation = '';
-
-	if (!empty($group_id) && !empty($relation_type)) {
-		$group_id = intval($group_id);
-		$relation_type = intval($relation_type);
-		// get user_id from relation type and group id
-	    $sql = "SELECT user_id FROM $tbl_group_rel_user
-				WHERE group_id = '$group_id'
-				AND relation_type IN (".GROUP_USER_PERMISSION_ADMIN.",".GROUP_USER_PERMISSION_READER.",".GROUP_USER_PERMISSION_PENDING_INVITATION.",".GROUP_USER_PERMISSION_MODERATOR.", ".GROUP_USER_PERMISSION_HRM.") ";
-		$res = Database::query($sql);
-		$user_ids = array();
-		if (Database::num_rows($res) > 0) {
-			while ($row = Database::fetch_row($res)) {
-				$user_ids[] = $row[0];
-			}
-			$without_user_id = " AND user.user_id NOT IN(".implode(',',$user_ids).") ";
-		}
-
-		if ($relation_type == GROUP_USER_PERMISSION_PENDING_INVITATION) {
-			$condition_relation = " AND groups.relation_type IN (".GROUP_USER_PERMISSION_PENDING_INVITATION.",".GROUP_USER_PERMISSION_READER.") ";
-		} else {
-			$condition_relation = " AND groups.relation_type = '$relation_type' ";
-		}
-
-		// data for destination user list
-		$sql = "SELECT user.user_id, user.username, user.lastname, user.firstname
-				FROM $tbl_group_rel_user groups
-				INNER JOIN  $tbl_user user ON user.user_id = groups.user_id
-				WHERE groups.group_id = '$group_id' $condition_relation ";
-
-		$rs_destination = Database::query($sql);
-		if (Database::num_rows($rs_destination) > 0) {
-			$return_destination .= '<select id="destination_users" name="sessionUsersList[]" multiple="multiple" size="15" style="width:360px;">';
-			while ($row = Database::fetch_array($rs_destination)) {
-				$person_name = api_get_person_name($row['firstname'], $row['lastname']);
-		        $return_destination .= '<option value="'.$row['user_id'].'">'.$person_name.' ('.$row['username'].')</option>';
-			}
-			$return_destination .= '</select>';
-		} else {
-			$return_destination .= '<select id="destination_users" name="sessionUsersList[]" multiple="multiple" size="15" style="width:360px;"></select>';
-		}
-		
-		$xajax_response -> addAssign('ajax_destination_list','innerHTML',api_utf8_encode($return_destination));
-
-	} else {
-		$return_destination .= '<select id="destination_users" name="sessionUsersList[]" multiple="multiple" size="15" style="width:360px;"></select>';
-		$xajax_response -> addAssign('ajax_destination_list','innerHTML',api_utf8_encode($return_destination));
-
-		if ($type == 'single') {
-			$return.= '';
-			$xajax_response -> addAssign('ajax_list_users_single','innerHTML',api_utf8_encode($return));
-		} else {
-			$return_origin .= '<select id="origin_users" name="nosessionUsersList[]" multiple="multiple" size="15" style="width:360px;"></select>';
-			$xajax_response -> addAssign('ajax_origin_list_multiple','innerHTML',api_utf8_encode($return_origin));
-		}
-	}
-
-	if (!empty($needle) && !empty($type)) {
-
-		// xajax send utf8 datas... datas in db can be non-utf8 datas
-		$charset = api_get_system_encoding();
-		$needle = Database::escape_string($needle);
-		$needle = api_convert_encoding($needle, $charset, 'utf-8');
-		$user_anonymous=api_get_anonymous_id();
-		
-
-		$order_clause = api_sort_by_first_name() ? ' ORDER BY firstname, lastname, username' : ' ORDER BY lastname, firstname, username';
-		if ($type == 'single') {
-			if (!empty($group_id) && !empty($relation_type)) {
-				// search users where username or firstname or lastname begins likes $needle
-				$sql = "SELECT user_id, username, lastname, firstname FROM $tbl_user user
-						WHERE (username LIKE '$needle%' OR firstname LIKE '$needle%' OR lastname LIKE '$needle%')
-						AND user_id<>'$user_anonymous' $without_user_id $order_clause LIMIT 11";
-				if ($_configuration['multiple_access_urls']) {
-					$access_url_id = api_get_current_access_url_id();
-					if ($access_url_id != -1) {
-						$sql = "SELECT user.user_id, username, lastname, firstname FROM $tbl_user user
-								INNER JOIN $tbl_user_rel_access_url url_user ON (url_user.user_id=user.user_id)
-								WHERE access_url_id = '$access_url_id'  AND (username LIKE '$needle%' OR firstname LIKE '$needle%' OR lastname LIKE '$needle%')
-								AND user.user_id<>'$user_anonymous' $without_user_id $order_clause LIMIT 11 ";
-					}
-				}
-				$rs_single = Database::query($sql);
-	        	$i=0;
-				while ($user = Database :: fetch_array($rs_single)) {
-		            $i++;
-		            if ($i<=10) {
-		        		$person_name = api_get_person_name($user['firstname'], $user['lastname']);
-						$return .= '<a href="javascript: void(0);" onclick="javascript: add_user(\''.$user['user_id'].'\',\''.$person_name.' ('.$user['username'].')'.'\')">'.$person_name.' ('.$user['username'].')</a><br />';
-		            } else {
-		            	$return .= '...<br />';
-		            }
-				}
-				$xajax_response -> addAssign('ajax_list_users_single','innerHTML',api_utf8_encode($return));
-			} else {
-				$xajax_response ->addAlert(get_lang('YouMustChooseARelationType'));
-				$xajax_response->addClear('user_to_add', 'value');
-			}
-
-		} else {
-			// multiple
-			if (!empty($group_id) && !empty($relation_type)) {
-				$sql = "SELECT user_id, username, lastname, firstname FROM $tbl_user user 
-				        WHERE ".(api_sort_by_first_name() ? 'firstname' : 'lastname')." LIKE '$needle%' AND user_id<>'$user_anonymous' $without_user_id $order_clause ";
-				if ($_configuration['multiple_access_urls']) {
-					$access_url_id = api_get_current_access_url_id();
-					if ($access_url_id != -1) {
-						$sql = "SELECT user.user_id, username, lastname, firstname FROM $tbl_user user
-								INNER JOIN $tbl_user_rel_access_url url_user ON (url_user.user_id=user.user_id)
-								WHERE access_url_id = '$access_url_id'
-								AND ".(api_sort_by_first_name() ? 'firstname' : 'lastname')." LIKE '$needle%'
-								AND user.user_id<>'$user_anonymous' $without_user_id $order_clause ";
-					}
-				}
-				
-				$rs_multiple = Database::query($sql);
-				$return_origin .= '<select id="origin_users" name="nosessionUsersList[]" multiple="multiple" size="15" style="width:360px;">';
-				while ($user = Database :: fetch_array($rs_multiple)) {
-					$person_name = api_get_person_name($user['firstname'], $user['lastname']);
-		            $return_origin .= '<option value="'.$user['user_id'].'">'.$person_name.' ('.$user['username'].')</option>';
-				}
-				$return_origin .= '</select>';
-				$xajax_response -> addAssign('ajax_origin_list_multiple','innerHTML',api_utf8_encode($return_origin));
-			}
-		}
-	}
-	return $xajax_response;
+function search_users($needle, $type, $relation_type)
+{
+    global $tbl_user, $tbl_user_rel_access_url, $tbl_group_rel_user, $group_id;
+    $xajax_response = new XajaxResponse();
+    $return = $return_origin = $return_destination = '';
+    $without_user_id = $without_user_id = $condition_relation = '';
+
+    if (!empty($group_id) && !empty($relation_type)) {
+        $group_id = intval($group_id);
+        $relation_type = intval($relation_type);
+        // get user_id from relation type and group id
+        $sql = "SELECT user_id FROM $tbl_group_rel_user
+                WHERE group_id = '$group_id'
+                AND relation_type IN (".GROUP_USER_PERMISSION_ADMIN.",".GROUP_USER_PERMISSION_READER.",".GROUP_USER_PERMISSION_PENDING_INVITATION.",".GROUP_USER_PERMISSION_MODERATOR.", ".GROUP_USER_PERMISSION_HRM.") ";
+        $res = Database::query($sql);
+        $user_ids = array();
+        if (Database::num_rows($res) > 0) {
+            while ($row = Database::fetch_row($res)) {
+                $user_ids[] = $row[0];
+            }
+            $without_user_id = " AND user.user_id NOT IN(".implode(',', $user_ids).") ";
+        }
+
+        $condition_relation = " AND groups.relation_type = '$relation_type' ";
+
+        // data for destination user list
+        $sql = "SELECT user.user_id, user.username, user.lastname, user.firstname
+                FROM $tbl_group_rel_user groups
+                INNER JOIN  $tbl_user user ON user.user_id = groups.user_id
+                WHERE groups.group_id = '$group_id' $condition_relation ";
+
+        $rs_destination = Database::query($sql);
+        if (Database::num_rows($rs_destination) > 0) {
+            $return_destination .= '<select id="destination_users" name="sessionUsersList[]" multiple="multiple" size="15" style="width:360px;">';
+            while ($row = Database::fetch_array($rs_destination)) {
+                $person_name = api_get_person_name($row['firstname'], $row['lastname']);
+                $return_destination .= '<option value="'.$row['user_id'].'">'.
+                    $person_name.' ('.$row['username'].')</option>';
+            }
+            $return_destination .= '</select>';
+        } else {
+            $return_destination .= '<select id="destination_users" name="sessionUsersList[]" multiple="multiple" size="15" style="width:360px;"></select>';
+        }
+        $xajax_response->addAssign('ajax_destination_list','innerHTML', api_utf8_encode($return_destination));
+    } else {
+        $return_destination .= '<select id="destination_users" name="sessionUsersList[]" multiple="multiple" size="15" style="width:360px;"></select>';
+        $xajax_response->addAssign('ajax_destination_list','innerHTML', api_utf8_encode($return_destination));
+
+        if ($type == 'single') {
+            $return.= '';
+            $xajax_response->addAssign('ajax_list_users_single','innerHTML',api_utf8_encode($return));
+        } else {
+            $return_origin .= '<select id="origin_users" name="nosessionUsersList[]" multiple="multiple" size="15" style="width:360px;"></select>';
+            $xajax_response->addAssign('ajax_origin_list_multiple', 'innerHTML', api_utf8_encode($return_origin));
+        }
+    }
+
+    if (!empty($needle) && !empty($type)) {
+
+        // xajax send utf8 datas... datas in db can be non-utf8 datas
+        $charset = api_get_system_encoding();
+        $needle = Database::escape_string($needle);
+        $needle = api_convert_encoding($needle, $charset, 'utf-8');
+        $user_anonymous = api_get_anonymous_id();
+        $order_clause = api_sort_by_first_name() ? ' ORDER BY firstname, lastname, username' : ' ORDER BY lastname, firstname, username';
+        if ($type == 'single') {
+            if (!empty($group_id) && !empty($relation_type)) {
+                // search users where username or firstname or lastname begins likes $needle
+                $sql = "SELECT user_id, username, lastname, firstname
+                        FROM $tbl_user user
+                        WHERE (username LIKE '$needle%' OR firstname LIKE '$needle%' OR lastname LIKE '$needle%')
+                        AND user_id<>'$user_anonymous' $without_user_id $order_clause LIMIT 11";
+                if (api_is_multiple_url_enabled()) {
+                    $access_url_id = api_get_current_access_url_id();
+                    if ($access_url_id != -1) {
+                        $sql = "SELECT user.user_id, username, lastname, firstname FROM $tbl_user user
+                                INNER JOIN $tbl_user_rel_access_url url_user ON (url_user.user_id=user.user_id)
+                                WHERE access_url_id = '$access_url_id'  AND (username LIKE '$needle%' OR firstname LIKE '$needle%' OR lastname LIKE '$needle%')
+                                AND user.user_id<>'$user_anonymous' $without_user_id $order_clause LIMIT 11 ";
+                    }
+                }
+                $rs_single = Database::query($sql);
+                $i=0;
+                while ($user = Database :: fetch_array($rs_single)) {
+                    $i++;
+                    if ($i<=10) {
+                        $person_name = api_get_person_name($user['firstname'], $user['lastname']);
+                        $return .= '<a href="javascript: void(0);" onclick="javascript: add_user(\''.$user['user_id'].'\',\''.$person_name.' ('.$user['username'].')'.'\')">'.$person_name.' ('.$user['username'].')</a><br />';
+                    } else {
+                        $return .= '...<br />';
+                    }
+                }
+                $xajax_response->addAssign('ajax_list_users_single','innerHTML',api_utf8_encode($return));
+            } else {
+                $xajax_response->addAlert(get_lang('YouMustChooseARelationType'));
+                $xajax_response->addClear('user_to_add', 'value');
+            }
+
+        } else {
+            // multiple
+            if (!empty($group_id) && !empty($relation_type)) {
+                $sql = "SELECT user_id, username, lastname, firstname FROM $tbl_user user
+                        WHERE ".(api_sort_by_first_name() ? 'firstname' : 'lastname')." LIKE '$needle%' AND user_id<>'$user_anonymous' $without_user_id $order_clause ";
+                if (api_is_multiple_url_enabled()) {
+                    $access_url_id = api_get_current_access_url_id();
+                    if ($access_url_id != -1) {
+                        $sql = "SELECT user.user_id, username, lastname, firstname
+                                FROM $tbl_user user
+                                INNER JOIN $tbl_user_rel_access_url url_user ON (url_user.user_id=user.user_id)
+                                WHERE
+                                    access_url_id = '$access_url_id' AND
+                                    ".(api_sort_by_first_name() ? 'firstname' : 'lastname')." LIKE '$needle%' AND
+                                    user.user_id<>'$user_anonymous' $without_user_id $order_clause ";
+                    }
+                }
+
+                $rs_multiple = Database::query($sql);
+                $return_origin .= '<select id="origin_users" name="nosessionUsersList[]" multiple="multiple" size="15" style="width:360px;">';
+                while ($user = Database :: fetch_array($rs_multiple)) {
+                    $person_name = api_get_person_name($user['firstname'], $user['lastname']);
+                    $return_origin .= '<option value="'.$user['user_id'].'">'.
+                        $person_name.' ('.$user['username'].')</option>';
+                }
+                $return_origin .= '</select>';
+                $xajax_response->addAssign('ajax_origin_list_multiple', 'innerHTML', api_utf8_encode($return_origin));
+            }
+        }
+    }
+    return $xajax_response;
 }
 
 $xajax->processRequests();
 $htmlHeadXtra[] = $xajax->getJavascript('../inc/lib/xajax/');
-
 $htmlHeadXtra[] = '
 <script>
 function add_user (code, content) {
@@ -187,18 +187,17 @@ function add_user (code, content) {
 	//document.getElementById("ajax_list_users_single").innerHTML = "";
 
 	destination = document.getElementById("destination_users");
-
 	for (i=0;i<destination.length;i++) {
-		if(destination.options[i].text == content) {
-				return false;
+		if (destination.options[i].text == content) {
+            return false;
 		}
 	}
 
 	destination.options[destination.length] = new Option(content,code);
 	destination.selectedIndex = -1;
 	sortOptions(destination.options);
-
 }
+
 function remove_item(origin)
 {
 	for(var i = 0 ; i<origin.options.length ; i++) {
@@ -210,49 +209,45 @@ function remove_item(origin)
 }
 
 function validate_filter() {
-		document.formulaire.add_type.value = \''.$add_type.'\';
-		document.formulaire.form_sent.value=0;
-		document.formulaire.submit();
+    document.formulaire.add_type.value = \''.$add_type.'\';
+    document.formulaire.form_sent.value=0;
+    document.formulaire.submit();
 }
 </script>';
 
-$form_sent=0;
-$errorMsg=$firstLetterUser=$firstLetterSession='';
-$UserList=$SessionList=array();
-$users=$sessions=array();
-$noPHP_SELF=true;
-
+$form_sent = 0;
+$errorMsg = $firstLetterUser = $firstLetterSession='';
+$UserList = $SessionList = array();
+$users = $sessions = array();
+$noPHP_SELF = true;
 $group_info = GroupPortalManager::get_group_data($group_id);
 $group_name = $group_info['name'];
 
 Display::display_header($group_name);
 
-if ($_POST['form_sent']) {
-
-	$form_sent			= $_POST['form_sent'];
-	$firstLetterUser	= $_POST['firstLetterUser'];
-	$UserList			= $_POST['sessionUsersList'];
-	$group_id			= intval($_POST['id']);
-	$relation_type		= intval($_POST['relation']);
-
-	if(!is_array($UserList)) {
-		$UserList=array();
-	}
-	if ($form_sent == 1) {
-		if ($relation_type == GROUP_USER_PERMISSION_PENDING_INVITATION) {
-			$relations = array(GROUP_USER_PERMISSION_PENDING_INVITATION,GROUP_USER_PERMISSION_READER);
-			$users_by_group      = GroupPortalManager::get_users_by_group($group_id,null,$relations);
-			$user_id_relation    = array_keys($users_by_group);
-			$user_relation_diff  = array_diff($user_id_relation,$UserList);
-			foreach ($user_relation_diff as $user_id) {
-				GroupPortalManager::delete_user_rel_group($user_id,$group_id);
-			}
-		} else {
-			GroupPortalManager::delete_users($group_id, $relation_type);
-		}
-		$result = GroupPortalManager::add_users_to_groups($UserList, array($group_id), $relation_type);
-		Display :: display_confirmation_message(get_lang('UsersEdited'));
-	}
+if (isset($_POST['form_sent']) && $_POST['form_sent']) {
+    $form_sent			= $_POST['form_sent'];
+    $firstLetterUser	= isset($_POST['firstLetterUser']) ? $_POST['firstLetterUser'] : null;
+    $UserList			= $_POST['sessionUsersList'];
+    $group_id			= intval($_POST['id']);
+    $relation_type		= intval($_POST['relation']);
+
+    if (!is_array($UserList)) {
+        $UserList = array();
+    }
+
+    if ($form_sent == 1) {
+        $users_by_group = GroupPortalManager::get_users_by_group($group_id, null, array($relation_type));
+        $user_id_relation    = array_keys($users_by_group);
+        $user_relation_diff  = array_diff($user_id_relation, $UserList);
+        if (!empty($user_relation_diff)) {
+            foreach ($user_relation_diff as $user_id) {
+                GroupPortalManager::delete_user_rel_group($user_id, $group_id);
+            }
+        }
+        $result = GroupPortalManager::add_users_to_groups($UserList, array($group_id), $relation_type);
+        Display :: display_confirmation_message(get_lang('UsersEdited'));
+    }
 }
 
 $nosessionUsersList = $sessionUsersList = array();
@@ -262,123 +257,115 @@ $order_clause = api_sort_by_first_name() ? ' ORDER BY firstname, lastname, usern
 
 if ($ajax_search) {
 
-	// data for destination list
-	if (isset($_POST['id']) && isset($_POST['relation'])) {
-		// data for destination user list
-		$id = intval($_POST['id']);
-		$relation_type = intval($_POST['relation']);
-		$condition_relation = "";
-
-		if ($relation_type==GROUP_USER_PERMISSION_PENDING_INVITATION) {
-			$condition_relation = " AND groups.relation_type IN (".GROUP_USER_PERMISSION_PENDING_INVITATION.",".GROUP_USER_PERMISSION_READER.") ";
-		} else {
-			$condition_relation = " AND groups.relation_type = '$relation_type' ";
-		}
-
-		$sql = "SELECT user.user_id, user.username, user.lastname, user.firstname
-				FROM $tbl_group_rel_user groups
-				INNER JOIN  $tbl_user user ON user.user_id = groups.user_id
-				WHERE groups.group_id = '$id' $condition_relation ";
-		$rs_destination = Database::query($sql);
-		if (Database::num_rows($rs_destination) > 0) {
-			while ($row_destination_list = Database::fetch_array($rs_destination)) {
-				$sessionUsersList[$row_destination_list['user_id']] = $row_destination_list ;
-			}
-		}
-	}
-
+    // data for destination list
+    if (isset($_POST['id']) && isset($_POST['relation'])) {
+        // data for destination user list
+        $id = intval($_POST['id']);
+        $relation_type = intval($_POST['relation']);
+        $condition_relation = " AND groups.relation_type = '$relation_type' ";
+        $sql = "SELECT user.user_id, user.username, user.lastname, user.firstname
+                FROM $tbl_group_rel_user groups
+                INNER JOIN  $tbl_user user ON user.user_id = groups.user_id
+                WHERE groups.group_id = '$id' $condition_relation ";
+        $rs_destination = Database::query($sql);
+        if (Database::num_rows($rs_destination) > 0) {
+            while ($row_destination_list = Database::fetch_array($rs_destination)) {
+                $sessionUsersList[$row_destination_list['user_id']] = $row_destination_list ;
+            }
+        }
+    }
 } else {
 
-	$many_users = false;
-	$sql = "SELECT count(user_id) FROM $tbl_user user
-			WHERE ".(api_sort_by_first_name() ? 'firstname' : 'lastname')." LIKE '$needle%' AND user_id<>'$user_anonymous' $without_user_id ";
-
-	if ($_configuration['multiple_access_urls']) {
-		$access_url_id = api_get_current_access_url_id();
-		if ($access_url_id != -1) {
-			$sql = "SELECT count(user.user_id) FROM $tbl_user user
-					INNER JOIN $tbl_user_rel_access_url url_user ON (url_user.user_id=user.user_id)
-					WHERE access_url_id = '$access_url_id'
-					AND ".(api_sort_by_first_name() ? 'firstname' : 'lastname')." LIKE '$needle%'
-					AND user.user_id<>'$user_anonymous' $without_user_id ";
-		}
-	}
-	$rs_count  = Database::query($sql);
-	$row_count = 0;
-	if (Database::num_rows($rs_count)) {
-	   $row_count = Database::fetch_row($rs_count);
-	   $row_count = $row_count[0];
-	}	
-	if ($row_count > 2) $many_users = true;
-
-	// data for origin list
-	if (isset($_GET['id'])) {
-		$id = intval($_GET['id']);
-		$needle = Database::escape_string($_POST['firstLetterUser']);
-		$needle = api_convert_encoding($needle, $charset, 'utf-8');
-		$user_anonymous=api_get_anonymous_id();
-		// get user_id from relation type and group id
-		$sql = "SELECT user_id FROM $tbl_group_rel_user
-				WHERE group_id = $id
-				AND relation_type IN (".GROUP_USER_PERMISSION_ADMIN.",".GROUP_USER_PERMISSION_READER.",".GROUP_USER_PERMISSION_PENDING_INVITATION.",".GROUP_USER_PERMISSION_MODERATOR.", ".GROUP_USER_PERMISSION_HRM.") ";
-		$res = Database::query($sql);
-		$user_ids = array();
-		if (Database::num_rows($res) > 0) {
-			while ($row = Database::fetch_row($res)) {
-				$user_ids[] = $row[0];
-			}
-			$without_user_id = " AND user.user_id NOT IN(".implode(',',$user_ids).") ";
-		}
-
-		$sql = "SELECT user_id, username, lastname, firstname FROM $tbl_user user
-				WHERE ".(api_sort_by_first_name() ? 'firstname' : 'lastname')." LIKE '$needle%' AND user_id<>'$user_anonymous' $without_user_id $order_clause ";
-		if ($_configuration['multiple_access_urls']) {
-			$access_url_id = api_get_current_access_url_id();
-			if ($access_url_id != -1) {
-				$sql = "SELECT user.user_id, username, lastname, firstname FROM $tbl_user user
-						INNER JOIN $tbl_user_rel_access_url url_user ON (url_user.user_id=user.user_id)
-						WHERE access_url_id = '$access_url_id'
-						AND ".(api_sort_by_first_name() ? 'firstname' : 'lastname')." LIKE '$needle%'
-						AND user.user_id<>'$user_anonymous' $without_user_id $order_clause ";
-			}
-		}
-		$rs_origin_list = Database::query($sql);
-		while ($row_origin_list = Database::fetch_array($rs_origin_list)) {
-			$nosessionUsersList[$row_origin_list['user_id']] = $row_origin_list;
-		}
-	}
-
-	// data for destination list
-	if (isset($_POST['id']) && isset($_POST['relation'])) {
-		// data for destination user list
-		$id = intval($_POST['id']);
-		$relation_type = intval($_POST['relation']);
-
-		if ($relation_type==GROUP_USER_PERMISSION_PENDING_INVITATION) {
-			$condition_relation = " AND groups.relation_type IN (".GROUP_USER_PERMISSION_PENDING_INVITATION.",".GROUP_USER_PERMISSION_READER.") ";
-		} else {
-			$condition_relation = " AND groups.relation_type = '$relation_type' ";
-		}
-
-		$sql = "SELECT user.user_id, user.username, user.lastname, user.firstname
-				FROM $tbl_group_rel_user groups
-				INNER JOIN  $tbl_user user ON user.user_id = groups.user_id
-				WHERE groups.group_id = '$id' $condition_relation ";
-		$rs_destination = Database::query($sql);
-		if (Database::num_rows($rs_destination) > 0) {
-			while ($row_destination_list = Database::fetch_array($rs_destination)) {
-				$sessionUsersList[$row_destination_list['user_id']] = $row_destination_list ;
-			}
-		}
-	}
+    $many_users = false;
+    $sql = "SELECT count(user_id) FROM $tbl_user user
+            WHERE ".(api_sort_by_first_name() ? 'firstname' : 'lastname')." LIKE '$needle%' AND
+            user_id<>'$user_anonymous' $without_user_id ";
+
+    if (api_is_multiple_url_enabled()) {
+        $access_url_id = api_get_current_access_url_id();
+        if ($access_url_id != -1) {
+            $sql = "SELECT count(user.user_id) FROM $tbl_user user
+                    INNER JOIN $tbl_user_rel_access_url url_user ON (url_user.user_id=user.user_id)
+                    WHERE
+                        access_url_id = '$access_url_id' AND
+                        ".(api_sort_by_first_name() ? 'firstname' : 'lastname')." LIKE '$needle%' AND
+                        user.user_id<>'$user_anonymous' $without_user_id ";
+        }
+    }
+    $rs_count  = Database::query($sql);
+    $row_count = 0;
+    if (Database::num_rows($rs_count)) {
+        $row_count = Database::fetch_row($rs_count);
+        $row_count = $row_count[0];
+    }
+
+    if ($row_count > 2) {
+        $many_users = true;
+    }
+
+    // data for origin list
+    if (isset($_GET['id'])) {
+        $id = intval($_GET['id']);
+        $needle = isset($_POST['firstLetterUser']) ? Database::escape_string($_POST['firstLetterUser']) : null;
+        $needle = api_convert_encoding($needle, $charset, 'utf-8');
+        $user_anonymous = api_get_anonymous_id();
+        // get user_id from relation type and group id
+        $sql = "SELECT user_id FROM $tbl_group_rel_user
+                WHERE group_id = $id
+                AND relation_type IN (".GROUP_USER_PERMISSION_ADMIN.", ".GROUP_USER_PERMISSION_READER.",".GROUP_USER_PERMISSION_PENDING_INVITATION.",".GROUP_USER_PERMISSION_MODERATOR.", ".GROUP_USER_PERMISSION_HRM.") ";
+        $res = Database::query($sql);
+        $user_ids = array();
+        if (Database::num_rows($res) > 0) {
+            while ($row = Database::fetch_row($res)) {
+                $user_ids[] = $row[0];
+            }
+            $without_user_id = " AND user.user_id NOT IN(".implode(',', $user_ids).") ";
+        }
+
+        $sql = "SELECT user_id, username, lastname, firstname FROM $tbl_user user
+                WHERE ".(api_sort_by_first_name() ? 'firstname' : 'lastname')." LIKE '$needle%' AND user_id<>'$user_anonymous' $without_user_id $order_clause ";
+        if (api_is_multiple_url_enabled()) {
+            $access_url_id = api_get_current_access_url_id();
+            if ($access_url_id != -1) {
+                $sql = "SELECT user.user_id, username, lastname, firstname FROM $tbl_user user
+                        INNER JOIN $tbl_user_rel_access_url url_user ON (url_user.user_id=user.user_id)
+                        WHERE access_url_id = '$access_url_id'
+                        AND ".(api_sort_by_first_name() ? 'firstname' : 'lastname')." LIKE '$needle%'
+                        AND user.user_id<>'$user_anonymous' $without_user_id $order_clause ";
+            }
+        }
+        $rs_origin_list = Database::query($sql);
+        while ($row_origin_list = Database::fetch_array($rs_origin_list)) {
+            $nosessionUsersList[$row_origin_list['user_id']] = $row_origin_list;
+        }
+    }
+
+    // data for destination list
+    if (isset($_POST['id']) && isset($_POST['relation'])) {
+        // data for destination user list
+        $id = intval($_POST['id']);
+        $relation_type = intval($_POST['relation']);
+        $condition_relation = " AND groups.relation_type = '$relation_type' ";
+
+        $sql = "SELECT user.user_id, user.username, user.lastname, user.firstname
+                FROM $tbl_group_rel_user groups
+                INNER JOIN  $tbl_user user ON user.user_id = groups.user_id
+                WHERE groups.group_id = '$id' $condition_relation ";
+        $rs_destination = Database::query($sql);
+        if (Database::num_rows($rs_destination) > 0) {
+            while ($row_destination_list = Database::fetch_array($rs_destination)) {
+                $sessionUsersList[$row_destination_list['user_id']] = $row_destination_list ;
+            }
+        }
+    }
 }
 
 if ($add_type == 'multiple') {
-	$link_add_type_unique = '<a href="'.api_get_self().'?id='.$group_id.'&add='.Security::remove_XSS($_GET['add']).'&add_type=unique">'.Display::return_icon('single.gif').get_lang('SessionAddTypeUnique').'</a>';
-	$link_add_type_multiple = Display::return_icon('multiple.gif').get_lang('SessionAddTypeMultiple');
+    $link_add_type_unique = '<a href="'.api_get_self().'?id='.$group_id.'&add_type=unique">'.Display::return_icon('single.gif').get_lang('SessionAddTypeUnique').'</a>';
+    $link_add_type_multiple = Display::return_icon('multiple.gif').get_lang('SessionAddTypeMultiple');
 } else {
-	$link_add_type_unique = Display::return_icon('single.gif').get_lang('SessionAddTypeUnique');
-	$link_add_type_multiple = '<a href="'.api_get_self().'?id='.$group_id.'&add='.Security::remove_XSS($_GET['add']).'&add_type=multiple">'.Display::return_icon('multiple.gif').get_lang('SessionAddTypeMultiple').'</a>';
+    $link_add_type_unique = Display::return_icon('single.gif').get_lang('SessionAddTypeUnique');
+    $link_add_type_multiple = '<a href="'.api_get_self().'?id='.$group_id.'&add_type=multiple">'.Display::return_icon('multiple.gif').get_lang('SessionAddTypeMultiple').'</a>';
 }
 ?>
 
@@ -386,8 +373,8 @@ if ($add_type == 'multiple') {
 	<?php echo $link_add_type_unique ?>&nbsp;|&nbsp;<?php echo $link_add_type_multiple ?>
 </div>
 
-<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $group_id; ?><?php if(!empty($_GET['add'])) echo '&add=true' ; ?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>>
-<?php echo '<legend>'.$tool_name.' ('.$group_info['name'].')</legend>'; ?>    
+<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $group_id; ?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>>
+<?php echo '<legend>'.$tool_name.' ('.$group_info['name'].')</legend>'; ?>
 <?php if ($add_type=='multiple') { ?>
 <select name="relation" id="relation" onchange="xajax_search_users(document.getElementById('firstLetterUser').value,'multiple',this.value)">
 <?php } else { ?>
@@ -395,73 +382,41 @@ if ($add_type == 'multiple') {
 <?php } ?>
 <option value=""><?php echo get_lang('SelectARelationType')?></option>
 <option value="<?php echo GROUP_USER_PERMISSION_ADMIN ?>" <?php echo ((isset($_POST['relation']) && $_POST['relation']==GROUP_USER_PERMISSION_ADMIN)?'selected=selected':'') ?> > <?php echo get_lang('Admin') ?></option>
-<option value="<?php echo GROUP_USER_PERMISSION_PENDING_INVITATION ?>" <?php echo ((isset($_POST['relation']) && $_POST['relation']==GROUP_USER_PERMISSION_PENDING_INVITATION)?'selected=selected':'') ?> > <?php echo get_lang('Reader') ?></option>
+<option value="<?php echo GROUP_USER_PERMISSION_READER ?>" <?php echo ((isset($_POST['relation']) && $_POST['relation']==GROUP_USER_PERMISSION_READER)?'selected=selected':'') ?> > <?php echo get_lang('Reader') ?></option>
+<option value="<?php echo GROUP_USER_PERMISSION_PENDING_INVITATION ?>" <?php echo ((isset($_POST['relation']) && $_POST['relation']==GROUP_USER_PERMISSION_PENDING_INVITATION)?'selected=selected':'') ?> > <?php echo get_lang('PendingInvitation') ?></option>
 <option value="<?php echo GROUP_USER_PERMISSION_MODERATOR ?>" <?php echo ((isset($_POST['relation']) && $_POST['relation']==GROUP_USER_PERMISSION_MODERATOR)?'selected=selected':'') ?> > <?php echo get_lang('Moderator') ?></option>
 <option value="<?php echo GROUP_USER_PERMISSION_HRM ?>" <?php echo ((isset($_POST['relation']) && $_POST['relation']==GROUP_USER_PERMISSION_HRM)?'selected=selected':'') ?> > <?php echo get_lang('Drh') ?></option>
 </select>
-
-<?php
-if ($add_type=='multiple') {
-	if (is_array($extra_field_list)) {
-		if (is_array($new_field_list) && count($new_field_list)>0 ) {
-			echo '<h3>'.get_lang('FilterUsers').'</h3>';
-			foreach ($new_field_list as $new_field) {
-				echo $new_field['name'];
-				$varname = 'field_'.$new_field['variable'];
-				echo '&nbsp;<select name="'.$varname.'">';
-				echo '<option value="0">--'.get_lang('Select').'--</option>';
-				foreach	($new_field['data'] as $option) {
-					$checked='';
-					if (isset($_POST[$varname])) {
-						if ($_POST[$varname]==$option[1]) {
-							$checked = 'selected="true"';
-						}
-					}
-					echo '<option value="'.$option[1].'" '.$checked.'>'.$option[1].'</option>';
-				}
-				echo '</select>';
-				echo '&nbsp;&nbsp;';
-			}
-			echo '<input type="button" value="'.get_lang('Filter').'" onclick="validate_filter()" />';
-			echo '<br /><br />';
-		}
-	}
-}
-?>
-
 <input type="hidden" name="form_sent" value="1" />
 <input type="hidden" name="id" value="<?php echo $group_id ?>" />
 <input type="hidden" name="add_type" value="<?php echo $add_type ?>" />
 
 <?php
-if(!empty($errorMsg)) {
-	Display::display_normal_message($errorMsg); //main API
+if (!empty($errorMsg)) {
+    Display::display_normal_message($errorMsg);
 }
 ?>
 
 <table border="0" cellpadding="5" cellspacing="0" width="100%">
-<!-- Users -->
 <tr>
   <td align="center"><b><?php echo get_lang('UserListInPlatform') ?> :</b>
   </td>
   <td>&nbsp;</td>
   <td align="center"><b><?php echo get_lang('UsersInGroup') ?> :</b></td>
 </tr>
-
 <?php if ($add_type=='multiple') { ?>
 <tr>
 <td align="center">
-
 <?php echo get_lang('FirstLetterUser'); ?> :
 	<div id="firstLetter">
-	     <select name="firstLetterUser" id="firstLetterUser" onchange = "xajax_search_users(this.value,'multiple',document.getElementById('relation').value)" >
-	      <option value = "%"><?php echo get_lang('All') ?></option>
-	      <?php
-	      	$selected_letter = isset($_POST['firstLetterUser'])?$_POST['firstLetterUser']:'';
-	        echo Display :: get_alphabet_options($selected_letter);
-	      ?>
+        <select name="firstLetterUser" id="firstLetterUser" onchange = "xajax_search_users(this.value,'multiple',document.getElementById('relation').value)" >
+            <option value = "%"><?php echo get_lang('All') ?></option>
+              <?php
+                $selected_letter = isset($_POST['firstLetterUser']) ? $_POST['firstLetterUser'] : null;
+                echo Display :: get_alphabet_options($selected_letter);
+              ?>
 	     </select>
-     </div>
+    </div>
 </td>
 <td align="center">&nbsp;</td>
 </tr>
@@ -480,7 +435,6 @@ if(!empty($errorMsg)) {
   	  <div id="ajax_origin_list_multiple">
 	  <select id="origin_users" name="nosessionUsersList[]" multiple="multiple" size="15" style="width:360px;">
 		<?php
-
 		if (!empty($nosessionUsersList)) {
 			foreach($nosessionUsersList as $enreg) {
 			?>
@@ -501,7 +455,7 @@ if(!empty($errorMsg)) {
   <?php
   if ($ajax_search) {
   ?>
-  	<button class="arrowl" type="button" onclick="remove_item(document.getElementById('destination_users'))" ></button>
+    <button class="arrowl" type="button" onclick="remove_item(document.getElementById('destination_users'))" ></button>
   <?php
   } else {
   ?>
@@ -519,9 +473,12 @@ if(!empty($errorMsg)) {
 	<?php
 	if (!empty($sessionUsersList)) {
 		foreach($sessionUsersList as $enreg) { ?>
-			<option value="<?php echo $enreg['user_id']; ?>"><?php echo $enreg['firstname'].' '.$enreg['lastname'].' ('.$enreg['username'].')'; ?></option>
+			<option value="<?php echo $enreg['user_id']; ?>">
+                <?php echo $enreg['firstname'].' '.$enreg['lastname'].' ('.$enreg['username'].')'; ?>
+            </option>
 	<?php }
-	} unset($sessionUsersList);?>
+	} unset($sessionUsersList);
+    ?>
   </select>
   </div>
   </td>
@@ -538,11 +495,9 @@ if(!empty($errorMsg)) {
 </form>
 
 <script>
-<!--
-function moveItem(origin , destination){
-
-	for(var i = 0 ; i<origin.options.length ; i++) {
-		if(origin.options[i].selected) {
+function moveItem(origin , destination) {
+	for (var i = 0 ; i<origin.options.length ; i++) {
+		if (origin.options[i].selected) {
 			destination.options[destination.length] = new Option(origin.options[i].text,origin.options[i].value);
 			origin.options[i]=null;
 			i = i-1;
@@ -554,7 +509,6 @@ function moveItem(origin , destination){
 }
 
 function sortOptions(options) {
-
 	newOptions = new Array();
 	for (i = 0 ; i<options.length ; i++)
 		newOptions[i] = options[i];
@@ -566,18 +520,17 @@ function sortOptions(options) {
 
 }
 
-function mysort(a, b){
-	if(a.text.toLowerCase() > b.text.toLowerCase()){
+function mysort(a, b) {
+	if (a.text.toLowerCase() > b.text.toLowerCase()){
 		return 1;
 	}
-	if(a.text.toLowerCase() < b.text.toLowerCase()){
+	if (a.text.toLowerCase() < b.text.toLowerCase()){
 		return -1;
 	}
 	return 0;
 }
 
 function valide() {
-
 	var relation_select = document.getElementById('relation');
 	if (relation_select && relation_select.value=="") {
 		alert("<?php echo get_lang('YouMustChooseARelationType')?>");
@@ -590,24 +543,19 @@ function valide() {
 	}
 }
 
-
-function loadUsersInSelect(select){
-
+function loadUsersInSelect(select) {
 	var xhr_object = null;
 
-	if(window.XMLHttpRequest) // Firefox
+	if (window.XMLHttpRequest) // Firefox
 		xhr_object = new XMLHttpRequest();
 	else if(window.ActiveXObject) // Internet Explorer
 		xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
 	else  // XMLHttpRequest non supporté par le navigateur
 	alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");
 
-	//xhr_object.open("GET", "loadUsersInSelect.ajax.php?id_session=<?php echo $id_session ?>&letter="+select.options[select.selectedIndex].text, false);
 	xhr_object.open("POST", "loadUsersInSelect.ajax.php");
-
 	xhr_object.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
 
-
 	nosessionUsers = makepost(document.getElementById('origin_users'));
 	sessionUsers = makepost(document.getElementById('destination_users'));
 	nosessionClasses = makepost(document.getElementById('origin_classes'));
@@ -622,19 +570,14 @@ function loadUsersInSelect(select){
 	}
 }
 
-function makepost(select){
-
+function makepost(select) {
 	var options = select.options;
 	var ret = "";
 	for (i = 0 ; i<options.length ; i++)
 		ret = ret + options[i].value +'::'+options[i].text+";;";
-
 	return ret;
-
 }
--->
-
 </script>
 <?php
-/*  FOOTER */
-Display::display_footer();
+
+Display::display_footer();

+ 1 - 1
main/admin/add_users_to_usergroup.php

@@ -157,6 +157,7 @@ if ($use_extra_fields) {
         $final_result = $extra_field_result[0];
     }
 }
+
 // Filters
 $filters = array(
     array('type' => 'text', 'name' => 'username', 'label' => get_lang('Username')),
@@ -175,7 +176,6 @@ foreach ($filters as $param) {
     $searchForm->addElement($param['type'], $param['name'], $param['label']);
 }
 $searchForm->addElement('button', 'submit', get_lang('Search'));
-//$searchForm->addElement('html', '</table>');
 
 $filterData = array();
 if ($searchForm->validate()) {

+ 17 - 9
main/admin/user_list.php

@@ -752,12 +752,21 @@ if (!empty($action)) {
 }
 
 // Create a search-box
-$form = new FormValidator('search_simple','get', '', '', array('class' => 'form-search'),false);
-$renderer =& $form->defaultRenderer();
+$form = new FormValidator('search_simple', 'get', '', '', array('class' => 'form-search'), false);
+$renderer = & $form->defaultRenderer();
 $renderer->setElementTemplate('<span>{element}</span> ');
-$form->addElement('text','keyword',get_lang('keyword'), 'size="25"');
-$form->addElement('style_submit_button', 'submit',get_lang('Search'),'class="btn"');
-$form->addElement('static','search_advanced_link',null,'<a href="javascript://" class = "advanced_parameters" onclick="display_advanced_search_form();"><span id="img_plus_and_minus">&nbsp;'.Display::return_icon('div_show.gif',get_lang('Show'),array('style'=>'vertical-align:middle')).' '.get_lang('AdvancedSearch').'</span></a>');
+$form->addElement('text','keyword', get_lang('keyword'), 'size="25"');
+$form->addElement('style_submit_button', 'submit', get_lang('Search'),'class="btn"');
+$form->addElement(
+    'static',
+    'search_advanced_link',
+    null,
+    '<a href="javascript://" class = "advanced_parameters" onclick="display_advanced_search_form();">
+        <span id="img_plus_and_minus">&nbsp;'.
+        Display::return_icon('div_show.gif', get_lang('Show'), array('style'=>'vertical-align:middle')).' '.get_lang('AdvancedSearch').'
+        </span>
+    </a>'
+);
 
 $actions  = '';
 if (api_is_platform_admin()) {
@@ -765,7 +774,7 @@ if (api_is_platform_admin()) {
 		 '<a href="'.api_get_path(WEB_CODE_PATH).'admin/user_add.php">'.Display::return_icon('new_user.png',get_lang('AddUsers'),'',ICON_SIZE_MEDIUM).'</a>'.
 		 '</span>';
 }
-$actions .=$form->return_form();
+$actions .= $form->return_form();
 
 if (isset ($_GET['keyword'])) {
 	$parameters = array ('keyword' => Security::remove_XSS($_GET['keyword']));
@@ -791,8 +800,8 @@ while ($row_admin = Database::fetch_row($res_admin)) {
 	$_admins_list[] = $row_admin[0];
 }
 
-// display advaced search form
-$form = new FormValidator('advanced_search','get');
+// Display Advanced search form.
+$form = new FormValidator('advanced_search', 'get');
 
 $form->addElement('html','<div id="advanced_search_form" style="display:none;">');
 $form->addElement('header', get_lang('AdvancedSearch'));
@@ -823,7 +832,6 @@ $status_options[DRH] = get_lang('Drh');
 $status_options[SESSIONADMIN] = get_lang('Administrator');
 $form->addElement('select','keyword_status',get_lang('Profile'),$status_options, array('style'=>'margin-left:17px'));
 $form->addElement('html', '</td></tr>');
-
 $form->addElement('html', '<tr><td>');
 $active_group = array();
 $active_group[] = $form->createElement('checkbox','keyword_active','', get_lang('Active'));

+ 24 - 46
main/chat/chat.php

@@ -16,19 +16,21 @@ require_once api_get_path(LIBRARY_PATH).'groupmanager.lib.php';
 $this_section = SECTION_COURSES;
 $nameTools = get_lang('ToolChat');
 
-if ($_GET["origin"] != 'whoisonline') {
-	api_protect_course_script(true);
+$origin = isset($_GET["origin"]) ? Security::remove_XSS($_GET["origin"]) : null;
+$target = isset($_GET["target"]) ? Security::remove_XSS($_GET["target"]) : null;
+
+if ($origin != 'whoisonline') {
+    api_protect_course_script(true);
 } else {
-	$origin = $_SESSION['origin'];
-	$target = $_SESSION['target'];
-	$_SESSION['origin']= Security::remove_XSS($_GET["origin"]);
-	$_SESSION['target']= Security::remove_XSS($_GET["target"]);
+    $origin = $_SESSION['origin'];
+    $target = $_SESSION['target'];
+    $_SESSION['origin']= $origin;
+    $_SESSION['target']= $target;
 }
 
 /*  TRACKING */
 
 event_access_tool(TOOL_CHAT);
-
 header('Content-Type: text/html; charset='.api_get_system_encoding());
 
 /*
@@ -43,67 +45,43 @@ if (!empty($mycourseid) && $mycourseid != -1) {
 
 $cidreq = Security::remove_XSS($_GET['cidReq']);
 
-$toolgroup = Security::remove_XSS($_GET['toolgroup']); //fix when change by vertical or horizontal menu from a chat group to chat course.
-if (empty($toolgroup) && empty($open_chat_window)){
-	unset($_SESSION['_gid']);
-}
-
-
 ?>
-<!DOCTYPE html
-     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo api_get_language_isocode(); ?>" lang="<?php echo api_get_language_isocode(); ?>">
+<!DOCTYPE html>
+<html>
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=<?php echo api_get_system_encoding(); ?>" />
+<meta charset="<?php echo api_get_system_encoding(); ?>" />
 <?php
 echo'<title>'.get_lang('Chat').' - '.$mycourseid.' - '.api_get_setting('siteName').'</title>';
 
-// If it is a group chat then the breadcrumbs.
-if ($_SESSION['_gid'] OR $_GET['group_id']) {
-
-	if (isset($_SESSION['_gid'])) {
-		$_clean['group_id'] = (int)$_SESSION['_gid'];
-	}
-	if (isset($_GET['group_id'])) {
-		$_clean['group_id'] = (int)Database::escape_string($_GET['group_id']);
-	}
+$groupId = api_get_group_id();
 
-	$group_properties  = GroupManager :: get_group_properties($_clean['group_id']);
+// If it is a group chat then the breadcrumbs.
+if (!empty($groupId)) {
+	$group_properties  = GroupManager :: get_group_properties($groupId);
 	$interbreadcrumb[] = array('url' => '../group/group.php', 'name' => get_lang('Groups'));
-	$interbreadcrumb[] = array('url' => '../group/group_space.php?gidReq='.api_get_group_id(), 'name' => get_lang('GroupSpace').' '.$group_properties['name']);
+	$interbreadcrumb[] = array(
+        'url' => '../group/group_space.php?gidReq='.api_get_group_id(),
+        'name' => get_lang('GroupSpace').' '.$group_properties['name']
+    );
 	$noPHP_SELF = true;
 	$shortBanner = false;
 	$add_group_to_title = ' ('.$group_properties['name'].')';
-	$groupfilter = 'group_id="'.$_clean['group_id'].'"';
-
-	// Ensure this tool in groups whe it's private or deactivated
-	/*if ($group_properties['chat_state'] == 0) {
-		echo api_not_allowed();
-	} elseif ($group_properties['chat_state'] == 2) {
- 		if (!api_is_allowed_to_edit(false,true) and !GroupManager :: is_user_in_group($_user['user_id'], $_SESSION['_gid'])) {
-			echo api_not_allowed();
-		}
-	}*/
-
+	$groupfilter = 'group_id="'.$groupId.'"';
 } else {
 	$groupfilter = 'group_id=0';
 }
 
-//$is_allowed_to_edit = api_is_allowed_to_edit(false, true);
-
-
 if (empty($open_chat_window)) {
-	Display::display_header($tool_name, 'Chat');
+    Display::display_header($tool_name, 'Chat');
 }
 
 echo '<iframe src="chat_whoisonline.php?cidReq='.$cidreq.'" name="chat_whoisonline" scrolling="auto" style="height:320px; width:19%; border: 0px none; float:left"></iframe>';
-echo '<iframe src="chat_chat.php?origin='.Security::remove_XSS($_GET['origin']).'&target='.Security::remove_XSS($_GET['target']).'&amp;cidReq='.$cidreq.'" name="chat_chat" scrolling="auto" height="240" style="width:80%; border: 0px none; float:right"></iframe>';
+echo '<iframe src="chat_chat.php?origin='.$origin.'&target='.$target.'&amp;cidReq='.$cidreq.'" name="chat_chat" scrolling="auto" height="240" style="width:80%; border: 0px none; float:right"></iframe>';
 echo '<iframe src="chat_message.php?cidReq='.$cidreq.'" name="chat_message" scrolling="no" height="80" style="width:80%; border: 0px none; float:right"></iframe>';
 echo '<iframe src="chat_hidden.php?cidReq='.$cidreq.'" name="chat_hidden" height="0" style="border: 0px none"></iframe>';
 
 if (empty($open_chat_window)) {
-	Display::display_footer();
+    Display::display_footer();
 }
 
 echo '</html>';

+ 46 - 51
main/chat/chat_chat.php

@@ -20,52 +20,52 @@ require_once api_get_path(LIBRARY_PATH).'fileUpload.lib.php';
 require_once api_get_path(LIBRARY_PATH).'groupmanager.lib.php';
 
 $course = $_GET['cidReq'];
-$session_id = intval($_SESSION['id_session']);
-$group_id 	= intval($_SESSION['_gid']);
+$session_id = api_get_session_id();
+$group_id 	= api_get_group_id();
 
 // if we have the session set up
 if (!empty($course)) {
-	$reset = (bool)$_GET['reset'];
-	$tbl_user = Database::get_main_table(TABLE_MAIN_USER);
-	$query = "SELECT username FROM $tbl_user WHERE user_id='".intval($_user['user_id'])."'";
-	$result = Database::query($query);
-
-	list($pseudo_user) = Database::fetch_row($result);
-
-	$isAllowed = !(empty($pseudo_user) || !$_cid);
-	$isMaster = (bool)$is_courseAdmin;
-
-	$date_now = date('Y-m-d');
-	$basepath_chat = '';
-	$document_path = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document';
-	if (!empty($group_id)) {
-		$group_info = GroupManager :: get_group_properties($group_id);
-		$basepath_chat = $group_info['directory'].'/chat_files';
-	} else {
-		$basepath_chat = '/chat_files';
-	}
-	$chat_path = $document_path.$basepath_chat.'/';
-
-	$TABLEITEMPROPERTY = Database::get_course_table(TABLE_ITEM_PROPERTY);
-
-	$course_id = api_get_course_int_id();
-
-	if (!is_dir($chat_path)) {
-		if (is_file($chat_path)) {
-			@unlink($chat_path);
-		}
-
-		if (!api_is_anonymous()) {
-			@mkdir($chat_path, api_get_permissions_for_new_directories());
-			// Save chat files document for group into item property
-			if (!empty($group_id)) {
-				$doc_id = add_document($_course, $basepath_chat, 'folder', 0, 'chat_files');
-				$sql = "INSERT INTO $TABLEITEMPROPERTY (c_id, tool,insert_user_id,insert_date,lastedit_date,ref,lastedit_type,lastedit_user_id,to_group_id,to_user_id,visibility)
-						VALUES ($course_id, 'document',1,NOW(),NOW(),$doc_id,'FolderCreated',1,$group_id,NULL,0)";
-				Database::query($sql);
-			}
-		}
-	}
+    $reset = isset($_GET['reset']) ? (bool)$_GET['reset'] : null;
+    $tbl_user = Database::get_main_table(TABLE_MAIN_USER);
+    $query = "SELECT username FROM $tbl_user WHERE user_id='".intval($_user['user_id'])."'";
+    $result = Database::query($query);
+
+    list($pseudo_user) = Database::fetch_row($result);
+
+    $isAllowed = !(empty($pseudo_user) || !$_cid);
+    $isMaster = (bool)$is_courseAdmin;
+
+    $date_now = date('Y-m-d');
+    $basepath_chat = '';
+    $document_path = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document';
+    if (!empty($group_id)) {
+        $group_info = GroupManager :: get_group_properties($group_id);
+        $basepath_chat = $group_info['directory'].'/chat_files';
+    } else {
+        $basepath_chat = '/chat_files';
+    }
+    $chat_path = $document_path.$basepath_chat.'/';
+
+    $TABLEITEMPROPERTY = Database::get_course_table(TABLE_ITEM_PROPERTY);
+
+    $course_id = api_get_course_int_id();
+
+    if (!is_dir($chat_path)) {
+        if (is_file($chat_path)) {
+            @unlink($chat_path);
+        }
+
+        if (!api_is_anonymous()) {
+            @mkdir($chat_path, api_get_permissions_for_new_directories());
+            // Save chat files document for group into item property
+            if (!empty($group_id)) {
+                $doc_id = add_document($_course, $basepath_chat, 'folder', 0, 'chat_files');
+                $sql = "INSERT INTO $TABLEITEMPROPERTY (c_id, tool,insert_user_id,insert_date,lastedit_date,ref,lastedit_type,lastedit_user_id,to_group_id,to_user_id,visibility)
+                        VALUES ($course_id, 'document',1,NOW(),NOW(),$doc_id,'FolderCreated',1,$group_id,NULL,0)";
+                Database::query($sql);
+            }
+        }
+    }
 
 	$filename_chat = '';
 	if (!empty($group_id)) {
@@ -132,10 +132,10 @@ if (!empty($course)) {
 	array_splice($content, 0, $remove);
 	require 'header_frame.inc.php';
 
-	if ($_GET['origin'] == 'whoisonline') {  //the caller
+	if (isset($_GET['origin']) && $_GET['origin'] == 'whoisonline') {  //the caller
 		$content[0] = get_lang('CallSent').'<br />'.$content[0];
 	}
-	if ($_GET['origin'] == 'whoisonlinejoin') {   //the joiner (we have to delete the chat request to him when he joins the chat)
+	if (isset($_GET['origin']) && $_GET['origin'] == 'whoisonlinejoin') {   //the joiner (we have to delete the chat request to him when he joins the chat)
 		$track_user_table = Database::get_main_table(TABLE_MAIN_USER);
 		$sql = "UPDATE $track_user_table set chatcall_user_id = '', chatcall_date = '', chatcall_text='' WHERE (user_id = ".$_user['user_id'].")";
 		$result = Database::query($sql);
@@ -146,12 +146,7 @@ if (!empty($course)) {
 		echo strip_tags(api_html_entity_decode($this_line), '<br> <span> <b> <i> <img> <font>');
 	}
 	echo '</div>';
-
-	?>
-
-	<a name="bottom" style="text-decoration:none;">&nbsp;</a>
-
-	<?php
+	echo '<a name="bottom" style="text-decoration:none;">&nbsp;</a>';
 	if ($isMaster || $is_courseCoach) {
 		$rand = mt_rand(1, 1000);
 		echo '<div style="margin-left: 5px;">';

+ 34 - 32
main/chat/chat_functions.lib.php

@@ -3,24 +3,24 @@
 /**
  *	@package chamilo.chat
  */
- 
+
 
 /**
  * @author isaac flores paz
  * @param integer the user id
- * @param string the database name
  * @return boolean
  * @todo this function need more parameters seems not to be use anymore
  * @deprecated fix this function or create another
  */
-function user_connected_in_chat ($user_id) {
+function user_connected_in_chat ($user_id)
+{
  	$tbl_chat_connected = Database::get_course_table(TABLE_CHAT_CONNECTED);
     $user_id 	= intval($user_id);
  	$session_id = api_get_session_id();
-    $group_id   = api_get_group_id();	
-    $course_id  = api_get_course_int_id();    
+    $group_id   = api_get_group_id();
+    $course_id  = api_get_course_int_id();
 	$extra_condition = '';
-	
+
 	if (!empty($group_id)) {
 		$extra_condition = " AND to_group_id = '$group_id'";
 	} else {
@@ -37,13 +37,14 @@ function user_connected_in_chat ($user_id) {
  * @param integer
  * @return void
  */
-function exit_of_chat($user_id) {
-	$user_id = intval($user_id);    
- 	$list_course = CourseManager::get_courses_list_by_user_id($user_id);    
-    
+function exit_of_chat($user_id)
+{
+    $user_id = intval($user_id);
+    $list_course = CourseManager::get_courses_list_by_user_id($user_id);
+
     /*$session_id = api_get_session_id();
-    $group_id   = api_get_group_id();	
-	
+    $group_id   = api_get_group_id();
+
 	$extra_condition = '';
 	if (!empty($group_id)) {
 		$extra_condition = " AND to_group_id = '$group_id'";
@@ -51,28 +52,28 @@ function exit_of_chat($user_id) {
 		$extra_condition = api_get_session_condition($session_id);
 	}
     $extra_condition.= " AND course_id = $course_id";*/
-    
+
     $tbl_chat_connected = Database::get_course_table(TABLE_CHAT_CONNECTED);
-    
- 	foreach ($list_course as $course) {
- 		$response = user_connected_in_chat($user_id);
- 		//if ($response === true) {
- 			$sql = 'DELETE FROM '.$tbl_chat_connected.' WHERE c_id = '.$course['real_id'].' AND user_id = '.$user_id;
- 			Database::query($sql);
- 		//}
- 	}
+
+    foreach ($list_course as $course) {
+        $response = user_connected_in_chat($user_id);
+        //if ($response === true) {
+            $sql = 'DELETE FROM '.$tbl_chat_connected.' WHERE c_id = '.$course['real_id'].' AND user_id = '.$user_id;
+            Database::query($sql);
+        //}
+    }
 }
 
 /**
- * @param string $database_name (optional)
  * @return void
  */
-function disconnect_user_of_chat() {
+function disconnect_user_of_chat()
+{
 	$list_info_user_in_chat = array();
     $course_id = api_get_course_int_id();
     $list_info_user_in_chat = users_list_in_chat();
     $course_id = api_get_course_int_id();
-    
+
 	$cd_date           = date('Y-m-d',time());
 	$cdate_h           = date('H',time());
 	$cdate_m           = date('i',time());
@@ -87,9 +88,10 @@ function disconnect_user_of_chat() {
 			$date_db_s  = date('s', strtotime($list_info_user['last_connection']));
 			$date_count_time_seconds=$date_db_h*3600 + $date_db_m*60 + $date_db_s;
 			if ($cd_date == $date_db_date) {
-				if (($cd_count_time_seconds - $date_count_time_seconds) > 5) {					
-                    $tbl_chat_connected = Database::get_course_table(TABLE_CHAT_CONNECTED);					
-			 		$sql = 'DELETE FROM '.$tbl_chat_connected.' WHERE c_id = '.$course_id.' AND user_id ='.$list_info_user['user_id'];
+				if (($cd_count_time_seconds - $date_count_time_seconds) > 5) {
+                    $tbl_chat_connected = Database::get_course_table(TABLE_CHAT_CONNECTED);
+			 		$sql = 'DELETE FROM '.$tbl_chat_connected.'
+			 		        WHERE c_id = '.$course_id.' AND user_id ='.$list_info_user['user_id'];
 			 		Database::query($sql);
 				}
 			}
@@ -98,17 +100,17 @@ function disconnect_user_of_chat() {
 }
 
 /**
- * @param string $database_name (optional)
  * @return array user list in chat
  */
-function users_list_in_chat() {
+function users_list_in_chat()
+{
 	$list_users_in_chat = array();
  	$tbl_chat_connected = Database::get_course_table(TABLE_CHAT_CONNECTED);
     $course_id = api_get_course_int_id();
-    
+
  	$session_id = api_get_session_id();
     $group_id   = api_get_group_id();
-    
+
 	$extra_condition = '';
 	if (!empty($group_id)) {
 		$extra_condition = " WHERE to_group_id = '$group_id'";
@@ -122,4 +124,4 @@ function users_list_in_chat() {
  		$list_users_in_chat[] = $row;
  	}
  	return $list_users_in_chat;
-}
+}

+ 17 - 16
main/chat/chat_hidden.php

@@ -34,8 +34,8 @@ $isMaster = (bool)$is_courseAdmin;
 
 $date_now = date('Y-m-d');
 
-$group_id = intval($_SESSION['_gid']);
-$session_id = intval($_SESSION['id_session']);
+$group_id = api_get_group_id();
+$session_id = api_get_session_id();
 $session_condition = api_get_session_condition($session_id);
 $group_condition = " AND to_group_id = '$group_id'";
 
@@ -68,7 +68,7 @@ if (!empty($group_id)) {
 	$basename_chat = 'messages-'.$date_now;
 }
 
-$chat_size_old = intval($_POST['chat_size_old']);
+$chat_size_old = isset($_POST['chat_size_old']) ? intval($_POST['chat_size_old']) : null;
 
 $file = $chat_path.$basename_chat.'.log.html';
 $chat_size_new = 0;
@@ -92,7 +92,7 @@ Database::query($query);
 $query = "SELECT COUNT(user_id) FROM $tbl_chat_connected WHERE last_connection>'".date('Y-m-d H:i:s',time()-60*5)."' $extra_condition";
 $result = Database::query($query);
 
-$connected_old = intval($_POST['connected_old']);
+$connected_old = isset($_POST['connected_old']) ? intval($_POST['connected_old']) : null;
 list($connected_new) = Database::fetch_row($result);
 /*disconnected user of chat*/
 disconnect_user_of_chat ();
@@ -104,16 +104,17 @@ require 'header_frame.inc.php';
 </form>
 <?php
 
-if ($_SESSION["origin"] == 'whoisonline') {  //check if our target has denied our request or not
-	$talk_to = $_SESSION["target"];
-	$track_user_table = Database::get_main_table(TABLE_MAIN_USER);
-	$sql = "select chatcall_text from $track_user_table where ( user_id = $talk_to )";
-	$result = Database::query($sql);
-	$row = Database::fetch_array($result);
-	if ($row['chatcall_text'] == 'DENIED') {
-		echo "<script language=\"javascript\" type=\"text/javascript\"> alert('".get_lang('ChatDenied')."'); </script>";
-		$sql = "update $track_user_table set chatcall_user_id = '', chatcall_date = '', chatcall_text='' WHERE (user_id = $talk_to)";
-		$result = Database::query($sql);
-	}
+if (isset($_SESSION["origin"]) && $_SESSION["origin"] == 'whoisonline') {
+    //check if our target has denied our request or not
+    $talk_to = $_SESSION["target"];
+    $track_user_table = Database::get_main_table(TABLE_MAIN_USER);
+    $sql = "select chatcall_text from $track_user_table where ( user_id = $talk_to )";
+    $result = Database::query($sql);
+    $row = Database::fetch_array($result);
+    if ($row['chatcall_text'] == 'DENIED') {
+        echo "<script language=\"javascript\" type=\"text/javascript\"> alert('".get_lang('ChatDenied')."'); </script>";
+        $sql = "update $track_user_table set chatcall_user_id = '', chatcall_date = '', chatcall_text='' WHERE (user_id = $talk_to)";
+        $result = Database::query($sql);
+    }
 }
-require 'footer_frame.inc.php';
+require 'footer_frame.inc.php';

+ 47 - 47
main/chat/chat_message.php

@@ -66,60 +66,60 @@ if (!empty($course) && !empty($_user['user_id'])) {
 
 	/*	Constants and variables */
 
-	$tbl_user	= Database::get_main_table(TABLE_MAIN_USER);
-	$sent 		= $_REQUEST['sent'];
+    $tbl_user	= Database::get_main_table(TABLE_MAIN_USER);
+    $sent 		= isset($_REQUEST['sent']) ? $_REQUEST['sent'] : null;
 
-	/*	MAIN CODE */
+    /*	MAIN CODE */
 
-	$query = "SELECT lastname, firstname, username FROM $tbl_user WHERE user_id='".intval($_user['user_id'])."'";
-	$result = Database::query($query);
+    $query = "SELECT lastname, firstname, username FROM $tbl_user WHERE user_id='".intval($_user['user_id'])."'";
+    $result = Database::query($query);
 
-	list($pseudo_user) = Database::fetch_row($result);
+    list($pseudo_user) = Database::fetch_row($result);
 
-	$isAllowed = !(empty($pseudo_user) || !$_cid);
-	$isMaster = (bool)$is_courseAdmin;
+    $isAllowed = !(empty($pseudo_user) || !$_cid);
+    $isMaster = (bool)$is_courseAdmin;
 
-	$firstname = Database::result($result, 0, 'firstname');
-	$lastname  = Database::result($result, 0, 'lastname');
+    $firstname = Database::result($result, 0, 'firstname');
+    $lastname  = Database::result($result, 0, 'lastname');
 
-	$date_now = date('Y-m-d');
+    $date_now = date('Y-m-d');
 
-	$basepath_chat = '';
-	$document_path = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document';
-	if (!empty($group_id)) {
-		$group_info = GroupManager :: get_group_properties($group_id);
-		$basepath_chat = $group_info['directory'].'/chat_files';
-	} else {
-		$basepath_chat = '/chat_files';
-	}
-	$chat_path = $document_path.$basepath_chat.'/';
+    $basepath_chat = '';
+    $document_path = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document';
+    if (!empty($group_id)) {
+        $group_info = GroupManager :: get_group_properties($group_id);
+        $basepath_chat = $group_info['directory'].'/chat_files';
+    } else {
+        $basepath_chat = '/chat_files';
+    }
+    $chat_path = $document_path.$basepath_chat.'/';
 
-	if (!is_dir($chat_path)) {
-		if (is_file($chat_path)) {
-			@unlink($chat_path);
-		}
-	}
+    if (!is_dir($chat_path)) {
+        if (is_file($chat_path)) {
+            @unlink($chat_path);
+        }
+    }
 
-	require 'header_frame.inc.php';
-	$chat_size = 0;
+    require 'header_frame.inc.php';
+    $chat_size = 0;
 
 	// Define emoticons
-	$emoticon_text1 = ':-)';
-	$emoticon_img1  = '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_smile.gif" alt="'.get_lang('Smile').'" title="'.get_lang('Smile').'" />';
-	$emoticon_text2 = ':-D';
-	$emoticon_img2  = '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_biggrin.gif" alt="'.get_lang('BigGrin').'" title="'.get_lang('BigGrin').'" />';
-	$emoticon_text3 = ';-)';
-	$emoticon_img3  = '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_wink.gif" alt="'.get_lang('Wink').'" title="'.get_lang('Wink').'" />';
-	$emoticon_text4 = ':-P';
-	$emoticon_img4  = '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_razz.gif" alt="'.get_lang('Avid').'" title="'.get_lang('Avid').'" />';
-	$emoticon_text5 = '8-)';
-	$emoticon_img5  = '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_cool.gif" alt="'.get_lang('Cool').'" title="'.get_lang('Cool').'" />';
-	$emoticon_text6 = ':-o)';
-	$emoticon_img6  = '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_surprised.gif" alt="'.get_lang('Surprised').'" title="'.get_lang('Surprised').'" />';
-	$emoticon_text7 = '=;';
-	$emoticon_img7  = '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_hand.gif" alt="'.get_lang('Hand').'" title="'.get_lang('Hand').'" />';
-	$emoticon_text8 = '=8-o';
-	$emoticon_img8  = '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_eek.gif" alt="'.get_lang('Amazing').'" title="'.get_lang('Amazing').'" />';
+    $emoticon_text1 = ':-)';
+    $emoticon_img1  = '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_smile.gif" alt="'.get_lang('Smile').'" title="'.get_lang('Smile').'" />';
+    $emoticon_text2 = ':-D';
+    $emoticon_img2  = '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_biggrin.gif" alt="'.get_lang('BigGrin').'" title="'.get_lang('BigGrin').'" />';
+    $emoticon_text3 = ';-)';
+    $emoticon_img3  = '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_wink.gif" alt="'.get_lang('Wink').'" title="'.get_lang('Wink').'" />';
+    $emoticon_text4 = ':-P';
+    $emoticon_img4  = '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_razz.gif" alt="'.get_lang('Avid').'" title="'.get_lang('Avid').'" />';
+    $emoticon_text5 = '8-)';
+    $emoticon_img5  = '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_cool.gif" alt="'.get_lang('Cool').'" title="'.get_lang('Cool').'" />';
+    $emoticon_text6 = ':-o)';
+    $emoticon_img6  = '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_surprised.gif" alt="'.get_lang('Surprised').'" title="'.get_lang('Surprised').'" />';
+    $emoticon_text7 = '=;';
+    $emoticon_img7  = '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_hand.gif" alt="'.get_lang('Hand').'" title="'.get_lang('Hand').'" />';
+    $emoticon_text8 = '=8-o';
+    $emoticon_img8  = '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_eek.gif" alt="'.get_lang('Amazing').'" title="'.get_lang('Amazing').'" />';
 	$emoticon_text9 = ':-|)';
 	$emoticon_img9  = '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_neutral.gif" alt="'.get_lang('Neutral').'" title="'.get_lang('Neutral').'" />';
 	$emoticon_text8 = ':-k';
@@ -165,7 +165,7 @@ if (!empty($course) && !empty($_user['user_id'])) {
 		$message = str_replace($emoticon_text7, $emoticon_img7, $message);
 		$message = str_replace($emoticon_text8, $emoticon_img8, $message);
 		$message = str_replace($emoticon_text9, $emoticon_img9, $message);
-		$message = str_replace($emoticon_text10, $emoticon_img10, $message);
+		//$message = str_replace($emoticon_text10, $emoticon_img10, $message);
 		$message = str_replace($emoticon_text11, $emoticon_img11, $message);
 		$message = str_replace($emoticon_text12, $emoticon_img12, $message);
 		$message = str_replace($emoticon_text13, $emoticon_img13, $message);
@@ -195,7 +195,7 @@ if (!empty($course) && !empty($_user['user_id'])) {
 
 		if (!api_is_anonymous()) {
 			if (!empty($message)) {
-				$message = make_clickable($message);
+				//$message = make_clickable($message);
                 if (!file_exists($chat_path.$basename_chat.'.log.html')) {
 					$doc_id = add_document($_course, $basepath_chat.'/'.$basename_chat.'.log.html', 'file', 0, $basename_chat.'.log.html');
 
@@ -250,7 +250,7 @@ if (!empty($course) && !empty($_user['user_id'])) {
 		echo  "<a href=\"javascript:insert('".$emoticon_text7."')\">".$emoticon_img7."</a>";
 		echo  "<a href=\"javascript:insert('".$emoticon_text8."')\">".$emoticon_img8."</a>";
 		echo  "<a href=\"javascript:insert('".$emoticon_text9."')\">".$emoticon_img9."</a>";
-		echo  "<a href=\"javascript:insert('".$emoticon_text10."')\">".$emoticon_img10."</a>";
+		//echo  "<a href=\"javascript:insert('".$emoticon_text10."')\">".$emoticon_img10."</a>";
 		echo  "<a href=\"javascript:insert('".$emoticon_text11."')\">".$emoticon_img11."</a>";
 		echo  "<a href=\"javascript:insert('".$emoticon_text12."')\">".$emoticon_img12."</a>";
 		echo  "<a href=\"javascript:insert('".$emoticon_text13."')\">".$emoticon_img13."</a>";
@@ -276,4 +276,4 @@ if (!empty($course) && !empty($_user['user_id'])) {
     </form>
 <?php
 }
-require 'footer_frame.inc.php';
+require 'footer_frame.inc.php';

+ 48 - 53
main/chat/chat_whoisonline.php

@@ -15,70 +15,72 @@ $language_file = array('chat');
 require_once '../inc/global.inc.php';
 
 $course = api_get_course_id();
-$group_id = intval($_SESSION['_gid']);
-$session_id = intval($_SESSION['id_session']);
+$group_id = api_get_group_id();
+$session_id = api_get_session_id();
 $session_condition = api_get_session_condition($session_id);
 $group_condition = " AND to_group_id = '$group_id'";
 
 $extra_condition = '';
 if (!empty($group_id)) {
-	$extra_condition = $group_condition;
+    $extra_condition = $group_condition;
 } else {
-	$extra_condition = $session_condition;
+    $extra_condition = $session_condition;
 }
 
 $user_id = api_get_user_id();
 
 if (!empty($course)) {
-	$showPic = intval($_GET['showPic']);
-	$tbl_course_user			= Database::get_main_table(TABLE_MAIN_COURSE_USER);
-	$tbl_session_course_user	= Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER);
-	$tbl_session				= Database::get_main_table(TABLE_MAIN_SESSION);
-	$tbl_session_course			= Database::get_main_table(TABLE_MAIN_SESSION_COURSE);
-	$tbl_user					= Database::get_main_table(TABLE_MAIN_USER);
-	$tbl_chat_connected			= Database::get_course_table(TABLE_CHAT_CONNECTED);
-
-	$query = "SELECT username FROM $tbl_user WHERE user_id='".$user_id."'";
-	$result = Database::query($query);
-
-	list($pseudo_user) = Database::fetch_array($result);
-
-	$isAllowed = !(empty($pseudo_user) || !$_cid);
-	$isMaster = (bool)$is_courseAdmin;
-
-	$date_inter = date('Y-m-d H:i:s', time() - 120);
-
-	$users = array();
-	$course_id = api_get_course_int_id();
-	
-	if (empty($session_id)) {
-		$query = "SELECT DISTINCT t1.user_id,username,firstname,lastname,picture_uri,t3.status 
-				  FROM $tbl_user t1, $tbl_chat_connected t2, $tbl_course_user t3 
+    $showPic = isset($_GET['showPic']) ? intval($_GET['showPic']) : null;
+    $tbl_course_user			= Database::get_main_table(TABLE_MAIN_COURSE_USER);
+    $tbl_session_course_user	= Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER);
+    $tbl_session				= Database::get_main_table(TABLE_MAIN_SESSION);
+    $tbl_session_course			= Database::get_main_table(TABLE_MAIN_SESSION_COURSE);
+    $tbl_user					= Database::get_main_table(TABLE_MAIN_USER);
+    $tbl_chat_connected			= Database::get_course_table(TABLE_CHAT_CONNECTED);
+
+    $query = "SELECT username FROM $tbl_user WHERE user_id='".$user_id."'";
+    $result = Database::query($query);
+
+    list($pseudo_user) = Database::fetch_array($result);
+
+    $isAllowed = !(empty($pseudo_user) || !$_cid);
+    $isMaster = (bool)$is_courseAdmin;
+
+    $date_inter = date('Y-m-d H:i:s', time() - 120);
+
+    $users = array();
+    $course_id = api_get_course_int_id();
+
+    if (empty($session_id)) {
+		$query = "SELECT DISTINCT t1.user_id,username,firstname,lastname,picture_uri,t3.status
+				  FROM $tbl_user t1, $tbl_chat_connected t2, $tbl_course_user t3
 				  WHERE t2.c_id = $course_id AND
-				  		t1.user_id=t2.user_id AND 
-				  		t3.user_id=t2.user_id AND 
-						t3.relation_type<>".COURSE_RELATION_TYPE_RRHH." AND 
-						t3.course_code = '".$_course['sysCode']."' AND 
-						t2.last_connection>'".$date_inter."' $extra_condition 
-						ORDER BY username";                        
-		$result = Database::query($query);
-		$users = Database::store_result($result);
+				  		t1.user_id=t2.user_id AND
+				  		t3.user_id=t2.user_id AND
+						t3.relation_type<>".COURSE_RELATION_TYPE_RRHH." AND
+						t3.course_code = '".$_course['sysCode']."' AND
+						t2.last_connection>'".$date_inter."' $extra_condition
+						ORDER BY username";
+        $result = Database::query($query);
+        $users = Database::store_result($result);
 	} else {
 		// select learners
-		$query = "SELECT DISTINCT t1.user_id,username,firstname,lastname,picture_uri FROM $tbl_user t1, $tbl_chat_connected t2, $tbl_session_course_user t3 
+		$query = "SELECT DISTINCT t1.user_id,username,firstname,lastname,picture_uri
+                  FROM $tbl_user t1, $tbl_chat_connected t2, $tbl_session_course_user t3
 		          WHERE
-		          t2.c_id = $course_id AND 
-		          t1.user_id=t2.user_id AND t3.id_user=t2.user_id AND 
-		          t3.id_session = '".$session_id."' AND 
+		          t2.c_id = $course_id AND
+		          t1.user_id=t2.user_id AND t3.id_user=t2.user_id AND
+		          t3.id_session = '".$session_id."' AND
 		          t3.course_code = '".$_course['sysCode']."' AND t2.last_connection>'".$date_inter."' $extra_condition ORDER BY username";
 		$result = Database::query($query);
 		while ($learner = Database::fetch_array($result)) {
-			$users[$learner['user_id']] = $learner;
+            $users[$learner['user_id']] = $learner;
 		}
 
 		// select session coach
-		$query = "SELECT DISTINCT t1.user_id,username,firstname,lastname,picture_uri FROM $tbl_user t1,$tbl_chat_connected t2,$tbl_session t3 
-		          WHERE t2.c_id = $course_id AND 
+		$query = "SELECT DISTINCT t1.user_id,username,firstname,lastname,picture_uri
+		          FROM $tbl_user t1,$tbl_chat_connected t2,$tbl_session t3
+		          WHERE t2.c_id = $course_id AND
 		             t1.user_id=t2.user_id AND t3.id_coach=t2.user_id AND t3.id = '".$session_id."' AND t2.last_connection>'".$date_inter."' $extra_condition ORDER BY username";
 		$result = Database::query($query);
 		if ($coach = Database::fetch_array($result)) {
@@ -89,7 +91,7 @@ if (!empty($course)) {
 		$query = "SELECT DISTINCT t1.user_id,username,firstname,lastname,picture_uri
 				FROM $tbl_user t1,$tbl_chat_connected t2,$tbl_session_course_user t3
 				WHERE
-				t2.c_id = $course_id AND  
+				t2.c_id = $course_id AND
 				t1.user_id=t2.user_id
 				AND t3.id_user=t2.user_id AND t3.status=2
 				AND t3.id_session = '".$session_id."'
@@ -99,17 +101,11 @@ if (!empty($course)) {
 		$result = Database::query($query);
 		$course_coaches = array();
 		while ($coaches = Database::fetch_array($result)) {
-			//$course_coaches[] = $coaches['user_id'];
 			$users[$coaches['user_id']] = $coaches;
 		}
-
-		//if ($coach = Database::fetch_array($result))
-		//	$users[$coach['user_id']] = $coach;
 	}
-
-	$user_id = $enreg['user_id'];
 	require 'header_frame.inc.php';
-	
+
 	?>
 	<table border="0" cellpadding="0" cellspacing="0" width="100%" class="data_table">
 	<tr><th colspan="2"><?php echo get_lang('Connected'); ?></th></tr>
@@ -122,7 +118,6 @@ if (!empty($course)) {
 		}
 		$user_image = UserManager::get_user_picture_path_by_id($user['user_id'], 'web', false, true);
 		$file_url = $user_image['dir'].$user_image['file'];
-
 	?>
     <tr>
 	  <td width="1%" valign="top"><img src="<?php echo $file_url;?>" border="0" width="22" alt="" /></td>
@@ -142,4 +137,4 @@ if (!empty($course)) {
 	</table>
 	<?php
 }
-require 'footer_frame.inc.php';
+require 'footer_frame.inc.php';

+ 28 - 35
main/chat/header_frame.inc.php

@@ -35,37 +35,35 @@ if (empty($mycourseid)) {
  * Choose CSS style (platform's, user's, or course's)
  */
 $my_style = api_get_visual_theme();
+$chat_size_old = isset($chat_size_old) ? $chat_size_old : null;
+$chat_size_new = isset($chat_size_new) ? $chat_size_new : null;
+$connected_new = isset($connected_new) ? $connected_new : null;
+$connected_old = isset($connected_old) ? $connected_old : null;
 
+header('Content-Type: text/html; charset='.api_get_system_encoding());
 
-
-?><!DOCTYPE html
-     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo api_get_language_isocode(); ?>" lang="<?php echo api_get_language_isocode(); ?>">
+?><!DOCTYPE html>
+<html>
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=<?php echo api_get_system_encoding(); ?>">
-<title>Chat</title>
-<link rel="stylesheet" type="text/css" href="<?php echo api_get_path(WEB_CSS_PATH).$my_style; ?>/default.css">
-<style>
-	a{
-		font-size: 12px;
-	}
-
-	.background_submit{
-		background: url(../img/chat_little.gif) 2px 2px no-repeat;
-		padding: 2px 1px 1px 20px;
-	}
-	TH{
-		font-size: 12px;
-	}
-</style>
-
-<script type="text/javascript" language="javascript">
-<!--
+    <meta charset="<?php echo api_get_system_encoding(); ?>" />
+    <title>Chat</title>
+    <link rel="stylesheet" type="text/css" href="<?php echo api_get_path(WEB_CSS_PATH).$my_style; ?>/default.css">
+    <style>
+        a {
+            font-size: 12px;
+        }
+        .background_submit {
+            background: url(../img/chat_little.gif) 2px 2px no-repeat;
+            padding: 2px 1px 1px 20px;
+        }
+        th {
+            font-size: 12px;
+        }
+    </style>
+<script>
 function updateChat()
 {
-	if ('<?php echo $chat_size_old; ?>' != '<?php echo $chat_size_new; ?>')
-	{
+	if ('<?php echo $chat_size_old; ?>' != '<?php echo $chat_size_new; ?>') {
 		parent.chat_chat.location.href='chat_chat.php?size=<?php echo $chat_size_new.'&'.api_get_cidreq(); ?>#bottom';
 	}
 }
@@ -85,27 +83,22 @@ function submitHiddenForm()
 
 function eventMessage()
 {
-	<?php if($chat_size): ?>
+	<?php if (isset($chat_size) && $chat_size): ?>
 	parent.chat_hidden.document.formHidden.chat_size_old.value='<?php echo $chat_size; ?>';
 	parent.chat_chat.location.href='chat_chat.php?size=<?php echo $chat_size.'&'.api_get_cidreq(); ?>#bottom';
 	<?php endif; ?>
 	document.formMessage.message.focus();
 }
 
-function send_message(evenement){
-
-    for (prop in evenement)
-    {
+function send_message(evenement) {
+    for (prop in evenement) {
     	if(prop == 'which') touche = evenement.which; else touche = evenement.keyCode;
     }
 
-    if (touche == 13)
-    {
+    if (touche == 13) {
     	document.formMessage.submit();
     }
 }
-
-//-->
 </script>
 </head>
 <body <?php echo $bodyXtra; ?> >

+ 163 - 0
main/css/academica/scorm.css

@@ -1,3 +1,166 @@
+/* copy of default_scorm.css */
+
+.inner_lp_toc {
+    overflow: auto;
+    background-color: white;
+    height: 210px;
+}
+
+.inner_lp_toc .scorm_item a {
+    font-weight: bold;
+    font-size: 14px;
+    margin-right: 1px;
+    padding-bottom: 2px;
+    text-decoration: none;
+    color: #2F3E46;
+}
+
+.inner_lp_toc .scorm_item a.chapter_module {
+    font-weight: normal;
+    margin-right: 10px;
+}
+.inner_lp_toc .scorm_item_highlight {
+    border: 1px solid #999;
+    background:#999;
+    font-weight:bold;
+    text-shadow:0 -1px 1px #666;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#666),to(#999));
+    background-image:-webkit-linear-gradient(top,#666,#999);
+    background-image:-moz-linear-gradient(top,#666,#999);
+    background-image:-ms-linear-gradient(top,#666,#999);
+    background-image:-o-linear-gradient(top,#666,#999);
+    background-image:linear-gradient(top,#666,#999);
+    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: bold;
+}
+
+.inner_lp_toc .scorm_item_section {
+    border:1px solid #222;
+    background:#333;
+    font-weight:bold;
+    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 {
+    border-bottom: 1px solid #CCCCCC;
+    background:#eee;
+    font-weight:bold;
+    color:#444;
+    text-shadow:0 1px 1px #f6f6f6;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+    background:#FDFDFD;
+}
+
+.inner_lp_toc .scorm_item_2 {
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    border-bottom: 1px solid #CCCCCC;
+    color: #444444;
+    font-weight: bold;
+    text-shadow: 0 1px 1px #F6F6F6;
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+}
+
+.inner_lp_toc .scorm_item_section .scorm_item:before
+{
+    content : url('../../img/lp_section.png');  /* from main/newscorm/lp_controller.php file */
+    vertical-align: text-top;
+    margin-right : 5px;
+}
+
+.scorm_section_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_section_level_1 {
+    padding : 0 0.5em 0 2em;
+}
+
+.scorm_section_level_2 {
+    padding : 0 0.5em 0 4em;
+}
+
+.scorm_section_level_3 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_section_level_4 {
+    padding : 0 0.5em 0 8em;
+}
+
+.scorm_section_level_5 {
+    padding : 0 0.5em 0 10em;
+}
+
+.scorm_item_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_item_level_1 {
+    padding : 0 0.5em 0 1.5em;
+}
+
+.scorm_item_level_2 {
+    padding : 0 0.5em 0 3em;
+}
+
+.scorm_item_level_3 {
+    padding : 0 0.5em 0 4.5em;
+}
+
+.scorm_item_level_4 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_item_level_5 {
+    padding : 0 0.5em 0 7.5em;
+}
+
+/* end of copy of default_scorm.css */
+
+
 .scormpage {
 	height: 100%;
 }

+ 163 - 0
main/css/baby_orange/scorm.css

@@ -1,3 +1,166 @@
+/* copy of default_scorm.css */
+
+.inner_lp_toc {
+    overflow: auto;
+    background-color: white;
+    height: 210px;
+}
+
+.inner_lp_toc .scorm_item a {
+    font-weight: bold;
+    font-size: 14px;
+    margin-right: 1px;
+    padding-bottom: 2px;
+    text-decoration: none;
+    color: #2F3E46;
+}
+
+.inner_lp_toc .scorm_item a.chapter_module {
+    font-weight: normal;
+    margin-right: 10px;
+}
+.inner_lp_toc .scorm_item_highlight {
+    border: 1px solid #999;
+    background:#999;
+    font-weight:bold;
+    text-shadow:0 -1px 1px #666;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#666),to(#999));
+    background-image:-webkit-linear-gradient(top,#666,#999);
+    background-image:-moz-linear-gradient(top,#666,#999);
+    background-image:-ms-linear-gradient(top,#666,#999);
+    background-image:-o-linear-gradient(top,#666,#999);
+    background-image:linear-gradient(top,#666,#999);
+    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: bold;
+}
+
+.inner_lp_toc .scorm_item_section {
+    border:1px solid #222;
+    background:#333;
+    font-weight:bold;
+    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 {
+    border-bottom: 1px solid #CCCCCC;
+    background:#eee;
+    font-weight:bold;
+    color:#444;
+    text-shadow:0 1px 1px #f6f6f6;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+    background:#FDFDFD;
+}
+
+.inner_lp_toc .scorm_item_2 {
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    border-bottom: 1px solid #CCCCCC;
+    color: #444444;
+    font-weight: bold;
+    text-shadow: 0 1px 1px #F6F6F6;
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+}
+
+.inner_lp_toc .scorm_item_section .scorm_item:before
+{
+    content : url('../../img/lp_section.png');  /* from main/newscorm/lp_controller.php file */
+    vertical-align: text-top;
+    margin-right : 5px;
+}
+
+.scorm_section_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_section_level_1 {
+    padding : 0 0.5em 0 2em;
+}
+
+.scorm_section_level_2 {
+    padding : 0 0.5em 0 4em;
+}
+
+.scorm_section_level_3 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_section_level_4 {
+    padding : 0 0.5em 0 8em;
+}
+
+.scorm_section_level_5 {
+    padding : 0 0.5em 0 10em;
+}
+
+.scorm_item_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_item_level_1 {
+    padding : 0 0.5em 0 1.5em;
+}
+
+.scorm_item_level_2 {
+    padding : 0 0.5em 0 3em;
+}
+
+.scorm_item_level_3 {
+    padding : 0 0.5em 0 4.5em;
+}
+
+.scorm_item_level_4 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_item_level_5 {
+    padding : 0 0.5em 0 7.5em;
+}
+
+/* end of copy of default_scorm.css */
+
+
 .scormpage {
 	height: 100%;
 }

+ 0 - 111
main/css/base.css

@@ -4075,122 +4075,11 @@ footer {
     margin:0;
 }
 
-#scorm_title {
-    background: none repeat scroll 0 0 #EEEEEE;
-    color: #444444;
-    font-size: 16px;
-    font-weight: bold;
-    padding: 1px 5px 3px 8px;
-}
 
 .progresstext {
     text-align: center;
 }
 
-.inner_lp_toc {
-    overflow: auto;
-    background-color: white;
-    height: 210px;
-}
-
-.inner_lp_toc .scorm_item a {
-    font-weight: bold;
-    font-size: 14px;
-    margin-right: 1px;
-    padding-bottom: 2px;
-    text-decoration: none;
-    color: #2F3E46;
-}
-
-.inner_lp_toc .scorm_item a.chapter_module {
-    font-weight: normal;
-    margin-right: 10px;
-}
-.inner_lp_toc .scorm_item_highlight {
-    border: 1px solid #999;
-    background:#999;
-    font-weight:bold;
-    text-shadow:0 -1px 1px #666;
-    background-image:-webkit-gradient(linear,left top,left bottom,from(#666),to(#999));
-    background-image:-webkit-linear-gradient(top,#666,#999);
-    background-image:-moz-linear-gradient(top,#666,#999);
-    background-image:-ms-linear-gradient(top,#666,#999);
-    background-image:-o-linear-gradient(top,#666,#999);
-    background-image:linear-gradient(top,#666,#999);
-    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: bold;
-}
-
-.inner_lp_toc .scorm_item_section {
-    border:1px solid #222;
-    background:#333;
-    font-weight:bold;
-    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 {
-    border-bottom: 1px solid #CCCCCC;
-    background:#eee;
-    font-weight:bold;
-    color:#444;
-    text-shadow:0 1px 1px #f6f6f6;
-    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
-    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
-    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
-    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
-    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
-    background-image:linear-gradient(top,#fdfdfd,#eee);
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;
-    font-weight: normal;
-    /* background:#FDFDFD; */
-}
-
-.inner_lp_toc .scorm_item_2 {
-    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
-    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
-    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
-    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
-    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
-    background-image:linear-gradient(top,#fdfdfd,#eee);
-    border-bottom: 1px solid #CCCCCC;
-    color: #444444;
-    font-weight: bold;
-    text-shadow: 0 1px 1px #F6F6F6;
-    margin-right: 1px;
-    padding: 10px 0px 10px 0px;
-    text-decoration: none;
-    font-weight: normal;
-}
-
 .ui-state-highlight_lp {
     border: 1px solid #FEAA18;
     background: #FFB738;

+ 163 - 0
main/css/blue_lagoon/scorm.css

@@ -1,3 +1,166 @@
+/* copy of default_scorm.css */
+
+.inner_lp_toc {
+    overflow: auto;
+    background-color: white;
+    height: 210px;
+}
+
+.inner_lp_toc .scorm_item a {
+    font-weight: bold;
+    font-size: 14px;
+    margin-right: 1px;
+    padding-bottom: 2px;
+    text-decoration: none;
+    color: #2F3E46;
+}
+
+.inner_lp_toc .scorm_item a.chapter_module {
+    font-weight: normal;
+    margin-right: 10px;
+}
+.inner_lp_toc .scorm_item_highlight {
+    border: 1px solid #999;
+    background:#999;
+    font-weight:bold;
+    text-shadow:0 -1px 1px #666;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#666),to(#999));
+    background-image:-webkit-linear-gradient(top,#666,#999);
+    background-image:-moz-linear-gradient(top,#666,#999);
+    background-image:-ms-linear-gradient(top,#666,#999);
+    background-image:-o-linear-gradient(top,#666,#999);
+    background-image:linear-gradient(top,#666,#999);
+    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: bold;
+}
+
+.inner_lp_toc .scorm_item_section {
+    border:1px solid #222;
+    background:#333;
+    font-weight:bold;
+    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 {
+    border-bottom: 1px solid #CCCCCC;
+    background:#eee;
+    font-weight:bold;
+    color:#444;
+    text-shadow:0 1px 1px #f6f6f6;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+    background:#FDFDFD;
+}
+
+.inner_lp_toc .scorm_item_2 {
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    border-bottom: 1px solid #CCCCCC;
+    color: #444444;
+    font-weight: bold;
+    text-shadow: 0 1px 1px #F6F6F6;
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+}
+
+.inner_lp_toc .scorm_item_section .scorm_item:before
+{
+    content : url('../../img/lp_section.png');  /* from main/newscorm/lp_controller.php file */
+    vertical-align: text-top;
+    margin-right : 5px;
+}
+
+.scorm_section_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_section_level_1 {
+    padding : 0 0.5em 0 2em;
+}
+
+.scorm_section_level_2 {
+    padding : 0 0.5em 0 4em;
+}
+
+.scorm_section_level_3 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_section_level_4 {
+    padding : 0 0.5em 0 8em;
+}
+
+.scorm_section_level_5 {
+    padding : 0 0.5em 0 10em;
+}
+
+.scorm_item_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_item_level_1 {
+    padding : 0 0.5em 0 1.5em;
+}
+
+.scorm_item_level_2 {
+    padding : 0 0.5em 0 3em;
+}
+
+.scorm_item_level_3 {
+    padding : 0 0.5em 0 4.5em;
+}
+
+.scorm_item_level_4 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_item_level_5 {
+    padding : 0 0.5em 0 7.5em;
+}
+
+/* end of copy of default_scorm.css */
+
+
 .scormpage {
 	height: 100%;
 }

+ 163 - 0
main/css/chamilo/scorm.css

@@ -1,3 +1,166 @@
+/* copy of default_scorm.css */
+
+.inner_lp_toc {
+    overflow: auto;
+    background-color: white;
+    height: 210px;
+}
+
+.inner_lp_toc .scorm_item a {
+    font-weight: bold;
+    font-size: 14px;
+    margin-right: 1px;
+    padding-bottom: 2px;
+    text-decoration: none;
+    color: #2F3E46;
+}
+
+.inner_lp_toc .scorm_item a.chapter_module {
+    font-weight: normal;
+    margin-right: 10px;
+}
+.inner_lp_toc .scorm_item_highlight {
+    border: 1px solid #999;
+    background:#999;
+    font-weight:bold;
+    text-shadow:0 -1px 1px #666;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#666),to(#999));
+    background-image:-webkit-linear-gradient(top,#666,#999);
+    background-image:-moz-linear-gradient(top,#666,#999);
+    background-image:-ms-linear-gradient(top,#666,#999);
+    background-image:-o-linear-gradient(top,#666,#999);
+    background-image:linear-gradient(top,#666,#999);
+    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: bold;
+}
+
+.inner_lp_toc .scorm_item_section {
+    border:1px solid #222;
+    background:#333;
+    font-weight:bold;
+    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 {
+    border-bottom: 1px solid #CCCCCC;
+    background:#eee;
+    font-weight:bold;
+    color:#444;
+    text-shadow:0 1px 1px #f6f6f6;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+    background:#FDFDFD;
+}
+
+.inner_lp_toc .scorm_item_2 {
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    border-bottom: 1px solid #CCCCCC;
+    color: #444444;
+    font-weight: bold;
+    text-shadow: 0 1px 1px #F6F6F6;
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+}
+
+.inner_lp_toc .scorm_item_section .scorm_item:before
+{
+    content : url('../../img/lp_section.png');  /* from main/newscorm/lp_controller.php file */
+    vertical-align: text-top;
+    margin-right : 5px;
+}
+
+.scorm_section_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_section_level_1 {
+    padding : 0 0.5em 0 2em;
+}
+
+.scorm_section_level_2 {
+    padding : 0 0.5em 0 4em;
+}
+
+.scorm_section_level_3 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_section_level_4 {
+    padding : 0 0.5em 0 8em;
+}
+
+.scorm_section_level_5 {
+    padding : 0 0.5em 0 10em;
+}
+
+.scorm_item_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_item_level_1 {
+    padding : 0 0.5em 0 1.5em;
+}
+
+.scorm_item_level_2 {
+    padding : 0 0.5em 0 3em;
+}
+
+.scorm_item_level_3 {
+    padding : 0 0.5em 0 4.5em;
+}
+
+.scorm_item_level_4 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_item_level_5 {
+    padding : 0 0.5em 0 7.5em;
+}
+
+/* end of copy of default_scorm.css */
+
+
 .scormpage {
     height: 100%;
 }

+ 163 - 0
main/css/chamilo_electric_blue/scorm.css

@@ -1,3 +1,166 @@
+/* copy of default_scorm.css */
+
+.inner_lp_toc {
+    overflow: auto;
+    background-color: white;
+    height: 210px;
+}
+
+.inner_lp_toc .scorm_item a {
+    font-weight: bold;
+    font-size: 14px;
+    margin-right: 1px;
+    padding-bottom: 2px;
+    text-decoration: none;
+    color: #2F3E46;
+}
+
+.inner_lp_toc .scorm_item a.chapter_module {
+    font-weight: normal;
+    margin-right: 10px;
+}
+.inner_lp_toc .scorm_item_highlight {
+    border: 1px solid #999;
+    background:#999;
+    font-weight:bold;
+    text-shadow:0 -1px 1px #666;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#666),to(#999));
+    background-image:-webkit-linear-gradient(top,#666,#999);
+    background-image:-moz-linear-gradient(top,#666,#999);
+    background-image:-ms-linear-gradient(top,#666,#999);
+    background-image:-o-linear-gradient(top,#666,#999);
+    background-image:linear-gradient(top,#666,#999);
+    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: bold;
+}
+
+.inner_lp_toc .scorm_item_section {
+    border:1px solid #222;
+    background:#333;
+    font-weight:bold;
+    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 {
+    border-bottom: 1px solid #CCCCCC;
+    background:#eee;
+    font-weight:bold;
+    color:#444;
+    text-shadow:0 1px 1px #f6f6f6;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+    background:#FDFDFD;
+}
+
+.inner_lp_toc .scorm_item_2 {
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    border-bottom: 1px solid #CCCCCC;
+    color: #444444;
+    font-weight: bold;
+    text-shadow: 0 1px 1px #F6F6F6;
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+}
+
+.inner_lp_toc .scorm_item_section .scorm_item:before
+{
+    content: url("../../img/lp_section.png");  /* from main/newscorm/lp_controller.php file */
+    vertical-align: text-top;
+    margin-right:10px;
+}
+
+.scorm_section_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_section_level_1 {
+    padding : 0 0.5em 0 2em;
+}
+
+.scorm_section_level_2 {
+    padding : 0 0.5em 0 4em;
+}
+
+.scorm_section_level_3 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_section_level_4 {
+    padding : 0 0.5em 0 8em;
+}
+
+.scorm_section_level_5 {
+    padding : 0 0.5em 0 10em;
+}
+
+.scorm_item_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_item_level_1 {
+    padding : 0 0.5em 0 1.5em;
+}
+
+.scorm_item_level_2 {
+    padding : 0 0.5em 0 3em;
+}
+
+.scorm_item_level_3 {
+    padding : 0 0.5em 0 4.5em;
+}
+
+.scorm_item_level_4 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_item_level_5 {
+    padding : 0 0.5em 0 7.5em;
+}
+
+/* end of copy of default_scorm.css */
+
+
 .scormpage {
 	height: 100%;
 }

+ 163 - 0
main/css/chamilo_green/scorm.css

@@ -1,3 +1,166 @@
+/* copy of default_scorm.css */
+
+.inner_lp_toc {
+    overflow: auto;
+    background-color: white;
+    height: 210px;
+}
+
+.inner_lp_toc .scorm_item a {
+    font-weight: bold;
+    font-size: 14px;
+    margin-right: 1px;
+    padding-bottom: 2px;
+    text-decoration: none;
+    color: #2F3E46;
+}
+
+.inner_lp_toc .scorm_item a.chapter_module {
+    font-weight: normal;
+    margin-right: 10px;
+}
+.inner_lp_toc .scorm_item_highlight {
+    border: 1px solid #999;
+    background:#999;
+    font-weight:bold;
+    text-shadow:0 -1px 1px #666;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#666),to(#999));
+    background-image:-webkit-linear-gradient(top,#666,#999);
+    background-image:-moz-linear-gradient(top,#666,#999);
+    background-image:-ms-linear-gradient(top,#666,#999);
+    background-image:-o-linear-gradient(top,#666,#999);
+    background-image:linear-gradient(top,#666,#999);
+    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: bold;
+}
+
+.inner_lp_toc .scorm_item_section {
+    border:1px solid #222;
+    background:#333;
+    font-weight:bold;
+    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 {
+    border-bottom: 1px solid #CCCCCC;
+    background:#eee;
+    font-weight:bold;
+    color:#444;
+    text-shadow:0 1px 1px #f6f6f6;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+    background:#FDFDFD;
+}
+
+.inner_lp_toc .scorm_item_2 {
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    border-bottom: 1px solid #CCCCCC;
+    color: #444444;
+    font-weight: bold;
+    text-shadow: 0 1px 1px #F6F6F6;
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+}
+
+.inner_lp_toc .scorm_item_section .scorm_item:before
+{
+    content : url('../../img/lp_section.png');  /* from main/newscorm/lp_controller.php file */
+    vertical-align: text-top;
+    margin-right : 5px;
+}
+
+.scorm_section_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_section_level_1 {
+    padding : 0 0.5em 0 2em;
+}
+
+.scorm_section_level_2 {
+    padding : 0 0.5em 0 4em;
+}
+
+.scorm_section_level_3 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_section_level_4 {
+    padding : 0 0.5em 0 8em;
+}
+
+.scorm_section_level_5 {
+    padding : 0 0.5em 0 10em;
+}
+
+.scorm_item_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_item_level_1 {
+    padding : 0 0.5em 0 1.5em;
+}
+
+.scorm_item_level_2 {
+    padding : 0 0.5em 0 3em;
+}
+
+.scorm_item_level_3 {
+    padding : 0 0.5em 0 4.5em;
+}
+
+.scorm_item_level_4 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_item_level_5 {
+    padding : 0 0.5em 0 7.5em;
+}
+
+/* end of copy of default_scorm.css */
+
+
 .scormpage {
 	height: 100%;
 }

+ 269 - 110
main/css/chamilo_orange/scorm.css

@@ -1,166 +1,325 @@
+/* copy of default_scorm.css */
+
+.inner_lp_toc {
+    overflow: auto;
+    background-color: white;
+    height: 210px;
+}
+
+.inner_lp_toc .scorm_item a {
+    font-weight: bold;
+    font-size: 14px;
+    margin-right: 1px;
+    padding-bottom: 2px;
+    text-decoration: none;
+    color: #2F3E46;
+}
+
+.inner_lp_toc .scorm_item a.chapter_module {
+    font-weight: normal;
+    margin-right: 10px;
+}
+.inner_lp_toc .scorm_item_highlight {
+    border: 1px solid #999;
+    background:#999;
+    font-weight:bold;
+    text-shadow:0 -1px 1px #666;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#666),to(#999));
+    background-image:-webkit-linear-gradient(top,#666,#999);
+    background-image:-moz-linear-gradient(top,#666,#999);
+    background-image:-ms-linear-gradient(top,#666,#999);
+    background-image:-o-linear-gradient(top,#666,#999);
+    background-image:linear-gradient(top,#666,#999);
+    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: bold;
+}
+
+.inner_lp_toc .scorm_item_section {
+    border:1px solid #222;
+    background:#333;
+    font-weight:bold;
+    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 {
+    border-bottom: 1px solid #CCCCCC;
+    background:#eee;
+    font-weight:bold;
+    color:#444;
+    text-shadow:0 1px 1px #f6f6f6;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+    background:#FDFDFD;
+}
+
+.inner_lp_toc .scorm_item_2 {
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    border-bottom: 1px solid #CCCCCC;
+    color: #444444;
+    font-weight: bold;
+    text-shadow: 0 1px 1px #F6F6F6;
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+}
+
+.inner_lp_toc .scorm_item_section .scorm_item:before
+{
+    content : url('../../img/lp_section.png');  /* from main/newscorm/lp_controller.php file */
+    vertical-align: text-top;
+    margin-right : 5px;
+}
+
+.scorm_section_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_section_level_1 {
+    padding : 0 0.5em 0 2em;
+}
+
+.scorm_section_level_2 {
+    padding : 0 0.5em 0 4em;
+}
+
+.scorm_section_level_3 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_section_level_4 {
+    padding : 0 0.5em 0 8em;
+}
+
+.scorm_section_level_5 {
+    padding : 0 0.5em 0 10em;
+}
+
+.scorm_item_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_item_level_1 {
+    padding : 0 0.5em 0 1.5em;
+}
+
+.scorm_item_level_2 {
+    padding : 0 0.5em 0 3em;
+}
+
+.scorm_item_level_3 {
+    padding : 0 0.5em 0 4.5em;
+}
+
+.scorm_item_level_4 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_item_level_5 {
+    padding : 0 0.5em 0 7.5em;
+}
+
+/* end of copy of default_scorm.css */
+
+
 .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;
-	text-decoration: none;
+    font-size: 11px;
+    margin-left: 10px;
+    margin-right:10px;
+    text-decoration: none;
 }
 .inner_lp_toc .scorm_item A {
-	font-size: 11px;
-	margin-right: 1px;
-	padding-bottom: 2px;
-	text-decoration: none;
-	font-weight: normal;
+    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;
+    font-weight: normal;
+    margin-right: 10px;
 }
 .inner_lp_toc .scorm_item_highlight {
-	font-size: 11px;
-	margin-right: 1px;
-	padding-bottom: 2px;
-	text-decoration: none;
-	font-weight: normal;
-	background:#aaa;
+    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;
+    font-size: 11px;
+    margin-right: 1px;
+    text-decoration: none;
+    font-weight: normal;
 }
 .inner_lp_toc .scorm_item_1 {
-	font-size: 11px;
-	margin-right: 1px;
-	padding-bottom: 2px;
-	text-decoration: none;
-	font-weight: normal;
-	background:#ddd;
+    font-size: 11px;
+    margin-right: 1px;
+    padding-bottom: 2px;
+    text-decoration: none;
+    font-weight: normal;
+    background:#ddd;
 }
 .inner_lp_toc .scorm_item_2 {
-	font-size: 11px;
-	margin-right: 1px;
-	padding-bottom: 2px;
-	text-decoration: none;
-	font-weight: normal;
-	background:#eee;
+    font-size: 11px;
+    margin-right: 1px;
+    padding-bottom: 2px;
+    text-decoration: none;
+    font-weight: normal;
+    background:#eee;
 }
 .inner_lp_toc .scorm_title {
-	font-weight: bold;
-	background:#ccc;
-	font-size: 14px;
-	color: #444;
+    font-weight: bold;
+    background:#ccc;
+    font-size: 14px;
+    color: #444;
 }
 .inner_lp_toc .scorm_title_text {
-	margin-left: 10px;
- //padding: 2px;
- //cambiado no existe
+    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: 100%;
-	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;
+    padding-left: 17px;
 }
 #author_name {
-	padding-left: 5px;
-	padding-top: 5px;
-	font-size: 11px;
-	color:#888;
+    padding-left: 5px;
+    padding-top: 5px;
+    font-size: 11px;
+    color:#888;
 }
 #msg_div_id {
-	padding-left: 17px;
-	padding-top: 4px;
+    padding-left: 17px;
+    padding-top: 4px;
 }
 .scorm_title_text {
-	margin-left: 10px;
-	font-weight: bold;
-	background:#ccc;
-	font-size: 14px;
-	color: #444;
-	width: 89%;
-	padding: 1px 5px 3px 8px;
+    margin-left: 10px;
+    font-weight: bold;
+    background:#ccc;
+    font-size: 14px;
+    color: #444;
+    width: 89%;
+    padding: 1px 5px 3px 8px;
 }

+ 163 - 4
main/css/chamilo_red/scorm.css

@@ -1,3 +1,166 @@
+/* copy of default_scorm.css */
+
+.inner_lp_toc {
+    overflow: auto;
+    background-color: white;
+    height: 210px;
+}
+
+.inner_lp_toc .scorm_item a {
+    font-weight: bold;
+    font-size: 14px;
+    margin-right: 1px;
+    padding-bottom: 2px;
+    text-decoration: none;
+    color: #2F3E46;
+}
+
+.inner_lp_toc .scorm_item a.chapter_module {
+    font-weight: normal;
+    margin-right: 10px;
+}
+.inner_lp_toc .scorm_item_highlight {
+    border: 1px solid #999;
+    background:#999;
+    font-weight:bold;
+    text-shadow:0 -1px 1px #666;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#666),to(#999));
+    background-image:-webkit-linear-gradient(top,#666,#999);
+    background-image:-moz-linear-gradient(top,#666,#999);
+    background-image:-ms-linear-gradient(top,#666,#999);
+    background-image:-o-linear-gradient(top,#666,#999);
+    background-image:linear-gradient(top,#666,#999);
+    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: bold;
+}
+
+.inner_lp_toc .scorm_item_section {
+    border:1px solid #222;
+    background:#333;
+    font-weight:bold;
+    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 {
+    border-bottom: 1px solid #CCCCCC;
+    background:#eee;
+    font-weight:bold;
+    color:#444;
+    text-shadow:0 1px 1px #f6f6f6;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+    background:#FDFDFD;
+}
+
+.inner_lp_toc .scorm_item_2 {
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    border-bottom: 1px solid #CCCCCC;
+    color: #444444;
+    font-weight: bold;
+    text-shadow: 0 1px 1px #F6F6F6;
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+}
+
+.inner_lp_toc .scorm_item_section .scorm_item:before
+{
+    content : url('../../img/lp_section.png');  /* from main/newscorm/lp_controller.php file */
+    vertical-align: text-top;
+    margin-right : 5px;
+}
+
+.scorm_section_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_section_level_1 {
+    padding : 0 0.5em 0 2em;
+}
+
+.scorm_section_level_2 {
+    padding : 0 0.5em 0 4em;
+}
+
+.scorm_section_level_3 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_section_level_4 {
+    padding : 0 0.5em 0 8em;
+}
+
+.scorm_section_level_5 {
+    padding : 0 0.5em 0 10em;
+}
+
+.scorm_item_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_item_level_1 {
+    padding : 0 0.5em 0 1.5em;
+}
+
+.scorm_item_level_2 {
+    padding : 0 0.5em 0 3em;
+}
+
+.scorm_item_level_3 {
+    padding : 0 0.5em 0 4.5em;
+}
+
+.scorm_item_level_4 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_item_level_5 {
+    padding : 0 0.5em 0 7.5em;
+}
+
+/* end of copy of default_scorm.css */
+
+
 .scormpage {
 	height: 100%;
 }
@@ -76,8 +239,6 @@
 }
 .inner_lp_toc .scorm_title_text {
 	margin-left: 10px;
- //padding: 2px;
- //cambiado no existe
 }
 .inner_lp_toc .scorm_status_img {
 	margin:0px;
@@ -103,8 +264,6 @@
 /*.scormpage .menu */
 .lp_navigation_elem .progresstext {
 	margin-top: -20px;
-	//margin-left: 40%;
-//em  font-size: normal;
 }
 /*.scormpage .menu */
 .lp_navigation_elem .buttons {

+ 163 - 0
main/css/chamilo_sport_red/scorm.css

@@ -1,3 +1,166 @@
+/* copy of default_scorm.css */
+
+.inner_lp_toc {
+    overflow: auto;
+    background-color: white;
+    height: 210px;
+}
+
+.inner_lp_toc .scorm_item a {
+    font-weight: bold;
+    font-size: 14px;
+    margin-right: 1px;
+    padding-bottom: 2px;
+    text-decoration: none;
+    color: #2F3E46;
+}
+
+.inner_lp_toc .scorm_item a.chapter_module {
+    font-weight: normal;
+    margin-right: 10px;
+}
+.inner_lp_toc .scorm_item_highlight {
+    border: 1px solid #999;
+    background:#999;
+    font-weight:bold;
+    text-shadow:0 -1px 1px #666;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#666),to(#999));
+    background-image:-webkit-linear-gradient(top,#666,#999);
+    background-image:-moz-linear-gradient(top,#666,#999);
+    background-image:-ms-linear-gradient(top,#666,#999);
+    background-image:-o-linear-gradient(top,#666,#999);
+    background-image:linear-gradient(top,#666,#999);
+    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: bold;
+}
+
+.inner_lp_toc .scorm_item_section {
+    border:1px solid #222;
+    background:#333;
+    font-weight:bold;
+    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 {
+    border-bottom: 1px solid #CCCCCC;
+    background:#eee;
+    font-weight:bold;
+    color:#444;
+    text-shadow:0 1px 1px #f6f6f6;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+    background:#FDFDFD;
+}
+
+.inner_lp_toc .scorm_item_2 {
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    border-bottom: 1px solid #CCCCCC;
+    color: #444444;
+    font-weight: bold;
+    text-shadow: 0 1px 1px #F6F6F6;
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+}
+
+.inner_lp_toc .scorm_item_section .scorm_item:before
+{
+    content : url('../../img/lp_section.png');  /* from main/newscorm/lp_controller.php file */
+    vertical-align: text-top;
+    margin-right : 5px;
+}
+
+.scorm_section_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_section_level_1 {
+    padding : 0 0.5em 0 2em;
+}
+
+.scorm_section_level_2 {
+    padding : 0 0.5em 0 4em;
+}
+
+.scorm_section_level_3 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_section_level_4 {
+    padding : 0 0.5em 0 8em;
+}
+
+.scorm_section_level_5 {
+    padding : 0 0.5em 0 10em;
+}
+
+.scorm_item_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_item_level_1 {
+    padding : 0 0.5em 0 1.5em;
+}
+
+.scorm_item_level_2 {
+    padding : 0 0.5em 0 3em;
+}
+
+.scorm_item_level_3 {
+    padding : 0 0.5em 0 4.5em;
+}
+
+.scorm_item_level_4 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_item_level_5 {
+    padding : 0 0.5em 0 7.5em;
+}
+
+/* end of copy of default_scorm.css */
+
+
 .scormpage {
 	height: 100%;
 }

+ 163 - 2
main/css/cool_blue/scorm.css

@@ -1,3 +1,166 @@
+/* copy of default_scorm.css */
+
+.inner_lp_toc {
+    overflow: auto;
+    background-color: white;
+    height: 210px;
+}
+
+.inner_lp_toc .scorm_item a {
+    font-weight: bold;
+    font-size: 14px;
+    margin-right: 1px;
+    padding-bottom: 2px;
+    text-decoration: none;
+    color: #2F3E46;
+}
+
+.inner_lp_toc .scorm_item a.chapter_module {
+    font-weight: normal;
+    margin-right: 10px;
+}
+.inner_lp_toc .scorm_item_highlight {
+    border: 1px solid #999;
+    background:#999;
+    font-weight:bold;
+    text-shadow:0 -1px 1px #666;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#666),to(#999));
+    background-image:-webkit-linear-gradient(top,#666,#999);
+    background-image:-moz-linear-gradient(top,#666,#999);
+    background-image:-ms-linear-gradient(top,#666,#999);
+    background-image:-o-linear-gradient(top,#666,#999);
+    background-image:linear-gradient(top,#666,#999);
+    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: bold;
+}
+
+.inner_lp_toc .scorm_item_section {
+    border:1px solid #222;
+    background:#333;
+    font-weight:bold;
+    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 {
+    border-bottom: 1px solid #CCCCCC;
+    background:#eee;
+    font-weight:bold;
+    color:#444;
+    text-shadow:0 1px 1px #f6f6f6;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+    background:#FDFDFD;
+}
+
+.inner_lp_toc .scorm_item_2 {
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    border-bottom: 1px solid #CCCCCC;
+    color: #444444;
+    font-weight: bold;
+    text-shadow: 0 1px 1px #F6F6F6;
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+}
+
+.inner_lp_toc .scorm_item_section .scorm_item:before
+{
+    content : url('../../img/lp_section.png');  /* from main/newscorm/lp_controller.php file */
+    vertical-align: text-top;
+    margin-right : 5px;
+}
+
+.scorm_section_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_section_level_1 {
+    padding : 0 0.5em 0 2em;
+}
+
+.scorm_section_level_2 {
+    padding : 0 0.5em 0 4em;
+}
+
+.scorm_section_level_3 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_section_level_4 {
+    padding : 0 0.5em 0 8em;
+}
+
+.scorm_section_level_5 {
+    padding : 0 0.5em 0 10em;
+}
+
+.scorm_item_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_item_level_1 {
+    padding : 0 0.5em 0 1.5em;
+}
+
+.scorm_item_level_2 {
+    padding : 0 0.5em 0 3em;
+}
+
+.scorm_item_level_3 {
+    padding : 0 0.5em 0 4.5em;
+}
+
+.scorm_item_level_4 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_item_level_5 {
+    padding : 0 0.5em 0 7.5em;
+}
+
+/* end of copy of default_scorm.css */
+
+
 .scormpage {
 	height: 100%;
 }
@@ -76,8 +239,6 @@
 }
 .inner_lp_toc .scorm_title_text {
 	margin-left: 10px;
- //padding: 2px;
- //cambiado no existe
 }
 .inner_lp_toc .scorm_status_img {
 	margin:0px;

+ 163 - 1
main/css/corporate/scorm.css

@@ -1,3 +1,166 @@
+/* copy of default_scorm.css */
+
+.inner_lp_toc {
+    overflow: auto;
+    background-color: white;
+    height: 210px;
+}
+
+.inner_lp_toc .scorm_item a {
+    font-weight: bold;
+    font-size: 14px;
+    margin-right: 1px;
+    padding-bottom: 2px;
+    text-decoration: none;
+    color: #2F3E46;
+}
+
+.inner_lp_toc .scorm_item a.chapter_module {
+    font-weight: normal;
+    margin-right: 10px;
+}
+.inner_lp_toc .scorm_item_highlight {
+    border: 1px solid #999;
+    background:#999;
+    font-weight:bold;
+    text-shadow:0 -1px 1px #666;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#666),to(#999));
+    background-image:-webkit-linear-gradient(top,#666,#999);
+    background-image:-moz-linear-gradient(top,#666,#999);
+    background-image:-ms-linear-gradient(top,#666,#999);
+    background-image:-o-linear-gradient(top,#666,#999);
+    background-image:linear-gradient(top,#666,#999);
+    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: bold;
+}
+
+.inner_lp_toc .scorm_item_section {
+    border:1px solid #222;
+    background:#333;
+    font-weight:bold;
+    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 {
+    border-bottom: 1px solid #CCCCCC;
+    background:#eee;
+    font-weight:bold;
+    color:#444;
+    text-shadow:0 1px 1px #f6f6f6;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+    background:#FDFDFD;
+}
+
+.inner_lp_toc .scorm_item_2 {
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    border-bottom: 1px solid #CCCCCC;
+    color: #444444;
+    font-weight: bold;
+    text-shadow: 0 1px 1px #F6F6F6;
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+}
+
+.inner_lp_toc .scorm_item_section .scorm_item:before
+{
+    content : url('../../img/lp_section.png');  /* from main/newscorm/lp_controller.php file */
+    vertical-align: text-top;
+    margin-right : 5px;
+}
+
+.scorm_section_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_section_level_1 {
+    padding : 0 0.5em 0 2em;
+}
+
+.scorm_section_level_2 {
+    padding : 0 0.5em 0 4em;
+}
+
+.scorm_section_level_3 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_section_level_4 {
+    padding : 0 0.5em 0 8em;
+}
+
+.scorm_section_level_5 {
+    padding : 0 0.5em 0 10em;
+}
+
+.scorm_item_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_item_level_1 {
+    padding : 0 0.5em 0 1.5em;
+}
+
+.scorm_item_level_2 {
+    padding : 0 0.5em 0 3em;
+}
+
+.scorm_item_level_3 {
+    padding : 0 0.5em 0 4.5em;
+}
+
+.scorm_item_level_4 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_item_level_5 {
+    padding : 0 0.5em 0 7.5em;
+}
+
+/* end of copy of default_scorm.css */
+
+
 .scormpage {
 	height: 100%;
 }
@@ -100,7 +263,6 @@
 .lp_navigation_elem .progresstext {
 	margin-top: -20px;
 	margin-left: 40%;
-//em  font-size: normal;
 }
 /*.scormpage .menu */
 .lp_navigation_elem .buttons {

+ 163 - 1
main/css/cosmic_campus/scorm.css

@@ -1,3 +1,166 @@
+/* copy of default_scorm.css */
+
+.inner_lp_toc {
+    overflow: auto;
+    background-color: white;
+    height: 210px;
+}
+
+.inner_lp_toc .scorm_item a {
+    font-weight: bold;
+    font-size: 14px;
+    margin-right: 1px;
+    padding-bottom: 2px;
+    text-decoration: none;
+    color: #2F3E46;
+}
+
+.inner_lp_toc .scorm_item a.chapter_module {
+    font-weight: normal;
+    margin-right: 10px;
+}
+.inner_lp_toc .scorm_item_highlight {
+    border: 1px solid #999;
+    background:#999;
+    font-weight:bold;
+    text-shadow:0 -1px 1px #666;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#666),to(#999));
+    background-image:-webkit-linear-gradient(top,#666,#999);
+    background-image:-moz-linear-gradient(top,#666,#999);
+    background-image:-ms-linear-gradient(top,#666,#999);
+    background-image:-o-linear-gradient(top,#666,#999);
+    background-image:linear-gradient(top,#666,#999);
+    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: bold;
+}
+
+.inner_lp_toc .scorm_item_section {
+    border:1px solid #222;
+    background:#333;
+    font-weight:bold;
+    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 {
+    border-bottom: 1px solid #CCCCCC;
+    background:#eee;
+    font-weight:bold;
+    color:#444;
+    text-shadow:0 1px 1px #f6f6f6;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+    background:#FDFDFD;
+}
+
+.inner_lp_toc .scorm_item_2 {
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    border-bottom: 1px solid #CCCCCC;
+    color: #444444;
+    font-weight: bold;
+    text-shadow: 0 1px 1px #F6F6F6;
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+}
+
+.inner_lp_toc .scorm_item_section .scorm_item:before
+{
+    content : url('../../img/lp_section.png');  /* from main/newscorm/lp_controller.php file */
+    vertical-align: text-top;
+    margin-right : 5px;
+}
+
+.scorm_section_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_section_level_1 {
+    padding : 0 0.5em 0 2em;
+}
+
+.scorm_section_level_2 {
+    padding : 0 0.5em 0 4em;
+}
+
+.scorm_section_level_3 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_section_level_4 {
+    padding : 0 0.5em 0 8em;
+}
+
+.scorm_section_level_5 {
+    padding : 0 0.5em 0 10em;
+}
+
+.scorm_item_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_item_level_1 {
+    padding : 0 0.5em 0 1.5em;
+}
+
+.scorm_item_level_2 {
+    padding : 0 0.5em 0 3em;
+}
+
+.scorm_item_level_3 {
+    padding : 0 0.5em 0 4.5em;
+}
+
+.scorm_item_level_4 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_item_level_5 {
+    padding : 0 0.5em 0 7.5em;
+}
+
+/* end of copy of default_scorm.css */
+
+
 .scormpage {
 	height: 100%;
 }
@@ -103,7 +266,6 @@
 .lp_navigation_elem .progresstext {
 	margin-top: -20px;
 	margin-left: 40%;
-//em  font-size: normal;
 }
 /*.scormpage .menu */
 .lp_navigation_elem .buttons {

+ 163 - 0
main/css/delicious_bordeaux/scorm.css

@@ -1,3 +1,166 @@
+/* copy of default_scorm.css */
+
+.inner_lp_toc {
+    overflow: auto;
+    background-color: white;
+    height: 210px;
+}
+
+.inner_lp_toc .scorm_item a {
+    font-weight: bold;
+    font-size: 14px;
+    margin-right: 1px;
+    padding-bottom: 2px;
+    text-decoration: none;
+    color: #2F3E46;
+}
+
+.inner_lp_toc .scorm_item a.chapter_module {
+    font-weight: normal;
+    margin-right: 10px;
+}
+.inner_lp_toc .scorm_item_highlight {
+    border: 1px solid #999;
+    background:#999;
+    font-weight:bold;
+    text-shadow:0 -1px 1px #666;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#666),to(#999));
+    background-image:-webkit-linear-gradient(top,#666,#999);
+    background-image:-moz-linear-gradient(top,#666,#999);
+    background-image:-ms-linear-gradient(top,#666,#999);
+    background-image:-o-linear-gradient(top,#666,#999);
+    background-image:linear-gradient(top,#666,#999);
+    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: bold;
+}
+
+.inner_lp_toc .scorm_item_section {
+    border:1px solid #222;
+    background:#333;
+    font-weight:bold;
+    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 {
+    border-bottom: 1px solid #CCCCCC;
+    background:#eee;
+    font-weight:bold;
+    color:#444;
+    text-shadow:0 1px 1px #f6f6f6;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+    background:#FDFDFD;
+}
+
+.inner_lp_toc .scorm_item_2 {
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    border-bottom: 1px solid #CCCCCC;
+    color: #444444;
+    font-weight: bold;
+    text-shadow: 0 1px 1px #F6F6F6;
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+}
+
+.inner_lp_toc .scorm_item_section .scorm_item:before
+{
+    content : url('../../img/lp_section.png');  /* from main/newscorm/lp_controller.php file */
+    vertical-align: text-top;
+    margin-right : 5px;
+}
+
+.scorm_section_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_section_level_1 {
+    padding : 0 0.5em 0 2em;
+}
+
+.scorm_section_level_2 {
+    padding : 0 0.5em 0 4em;
+}
+
+.scorm_section_level_3 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_section_level_4 {
+    padding : 0 0.5em 0 8em;
+}
+
+.scorm_section_level_5 {
+    padding : 0 0.5em 0 10em;
+}
+
+.scorm_item_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_item_level_1 {
+    padding : 0 0.5em 0 1.5em;
+}
+
+.scorm_item_level_2 {
+    padding : 0 0.5em 0 3em;
+}
+
+.scorm_item_level_3 {
+    padding : 0 0.5em 0 4.5em;
+}
+
+.scorm_item_level_4 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_item_level_5 {
+    padding : 0 0.5em 0 7.5em;
+}
+
+/* end of copy of default_scorm.css */
+
+
 .scormpage {
 	height: 100%;
 }

+ 163 - 2
main/css/dokeos_blue/scorm.css

@@ -1,3 +1,166 @@
+/* copy of default_scorm.css */
+
+.inner_lp_toc {
+    overflow: auto;
+    background-color: white;
+    height: 210px;
+}
+
+.inner_lp_toc .scorm_item a {
+    font-weight: bold;
+    font-size: 14px;
+    margin-right: 1px;
+    padding-bottom: 2px;
+    text-decoration: none;
+    color: #2F3E46;
+}
+
+.inner_lp_toc .scorm_item a.chapter_module {
+    font-weight: normal;
+    margin-right: 10px;
+}
+.inner_lp_toc .scorm_item_highlight {
+    border: 1px solid #999;
+    background:#999;
+    font-weight:bold;
+    text-shadow:0 -1px 1px #666;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#666),to(#999));
+    background-image:-webkit-linear-gradient(top,#666,#999);
+    background-image:-moz-linear-gradient(top,#666,#999);
+    background-image:-ms-linear-gradient(top,#666,#999);
+    background-image:-o-linear-gradient(top,#666,#999);
+    background-image:linear-gradient(top,#666,#999);
+    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: bold;
+}
+
+.inner_lp_toc .scorm_item_section {
+    border:1px solid #222;
+    background:#333;
+    font-weight:bold;
+    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 {
+    border-bottom: 1px solid #CCCCCC;
+    background:#eee;
+    font-weight:bold;
+    color:#444;
+    text-shadow:0 1px 1px #f6f6f6;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+    background:#FDFDFD;
+}
+
+.inner_lp_toc .scorm_item_2 {
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    border-bottom: 1px solid #CCCCCC;
+    color: #444444;
+    font-weight: bold;
+    text-shadow: 0 1px 1px #F6F6F6;
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+}
+
+.inner_lp_toc .scorm_item_section .scorm_item:before
+{
+    content : url('../../img/lp_section.png');  /* from main/newscorm/lp_controller.php file */
+    vertical-align: text-top;
+    margin-right : 5px;
+}
+
+.scorm_section_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_section_level_1 {
+    padding : 0 0.5em 0 2em;
+}
+
+.scorm_section_level_2 {
+    padding : 0 0.5em 0 4em;
+}
+
+.scorm_section_level_3 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_section_level_4 {
+    padding : 0 0.5em 0 8em;
+}
+
+.scorm_section_level_5 {
+    padding : 0 0.5em 0 10em;
+}
+
+.scorm_item_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_item_level_1 {
+    padding : 0 0.5em 0 1.5em;
+}
+
+.scorm_item_level_2 {
+    padding : 0 0.5em 0 3em;
+}
+
+.scorm_item_level_3 {
+    padding : 0 0.5em 0 4.5em;
+}
+
+.scorm_item_level_4 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_item_level_5 {
+    padding : 0 0.5em 0 7.5em;
+}
+
+/* end of copy of default_scorm.css */
+
+
 .scormpage {
 	height: 100%;
 }
@@ -76,8 +239,6 @@
 }
 .inner_lp_toc .scorm_title_text {
 	margin-left: 10px;
- //padding: 2px;
- //cambiado no existe
 }
 .inner_lp_toc .scorm_status_img {
 	margin:0px;

+ 163 - 0
main/css/dokeos_classic/scorm.css

@@ -1,3 +1,166 @@
+/* copy of default_scorm.css */
+
+.inner_lp_toc {
+    overflow: auto;
+    background-color: white;
+    height: 210px;
+}
+
+.inner_lp_toc .scorm_item a {
+    font-weight: bold;
+    font-size: 14px;
+    margin-right: 1px;
+    padding-bottom: 2px;
+    text-decoration: none;
+    color: #2F3E46;
+}
+
+.inner_lp_toc .scorm_item a.chapter_module {
+    font-weight: normal;
+    margin-right: 10px;
+}
+.inner_lp_toc .scorm_item_highlight {
+    border: 1px solid #999;
+    background:#999;
+    font-weight:bold;
+    text-shadow:0 -1px 1px #666;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#666),to(#999));
+    background-image:-webkit-linear-gradient(top,#666,#999);
+    background-image:-moz-linear-gradient(top,#666,#999);
+    background-image:-ms-linear-gradient(top,#666,#999);
+    background-image:-o-linear-gradient(top,#666,#999);
+    background-image:linear-gradient(top,#666,#999);
+    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: bold;
+}
+
+.inner_lp_toc .scorm_item_section {
+    border:1px solid #222;
+    background:#333;
+    font-weight:bold;
+    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 {
+    border-bottom: 1px solid #CCCCCC;
+    background:#eee;
+    font-weight:bold;
+    color:#444;
+    text-shadow:0 1px 1px #f6f6f6;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+    background:#FDFDFD;
+}
+
+.inner_lp_toc .scorm_item_2 {
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    border-bottom: 1px solid #CCCCCC;
+    color: #444444;
+    font-weight: bold;
+    text-shadow: 0 1px 1px #F6F6F6;
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+}
+
+.inner_lp_toc .scorm_item_section .scorm_item:before
+{
+    content : url('../../img/lp_section.png');  /* from main/newscorm/lp_controller.php file */
+    vertical-align: text-top;
+    margin-right : 5px;
+}
+
+.scorm_section_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_section_level_1 {
+    padding : 0 0.5em 0 2em;
+}
+
+.scorm_section_level_2 {
+    padding : 0 0.5em 0 4em;
+}
+
+.scorm_section_level_3 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_section_level_4 {
+    padding : 0 0.5em 0 8em;
+}
+
+.scorm_section_level_5 {
+    padding : 0 0.5em 0 10em;
+}
+
+.scorm_item_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_item_level_1 {
+    padding : 0 0.5em 0 1.5em;
+}
+
+.scorm_item_level_2 {
+    padding : 0 0.5em 0 3em;
+}
+
+.scorm_item_level_3 {
+    padding : 0 0.5em 0 4.5em;
+}
+
+.scorm_item_level_4 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_item_level_5 {
+    padding : 0 0.5em 0 7.5em;
+}
+
+/* end of copy of default_scorm.css */
+
+
 .scormpage {
 	height: 100%;
 }

+ 163 - 1
main/css/dokeos_classic_2D/scorm.css

@@ -1,3 +1,166 @@
+/* copy of default_scorm.css */
+
+.inner_lp_toc {
+    overflow: auto;
+    background-color: white;
+    height: 210px;
+}
+
+.inner_lp_toc .scorm_item a {
+    font-weight: bold;
+    font-size: 14px;
+    margin-right: 1px;
+    padding-bottom: 2px;
+    text-decoration: none;
+    color: #2F3E46;
+}
+
+.inner_lp_toc .scorm_item a.chapter_module {
+    font-weight: normal;
+    margin-right: 10px;
+}
+.inner_lp_toc .scorm_item_highlight {
+    border: 1px solid #999;
+    background:#999;
+    font-weight:bold;
+    text-shadow:0 -1px 1px #666;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#666),to(#999));
+    background-image:-webkit-linear-gradient(top,#666,#999);
+    background-image:-moz-linear-gradient(top,#666,#999);
+    background-image:-ms-linear-gradient(top,#666,#999);
+    background-image:-o-linear-gradient(top,#666,#999);
+    background-image:linear-gradient(top,#666,#999);
+    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: bold;
+}
+
+.inner_lp_toc .scorm_item_section {
+    border:1px solid #222;
+    background:#333;
+    font-weight:bold;
+    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 {
+    border-bottom: 1px solid #CCCCCC;
+    background:#eee;
+    font-weight:bold;
+    color:#444;
+    text-shadow:0 1px 1px #f6f6f6;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+    background:#FDFDFD;
+}
+
+.inner_lp_toc .scorm_item_2 {
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    border-bottom: 1px solid #CCCCCC;
+    color: #444444;
+    font-weight: bold;
+    text-shadow: 0 1px 1px #F6F6F6;
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+}
+
+.inner_lp_toc .scorm_item_section .scorm_item:before
+{
+    content : url('../../img/lp_section.png');  /* from main/newscorm/lp_controller.php file */
+    vertical-align: text-top;
+    margin-right : 5px;
+}
+
+.scorm_section_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_section_level_1 {
+    padding : 0 0.5em 0 2em;
+}
+
+.scorm_section_level_2 {
+    padding : 0 0.5em 0 4em;
+}
+
+.scorm_section_level_3 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_section_level_4 {
+    padding : 0 0.5em 0 8em;
+}
+
+.scorm_section_level_5 {
+    padding : 0 0.5em 0 10em;
+}
+
+.scorm_item_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_item_level_1 {
+    padding : 0 0.5em 0 1.5em;
+}
+
+.scorm_item_level_2 {
+    padding : 0 0.5em 0 3em;
+}
+
+.scorm_item_level_3 {
+    padding : 0 0.5em 0 4.5em;
+}
+
+.scorm_item_level_4 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_item_level_5 {
+    padding : 0 0.5em 0 7.5em;
+}
+
+/* end of copy of default_scorm.css */
+
+
 .scormpage {
 	height: 100%;
 }
@@ -103,7 +266,6 @@
 .lp_navigation_elem .progresstext {
 	margin-top: -20px;
 	margin-left: 40%;
-//em  font-size: normal;
 }
 /*.scormpage .menu */
 .lp_navigation_elem .buttons {

+ 163 - 0
main/css/empire_green/scorm.css

@@ -1,3 +1,166 @@
+/* copy of default_scorm.css */
+
+.inner_lp_toc {
+    overflow: auto;
+    background-color: white;
+    height: 210px;
+}
+
+.inner_lp_toc .scorm_item a {
+    font-weight: bold;
+    font-size: 14px;
+    margin-right: 1px;
+    padding-bottom: 2px;
+    text-decoration: none;
+    color: #2F3E46;
+}
+
+.inner_lp_toc .scorm_item a.chapter_module {
+    font-weight: normal;
+    margin-right: 10px;
+}
+.inner_lp_toc .scorm_item_highlight {
+    border: 1px solid #999;
+    background:#999;
+    font-weight:bold;
+    text-shadow:0 -1px 1px #666;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#666),to(#999));
+    background-image:-webkit-linear-gradient(top,#666,#999);
+    background-image:-moz-linear-gradient(top,#666,#999);
+    background-image:-ms-linear-gradient(top,#666,#999);
+    background-image:-o-linear-gradient(top,#666,#999);
+    background-image:linear-gradient(top,#666,#999);
+    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: bold;
+}
+
+.inner_lp_toc .scorm_item_section {
+    border:1px solid #222;
+    background:#333;
+    font-weight:bold;
+    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 {
+    border-bottom: 1px solid #CCCCCC;
+    background:#eee;
+    font-weight:bold;
+    color:#444;
+    text-shadow:0 1px 1px #f6f6f6;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+    background:#FDFDFD;
+}
+
+.inner_lp_toc .scorm_item_2 {
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    border-bottom: 1px solid #CCCCCC;
+    color: #444444;
+    font-weight: bold;
+    text-shadow: 0 1px 1px #F6F6F6;
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+}
+
+.inner_lp_toc .scorm_item_section .scorm_item:before
+{
+    content : url('../../img/lp_section.png');  /* from main/newscorm/lp_controller.php file */
+    vertical-align: text-top;
+    margin-right : 5px;
+}
+
+.scorm_section_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_section_level_1 {
+    padding : 0 0.5em 0 2em;
+}
+
+.scorm_section_level_2 {
+    padding : 0 0.5em 0 4em;
+}
+
+.scorm_section_level_3 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_section_level_4 {
+    padding : 0 0.5em 0 8em;
+}
+
+.scorm_section_level_5 {
+    padding : 0 0.5em 0 10em;
+}
+
+.scorm_item_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_item_level_1 {
+    padding : 0 0.5em 0 1.5em;
+}
+
+.scorm_item_level_2 {
+    padding : 0 0.5em 0 3em;
+}
+
+.scorm_item_level_3 {
+    padding : 0 0.5em 0 4.5em;
+}
+
+.scorm_item_level_4 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_item_level_5 {
+    padding : 0 0.5em 0 7.5em;
+}
+
+/* end of copy of default_scorm.css */
+
+
 .scormpage {
 	height: 100%;
 }

+ 163 - 2
main/css/fruity_orange/scorm.css

@@ -1,3 +1,166 @@
+/* copy of default_scorm.css */
+
+.inner_lp_toc {
+    overflow: auto;
+    background-color: white;
+    height: 210px;
+}
+
+.inner_lp_toc .scorm_item a {
+    font-weight: bold;
+    font-size: 14px;
+    margin-right: 1px;
+    padding-bottom: 2px;
+    text-decoration: none;
+    color: #2F3E46;
+}
+
+.inner_lp_toc .scorm_item a.chapter_module {
+    font-weight: normal;
+    margin-right: 10px;
+}
+.inner_lp_toc .scorm_item_highlight {
+    border: 1px solid #999;
+    background:#999;
+    font-weight:bold;
+    text-shadow:0 -1px 1px #666;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#666),to(#999));
+    background-image:-webkit-linear-gradient(top,#666,#999);
+    background-image:-moz-linear-gradient(top,#666,#999);
+    background-image:-ms-linear-gradient(top,#666,#999);
+    background-image:-o-linear-gradient(top,#666,#999);
+    background-image:linear-gradient(top,#666,#999);
+    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: bold;
+}
+
+.inner_lp_toc .scorm_item_section {
+    border:1px solid #222;
+    background:#333;
+    font-weight:bold;
+    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 {
+    border-bottom: 1px solid #CCCCCC;
+    background:#eee;
+    font-weight:bold;
+    color:#444;
+    text-shadow:0 1px 1px #f6f6f6;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+    background:#FDFDFD;
+}
+
+.inner_lp_toc .scorm_item_2 {
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    border-bottom: 1px solid #CCCCCC;
+    color: #444444;
+    font-weight: bold;
+    text-shadow: 0 1px 1px #F6F6F6;
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+}
+
+.inner_lp_toc .scorm_item_section .scorm_item:before
+{
+    content : url('../../img/lp_section.png');  /* from main/newscorm/lp_controller.php file */
+    vertical-align: text-top;
+    margin-right : 5px;
+}
+
+.scorm_section_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_section_level_1 {
+    padding : 0 0.5em 0 2em;
+}
+
+.scorm_section_level_2 {
+    padding : 0 0.5em 0 4em;
+}
+
+.scorm_section_level_3 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_section_level_4 {
+    padding : 0 0.5em 0 8em;
+}
+
+.scorm_section_level_5 {
+    padding : 0 0.5em 0 10em;
+}
+
+.scorm_item_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_item_level_1 {
+    padding : 0 0.5em 0 1.5em;
+}
+
+.scorm_item_level_2 {
+    padding : 0 0.5em 0 3em;
+}
+
+.scorm_item_level_3 {
+    padding : 0 0.5em 0 4.5em;
+}
+
+.scorm_item_level_4 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_item_level_5 {
+    padding : 0 0.5em 0 7.5em;
+}
+
+/* end of copy of default_scorm.css */
+
+
 .scormpage {
 	height: 100%;
 }
@@ -76,8 +239,6 @@
 }
 .inner_lp_toc .scorm_title_text {
 	margin-left: 10px;
- //padding: 2px;
- //cambiado no existe
 }
 .inner_lp_toc .scorm_status_img {
 	margin:0px;

+ 163 - 1
main/css/medical/scorm.css

@@ -1,3 +1,166 @@
+/* copy of default_scorm.css */
+
+.inner_lp_toc {
+    overflow: auto;
+    background-color: white;
+    height: 210px;
+}
+
+.inner_lp_toc .scorm_item a {
+    font-weight: bold;
+    font-size: 14px;
+    margin-right: 1px;
+    padding-bottom: 2px;
+    text-decoration: none;
+    color: #2F3E46;
+}
+
+.inner_lp_toc .scorm_item a.chapter_module {
+    font-weight: normal;
+    margin-right: 10px;
+}
+.inner_lp_toc .scorm_item_highlight {
+    border: 1px solid #999;
+    background:#999;
+    font-weight:bold;
+    text-shadow:0 -1px 1px #666;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#666),to(#999));
+    background-image:-webkit-linear-gradient(top,#666,#999);
+    background-image:-moz-linear-gradient(top,#666,#999);
+    background-image:-ms-linear-gradient(top,#666,#999);
+    background-image:-o-linear-gradient(top,#666,#999);
+    background-image:linear-gradient(top,#666,#999);
+    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: bold;
+}
+
+.inner_lp_toc .scorm_item_section {
+    border:1px solid #222;
+    background:#333;
+    font-weight:bold;
+    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 {
+    border-bottom: 1px solid #CCCCCC;
+    background:#eee;
+    font-weight:bold;
+    color:#444;
+    text-shadow:0 1px 1px #f6f6f6;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+    background:#FDFDFD;
+}
+
+.inner_lp_toc .scorm_item_2 {
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    border-bottom: 1px solid #CCCCCC;
+    color: #444444;
+    font-weight: bold;
+    text-shadow: 0 1px 1px #F6F6F6;
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+}
+
+.inner_lp_toc .scorm_item_section .scorm_item:before
+{
+    content : url('../../img/lp_section.png');  /* from main/newscorm/lp_controller.php file */
+    vertical-align: text-top;
+    margin-right : 5px;
+}
+
+.scorm_section_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_section_level_1 {
+    padding : 0 0.5em 0 2em;
+}
+
+.scorm_section_level_2 {
+    padding : 0 0.5em 0 4em;
+}
+
+.scorm_section_level_3 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_section_level_4 {
+    padding : 0 0.5em 0 8em;
+}
+
+.scorm_section_level_5 {
+    padding : 0 0.5em 0 10em;
+}
+
+.scorm_item_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_item_level_1 {
+    padding : 0 0.5em 0 1.5em;
+}
+
+.scorm_item_level_2 {
+    padding : 0 0.5em 0 3em;
+}
+
+.scorm_item_level_3 {
+    padding : 0 0.5em 0 4.5em;
+}
+
+.scorm_item_level_4 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_item_level_5 {
+    padding : 0 0.5em 0 7.5em;
+}
+
+/* end of copy of default_scorm.css */
+
+
 .scormpage {
 	height: 100%;
 }
@@ -102,7 +265,6 @@
 .lp_navigation_elem .progresstext {
 	margin-top: -20px;
 	margin-left: 40%;
-//em  font-size: normal;
 }
 /*.scormpage .menu */
 .lp_navigation_elem .buttons {

+ 163 - 0
main/css/public_admin/scorm.css

@@ -1,3 +1,166 @@
+/* copy of default_scorm.css */
+
+.inner_lp_toc {
+    overflow: auto;
+    background-color: white;
+    height: 210px;
+}
+
+.inner_lp_toc .scorm_item a {
+    font-weight: bold;
+    font-size: 14px;
+    margin-right: 1px;
+    padding-bottom: 2px;
+    text-decoration: none;
+    color: #2F3E46;
+}
+
+.inner_lp_toc .scorm_item a.chapter_module {
+    font-weight: normal;
+    margin-right: 10px;
+}
+.inner_lp_toc .scorm_item_highlight {
+    border: 1px solid #999;
+    background:#999;
+    font-weight:bold;
+    text-shadow:0 -1px 1px #666;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#666),to(#999));
+    background-image:-webkit-linear-gradient(top,#666,#999);
+    background-image:-moz-linear-gradient(top,#666,#999);
+    background-image:-ms-linear-gradient(top,#666,#999);
+    background-image:-o-linear-gradient(top,#666,#999);
+    background-image:linear-gradient(top,#666,#999);
+    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: bold;
+}
+
+.inner_lp_toc .scorm_item_section {
+    border:1px solid #222;
+    background:#333;
+    font-weight:bold;
+    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 {
+    border-bottom: 1px solid #CCCCCC;
+    background:#eee;
+    font-weight:bold;
+    color:#444;
+    text-shadow:0 1px 1px #f6f6f6;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+    background:#FDFDFD;
+}
+
+.inner_lp_toc .scorm_item_2 {
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    border-bottom: 1px solid #CCCCCC;
+    color: #444444;
+    font-weight: bold;
+    text-shadow: 0 1px 1px #F6F6F6;
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+}
+
+.inner_lp_toc .scorm_item_section .scorm_item:before
+{
+    content : url('../../img/lp_section.png');  /* from main/newscorm/lp_controller.php file */
+    vertical-align: text-top;
+    margin-right : 5px;
+}
+
+.scorm_section_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_section_level_1 {
+    padding : 0 0.5em 0 2em;
+}
+
+.scorm_section_level_2 {
+    padding : 0 0.5em 0 4em;
+}
+
+.scorm_section_level_3 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_section_level_4 {
+    padding : 0 0.5em 0 8em;
+}
+
+.scorm_section_level_5 {
+    padding : 0 0.5em 0 10em;
+}
+
+.scorm_item_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_item_level_1 {
+    padding : 0 0.5em 0 1.5em;
+}
+
+.scorm_item_level_2 {
+    padding : 0 0.5em 0 3em;
+}
+
+.scorm_item_level_3 {
+    padding : 0 0.5em 0 4.5em;
+}
+
+.scorm_item_level_4 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_item_level_5 {
+    padding : 0 0.5em 0 7.5em;
+}
+
+/* end of copy of default_scorm.css */
+
+
 .scormpage {
 	height: 100%;
 }

+ 163 - 2
main/css/royal_purple/scorm.css

@@ -1,3 +1,166 @@
+/* copy of default_scorm.css */
+
+.inner_lp_toc {
+    overflow: auto;
+    background-color: white;
+    height: 210px;
+}
+
+.inner_lp_toc .scorm_item a {
+    font-weight: bold;
+    font-size: 14px;
+    margin-right: 1px;
+    padding-bottom: 2px;
+    text-decoration: none;
+    color: #2F3E46;
+}
+
+.inner_lp_toc .scorm_item a.chapter_module {
+    font-weight: normal;
+    margin-right: 10px;
+}
+.inner_lp_toc .scorm_item_highlight {
+    border: 1px solid #999;
+    background:#999;
+    font-weight:bold;
+    text-shadow:0 -1px 1px #666;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#666),to(#999));
+    background-image:-webkit-linear-gradient(top,#666,#999);
+    background-image:-moz-linear-gradient(top,#666,#999);
+    background-image:-ms-linear-gradient(top,#666,#999);
+    background-image:-o-linear-gradient(top,#666,#999);
+    background-image:linear-gradient(top,#666,#999);
+    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: bold;
+}
+
+.inner_lp_toc .scorm_item_section {
+    border:1px solid #222;
+    background:#333;
+    font-weight:bold;
+    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 {
+    border-bottom: 1px solid #CCCCCC;
+    background:#eee;
+    font-weight:bold;
+    color:#444;
+    text-shadow:0 1px 1px #f6f6f6;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+    background:#FDFDFD;
+}
+
+.inner_lp_toc .scorm_item_2 {
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    border-bottom: 1px solid #CCCCCC;
+    color: #444444;
+    font-weight: bold;
+    text-shadow: 0 1px 1px #F6F6F6;
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+}
+
+.inner_lp_toc .scorm_item_section .scorm_item:before
+{
+    content : url('../../img/lp_section.png');  /* from main/newscorm/lp_controller.php file */
+    vertical-align: text-top;
+    margin-right : 5px;
+}
+
+.scorm_section_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_section_level_1 {
+    padding : 0 0.5em 0 2em;
+}
+
+.scorm_section_level_2 {
+    padding : 0 0.5em 0 4em;
+}
+
+.scorm_section_level_3 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_section_level_4 {
+    padding : 0 0.5em 0 8em;
+}
+
+.scorm_section_level_5 {
+    padding : 0 0.5em 0 10em;
+}
+
+.scorm_item_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_item_level_1 {
+    padding : 0 0.5em 0 1.5em;
+}
+
+.scorm_item_level_2 {
+    padding : 0 0.5em 0 3em;
+}
+
+.scorm_item_level_3 {
+    padding : 0 0.5em 0 4.5em;
+}
+
+.scorm_item_level_4 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_item_level_5 {
+    padding : 0 0.5em 0 7.5em;
+}
+
+/* end of copy of default_scorm.css */
+
+
 .scormpage {
 	height: 100%;
 }
@@ -76,8 +239,6 @@
 }
 .inner_lp_toc .scorm_title_text {
 	margin-left: 10px;
- //padding: 2px;
- //cambiado no existe
 }
 .inner_lp_toc .scorm_status_img {
 	margin:0px;

+ 163 - 2
main/css/silver_line/scorm.css

@@ -1,3 +1,166 @@
+/* copy of default_scorm.css */
+
+.inner_lp_toc {
+    overflow: auto;
+    background-color: white;
+    height: 210px;
+}
+
+.inner_lp_toc .scorm_item a {
+    font-weight: bold;
+    font-size: 14px;
+    margin-right: 1px;
+    padding-bottom: 2px;
+    text-decoration: none;
+    color: #2F3E46;
+}
+
+.inner_lp_toc .scorm_item a.chapter_module {
+    font-weight: normal;
+    margin-right: 10px;
+}
+.inner_lp_toc .scorm_item_highlight {
+    border: 1px solid #999;
+    background:#999;
+    font-weight:bold;
+    text-shadow:0 -1px 1px #666;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#666),to(#999));
+    background-image:-webkit-linear-gradient(top,#666,#999);
+    background-image:-moz-linear-gradient(top,#666,#999);
+    background-image:-ms-linear-gradient(top,#666,#999);
+    background-image:-o-linear-gradient(top,#666,#999);
+    background-image:linear-gradient(top,#666,#999);
+    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: bold;
+}
+
+.inner_lp_toc .scorm_item_section {
+    border:1px solid #222;
+    background:#333;
+    font-weight:bold;
+    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 {
+    border-bottom: 1px solid #CCCCCC;
+    background:#eee;
+    font-weight:bold;
+    color:#444;
+    text-shadow:0 1px 1px #f6f6f6;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+    background:#FDFDFD;
+}
+
+.inner_lp_toc .scorm_item_2 {
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    border-bottom: 1px solid #CCCCCC;
+    color: #444444;
+    font-weight: bold;
+    text-shadow: 0 1px 1px #F6F6F6;
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+}
+
+.inner_lp_toc .scorm_item_section .scorm_item:before
+{
+    content : url('../../img/lp_section.png');  /* from main/newscorm/lp_controller.php file */
+    vertical-align: text-top;
+    margin-right : 5px;
+}
+
+.scorm_section_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_section_level_1 {
+    padding : 0 0.5em 0 2em;
+}
+
+.scorm_section_level_2 {
+    padding : 0 0.5em 0 4em;
+}
+
+.scorm_section_level_3 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_section_level_4 {
+    padding : 0 0.5em 0 8em;
+}
+
+.scorm_section_level_5 {
+    padding : 0 0.5em 0 10em;
+}
+
+.scorm_item_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_item_level_1 {
+    padding : 0 0.5em 0 1.5em;
+}
+
+.scorm_item_level_2 {
+    padding : 0 0.5em 0 3em;
+}
+
+.scorm_item_level_3 {
+    padding : 0 0.5em 0 4.5em;
+}
+
+.scorm_item_level_4 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_item_level_5 {
+    padding : 0 0.5em 0 7.5em;
+}
+
+/* end of copy of default_scorm.css */
+
+
 .scormpage {
 	height: 100%;
 }
@@ -138,8 +301,6 @@ margin-top: 0px;
 	clear: both;
 }
 .preview_image {
- //text-align: right;
- //margin-right: 5px;
 	padding-left: 17px;
 }
 .scorm_title_text {

+ 164 - 2
main/css/sober_brown/scorm.css

@@ -1,3 +1,166 @@
+/* copy of default_scorm.css */
+
+.inner_lp_toc {
+    overflow: auto;
+    background-color: white;
+    height: 210px;
+}
+
+.inner_lp_toc .scorm_item a {
+    font-weight: bold;
+    font-size: 14px;
+    margin-right: 1px;
+    padding-bottom: 2px;
+    text-decoration: none;
+    color: #2F3E46;
+}
+
+.inner_lp_toc .scorm_item a.chapter_module {
+    font-weight: normal;
+    margin-right: 10px;
+}
+.inner_lp_toc .scorm_item_highlight {
+    border: 1px solid #999;
+    background:#999;
+    font-weight:bold;
+    text-shadow:0 -1px 1px #666;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#666),to(#999));
+    background-image:-webkit-linear-gradient(top,#666,#999);
+    background-image:-moz-linear-gradient(top,#666,#999);
+    background-image:-ms-linear-gradient(top,#666,#999);
+    background-image:-o-linear-gradient(top,#666,#999);
+    background-image:linear-gradient(top,#666,#999);
+    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: bold;
+}
+
+.inner_lp_toc .scorm_item_section {
+    border:1px solid #222;
+    background:#333;
+    font-weight:bold;
+    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 {
+    border-bottom: 1px solid #CCCCCC;
+    background:#eee;
+    font-weight:bold;
+    color:#444;
+    text-shadow:0 1px 1px #f6f6f6;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+    background:#FDFDFD;
+}
+
+.inner_lp_toc .scorm_item_2 {
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    border-bottom: 1px solid #CCCCCC;
+    color: #444444;
+    font-weight: bold;
+    text-shadow: 0 1px 1px #F6F6F6;
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+}
+
+.inner_lp_toc .scorm_item_section .scorm_item:before
+{
+    content : url('../../img/lp_section.png');  /* from main/newscorm/lp_controller.php file */
+    vertical-align: text-top;
+    margin-right : 5px;
+}
+
+.scorm_section_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_section_level_1 {
+    padding : 0 0.5em 0 2em;
+}
+
+.scorm_section_level_2 {
+    padding : 0 0.5em 0 4em;
+}
+
+.scorm_section_level_3 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_section_level_4 {
+    padding : 0 0.5em 0 8em;
+}
+
+.scorm_section_level_5 {
+    padding : 0 0.5em 0 10em;
+}
+
+.scorm_item_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_item_level_1 {
+    padding : 0 0.5em 0 1.5em;
+}
+
+.scorm_item_level_2 {
+    padding : 0 0.5em 0 3em;
+}
+
+.scorm_item_level_3 {
+    padding : 0 0.5em 0 4.5em;
+}
+
+.scorm_item_level_4 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_item_level_5 {
+    padding : 0 0.5em 0 7.5em;
+}
+
+/* end of copy of default_scorm.css */
+
+
 .scormpage {
 	height: 100%;
 }
@@ -103,7 +266,6 @@
 .lp_navigation_elem .progresstext {
 	margin-top: -20px;
 	margin-left: 40%;
-//em  font-size: normal;
 }
 /*.scormpage .menu */
 .lp_navigation_elem .buttons {
@@ -142,7 +304,7 @@
 	clear: both;
 }
 .preview_image {
- padding.left: 17px;
+ padding-left: 17px;
 }
 .scorm_title_text {
 	margin-left: 10px;

+ 163 - 4
main/css/steel_grey/scorm.css

@@ -1,3 +1,166 @@
+/* copy of default_scorm.css */
+
+.inner_lp_toc {
+    overflow: auto;
+    background-color: white;
+    height: 210px;
+}
+
+.inner_lp_toc .scorm_item a {
+    font-weight: bold;
+    font-size: 14px;
+    margin-right: 1px;
+    padding-bottom: 2px;
+    text-decoration: none;
+    color: #2F3E46;
+}
+
+.inner_lp_toc .scorm_item a.chapter_module {
+    font-weight: normal;
+    margin-right: 10px;
+}
+.inner_lp_toc .scorm_item_highlight {
+    border: 1px solid #999;
+    background:#999;
+    font-weight:bold;
+    text-shadow:0 -1px 1px #666;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#666),to(#999));
+    background-image:-webkit-linear-gradient(top,#666,#999);
+    background-image:-moz-linear-gradient(top,#666,#999);
+    background-image:-ms-linear-gradient(top,#666,#999);
+    background-image:-o-linear-gradient(top,#666,#999);
+    background-image:linear-gradient(top,#666,#999);
+    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: bold;
+}
+
+.inner_lp_toc .scorm_item_section {
+    border:1px solid #222;
+    background:#333;
+    font-weight:bold;
+    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 {
+    border-bottom: 1px solid #CCCCCC;
+    background:#eee;
+    font-weight:bold;
+    color:#444;
+    text-shadow:0 1px 1px #f6f6f6;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+    background:#FDFDFD;
+}
+
+.inner_lp_toc .scorm_item_2 {
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    border-bottom: 1px solid #CCCCCC;
+    color: #444444;
+    font-weight: bold;
+    text-shadow: 0 1px 1px #F6F6F6;
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+}
+
+.inner_lp_toc .scorm_item_section .scorm_item:before
+{
+    content : url('../../img/lp_section.png');  /* from main/newscorm/lp_controller.php file */
+    vertical-align: text-top;
+    margin-right : 5px;
+}
+
+.scorm_section_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_section_level_1 {
+    padding : 0 0.5em 0 2em;
+}
+
+.scorm_section_level_2 {
+    padding : 0 0.5em 0 4em;
+}
+
+.scorm_section_level_3 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_section_level_4 {
+    padding : 0 0.5em 0 8em;
+}
+
+.scorm_section_level_5 {
+    padding : 0 0.5em 0 10em;
+}
+
+.scorm_item_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_item_level_1 {
+    padding : 0 0.5em 0 1.5em;
+}
+
+.scorm_item_level_2 {
+    padding : 0 0.5em 0 3em;
+}
+
+.scorm_item_level_3 {
+    padding : 0 0.5em 0 4.5em;
+}
+
+.scorm_item_level_4 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_item_level_5 {
+    padding : 0 0.5em 0 7.5em;
+}
+
+/* end of copy of default_scorm.css */
+
+
 .scormpage {
 	height: 100%;
 }
@@ -27,7 +190,6 @@
 	font-size: 11px;
 	margin-left: 10px;
 	margin-right:10px;
-//cambiado era 20  padding-bottom: 2px;
 	text-decoration: none;
 }
 .inner_lp_toc .scorm_item A {
@@ -79,8 +241,6 @@
 }
 .inner_lp_toc .scorm_title_text {
 	margin-left: 10px;
- //padding: 2px;
- //cambiado no existe
 }
 .inner_lp_toc .scorm_status_img {
 	margin:0px;
@@ -107,7 +267,6 @@
 .lp_navigation_elem .progresstext {
 	margin-top: -20px;
 	margin-left: 40%;
-//em  font-size: normal;
 }
 /*.scormpage .menu */
 .lp_navigation_elem .buttons {

+ 163 - 2
main/css/tasty_olive/scorm.css

@@ -1,3 +1,166 @@
+/* copy of default_scorm.css */
+
+.inner_lp_toc {
+    overflow: auto;
+    background-color: white;
+    height: 210px;
+}
+
+.inner_lp_toc .scorm_item a {
+    font-weight: bold;
+    font-size: 14px;
+    margin-right: 1px;
+    padding-bottom: 2px;
+    text-decoration: none;
+    color: #2F3E46;
+}
+
+.inner_lp_toc .scorm_item a.chapter_module {
+    font-weight: normal;
+    margin-right: 10px;
+}
+.inner_lp_toc .scorm_item_highlight {
+    border: 1px solid #999;
+    background:#999;
+    font-weight:bold;
+    text-shadow:0 -1px 1px #666;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#666),to(#999));
+    background-image:-webkit-linear-gradient(top,#666,#999);
+    background-image:-moz-linear-gradient(top,#666,#999);
+    background-image:-ms-linear-gradient(top,#666,#999);
+    background-image:-o-linear-gradient(top,#666,#999);
+    background-image:linear-gradient(top,#666,#999);
+    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: bold;
+}
+
+.inner_lp_toc .scorm_item_section {
+    border:1px solid #222;
+    background:#333;
+    font-weight:bold;
+    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 {
+    border-bottom: 1px solid #CCCCCC;
+    background:#eee;
+    font-weight:bold;
+    color:#444;
+    text-shadow:0 1px 1px #f6f6f6;
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+    background:#FDFDFD;
+}
+
+.inner_lp_toc .scorm_item_2 {
+    background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));
+    background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-moz-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-ms-linear-gradient(top,#fdfdfd,#eee);
+    background-image:-o-linear-gradient(top,#fdfdfd,#eee);
+    background-image:linear-gradient(top,#fdfdfd,#eee);
+    border-bottom: 1px solid #CCCCCC;
+    color: #444444;
+    font-weight: bold;
+    text-shadow: 0 1px 1px #F6F6F6;
+    margin-right: 1px;
+    padding: 10px 0px 10px 0px;
+    text-decoration: none;
+    font-weight: normal;
+}
+
+.inner_lp_toc .scorm_item_section .scorm_item:before
+{
+    content : url('../../img/lp_section.png');  /* from main/newscorm/lp_controller.php file */
+    vertical-align: text-top;
+    margin-right : 5px;
+}
+
+.scorm_section_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_section_level_1 {
+    padding : 0 0.5em 0 2em;
+}
+
+.scorm_section_level_2 {
+    padding : 0 0.5em 0 4em;
+}
+
+.scorm_section_level_3 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_section_level_4 {
+    padding : 0 0.5em 0 8em;
+}
+
+.scorm_section_level_5 {
+    padding : 0 0.5em 0 10em;
+}
+
+.scorm_item_level_0 {
+    padding : 0 0 0 0;
+}
+
+.scorm_item_level_1 {
+    padding : 0 0.5em 0 1.5em;
+}
+
+.scorm_item_level_2 {
+    padding : 0 0.5em 0 3em;
+}
+
+.scorm_item_level_3 {
+    padding : 0 0.5em 0 4.5em;
+}
+
+.scorm_item_level_4 {
+    padding : 0 0.5em 0 6em;
+}
+
+.scorm_item_level_5 {
+    padding : 0 0.5em 0 7.5em;
+}
+
+/* end of copy of default_scorm.css */
+
+
 .scormpage {
 	height: 100%;
 }
@@ -76,8 +239,6 @@
 }
 .inner_lp_toc .scorm_title_text {
 	margin-left: 10px;
- //padding: 2px;
- //cambiado no existe
 }
 .inner_lp_toc .scorm_status_img {
 	margin:0px;

BIN=BIN
main/img/lp_section.png


+ 30 - 1
main/inc/lib/course.lib.php

@@ -150,6 +150,7 @@ class CourseManager
      * @param    string    $startwith If defined, only return results for which the course *title* begins with this string
      * @param    string    $urlId The Access URL ID, if using multiple URLs
      * @param    string    $alsoSearchCode An extension option to indicate that we also want to search for course codes (not *only* titles)
+     * @param array $conditions
      * @return array
      */
     public static function get_courses_list(
@@ -160,7 +161,8 @@ class CourseManager
         $visibility = -1,
         $startwith = '',
         $urlId = null,
-        $alsoSearchCode = false
+        $alsoSearchCode = false,
+        $conditionsLike = array()
     ) {
 
         $sql = "SELECT course.* FROM ".Database::get_main_table(TABLE_MAIN_COURSE)." course ";
@@ -191,6 +193,33 @@ class CourseManager
             $sql .= " AND access_url_id= $urlId";
         }
 
+        $allowedFields = array(
+          'title',
+           'code'
+        );
+
+        if (count($conditionsLike) > 0) {
+            $sql .= ' AND ';
+            $temp_conditions = array();
+            foreach ($conditionsLike as $field => $value) {
+                if (!in_array($field, $allowedFields)) {
+                    continue;
+                }
+                $field = Database::escape_string($field);
+                $value = Database::escape_string($value);
+                $simple_like = false;
+                if ($simple_like) {
+                    $temp_conditions[] = $field." LIKE '$value%'";
+                } else {
+                    $temp_conditions[] = $field.' LIKE \'%'.$value.'%\'';
+                }
+            }
+            $condition = ' AND ';
+            if (!empty($temp_conditions)) {
+                $sql .= implode(' '.$condition.' ', $temp_conditions);
+            }
+        }
+
         if (!empty($orderby)) {
             $sql .= " ORDER BY ".Database::escape_string($orderby)." ";
         } else {

+ 4 - 0
main/inc/lib/main_api.lib.php

@@ -259,6 +259,7 @@ define('SYS_CODE_PATH', 'SYS_CODE_PATH');
 define('SYS_LANG_PATH', 'SYS_LANG_PATH');
 define('WEB_IMG_PATH', 'WEB_IMG_PATH');
 define('WEB_CSS_PATH', 'WEB_CSS_PATH');
+define('SYS_CSS_PATH', 'SYS_CSS_PATH');
 define('SYS_PLUGIN_PATH', 'SYS_PLUGIN_PATH');
 define('PLUGIN_PATH', 'SYS_PLUGIN_PATH'); // deprecated ?
 define('WEB_PLUGIN_PATH', 'WEB_PLUGIN_PATH');
@@ -400,6 +401,7 @@ require_once dirname(__FILE__).'/internationalization.lib.php';
  * api_get_path(SYS_PLUGIN_PATH)                /var/www/chamilo/plugin/
  * api_get_path(SYS_TEST_PATH)                  /var/www/chamilo/tests/
  * api_get_path(SYS_TEMPLATE_PATH)              /var/www/chamilo/main/template/
+ * api_get_path(SYS_CSS_PATH)                   /var/www/chamilo/main/css/
  *
  * api_get_path(WEB_SERVER_ROOT_PATH)           http://www.mychamilo.org/
  * api_get_path(WEB_PATH)                       http://www.mychamilo.org/chamilo/
@@ -445,6 +447,7 @@ function api_get_path($path_type, $path = null) {
         SYS_LANG_PATH           => 'lang/',
         WEB_IMG_PATH            => 'img/',
         WEB_CSS_PATH            => 'css/',
+        SYS_CSS_PATH            => 'css/',
         SYS_PLUGIN_PATH         => 'plugin/',
         WEB_PLUGIN_PATH         => 'plugin/',
         SYS_ARCHIVE_PATH        => 'archive/',
@@ -560,6 +563,7 @@ function api_get_path($path_type, $path = null) {
         $paths[SYS_ARCHIVE_PATH]        = $paths[SYS_PATH].$paths[SYS_ARCHIVE_PATH];
         $paths[SYS_TEST_PATH]           = $paths[SYS_PATH].$paths[SYS_TEST_PATH];
         $paths[SYS_TEMPLATE_PATH]       = $paths[SYS_CODE_PATH].$paths[SYS_TEMPLATE_PATH];
+        $paths[SYS_CSS_PATH]            = $paths[SYS_CODE_PATH].$paths[SYS_CSS_PATH];
 
         $paths[WEB_CSS_PATH]            = $paths[WEB_CODE_PATH].$paths[WEB_CSS_PATH];
         $paths[WEB_IMG_PATH]            = $paths[WEB_CODE_PATH].$paths[WEB_IMG_PATH];

+ 42 - 42
main/inc/lib/pear/HTML/QuickForm/Rule/Compare.php

@@ -1,29 +1,29 @@
 <?php
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
+/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
 
-/**
- * Rule to compare two form fields
- *
- * PHP versions 4 and 5
- *
- * LICENSE: This source file is subject to version 3.01 of the PHP license
- * that is available through the world-wide-web at the following URI:
- * http://www.php.net/license/3_01.txt If you did not receive a copy of
- * the PHP License and are unable to obtain it through the web, please
- * send a note to license@php.net so we can mail you a copy immediately.
- *
- * @category    HTML
- * @package     HTML_QuickForm
- * @author      Alexey Borzov <avb@php.net>
- * @copyright   2001-2009 The PHP Group
- * @license     http://www.php.net/license/3_01.txt PHP License 3.01
- * @version     CVS: $Id: Compare.php,v 1.7 2009/04/04 21:34:04 avb Exp $
- * @link        http://pear.php.net/package/HTML_QuickForm
- */
-
-/**
- * Abstract base class for QuickForm validation rules
- */
+/**
+ * Rule to compare two form fields
+ *
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This source file is subject to version 3.01 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * http://www.php.net/license/3_01.txt If you did not receive a copy of
+ * the PHP License and are unable to obtain it through the web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * @category    HTML
+ * @package     HTML_QuickForm
+ * @author      Alexey Borzov <avb@php.net>
+ * @copyright   2001-2009 The PHP Group
+ * @license     http://www.php.net/license/3_01.txt PHP License 3.01
+ * @version     CVS: $Id: Compare.php,v 1.7 2009/04/04 21:34:04 avb Exp $
+ * @link        http://pear.php.net/package/HTML_QuickForm
+ */
+
+/**
+ * Abstract base class for QuickForm validation rules
+ */
 require_once 'HTML/QuickForm/Rule.php';
 
 /**
@@ -32,11 +32,11 @@ require_once 'HTML/QuickForm/Rule.php';
  * The most common usage for this is to ensure that the password
  * confirmation field matches the password field
  *
- * @category    HTML
- * @package     HTML_QuickForm
- * @author      Alexey Borzov <avb@php.net>
- * @version     Release: 3.2.11
- * @since       3.2
+ * @category    HTML
+ * @package     HTML_QuickForm
+ * @author      Alexey Borzov <avb@php.net>
+ * @version     Release: 3.2.11
+ * @since       3.2
  */
 class HTML_QuickForm_Rule_Compare extends HTML_QuickForm_Rule
 {
@@ -46,14 +46,14 @@ class HTML_QuickForm_Rule_Compare extends HTML_QuickForm_Rule
     * @access private
     */
     var $_operators = array(
-        'eq'  => '===',
-        'neq' => '!==',
+        'eq'  => '===',
+        'neq' => '!==',
         'gt'  => '>',
         'gte' => '>=',
         'lt'  => '<',
-        'lte' => '<=',
-        '=='  => '===',
-        '!='  => '!=='
+        'lte' => '<=',
+        '=='  => '===',
+        '!='  => '!=='
     );
 
 
@@ -64,16 +64,16 @@ class HTML_QuickForm_Rule_Compare extends HTML_QuickForm_Rule
     * @param  string     operator name
     * @return string     operator to use for validation
     */
-    function _findOperator($name)
-    {
+    function _findOperator($name) {
+        $name = trim($name);
         if (empty($name)) {
-            return '===';
+            return '===';
         } elseif (isset($this->_operators[$name])) {
             return $this->_operators[$name];
         } elseif (in_array($name, $this->_operators)) {
             return $name;
         } else {
-            return '===';
+            return '===';
         }
     }
 
@@ -81,10 +81,10 @@ class HTML_QuickForm_Rule_Compare extends HTML_QuickForm_Rule
     function validate($values, $operator = null)
     {
         $operator = $this->_findOperator($operator);
-        if ('===' != $operator && '!==' != $operator) {
+        if ('===' != $operator && '!==' != $operator) {
             $compareFn = create_function('$a, $b', 'return floatval($a) ' . $operator . ' floatval($b);');
         } else {
-            $compareFn = create_function('$a, $b', 'return strval($a) ' . $operator . ' strval($b);');
+            $compareFn = create_function('$a, $b', 'return strval($a) ' . $operator . ' strval($b);');
         }
 
         return $compareFn($values[0], $values[1]);
@@ -94,10 +94,10 @@ class HTML_QuickForm_Rule_Compare extends HTML_QuickForm_Rule
     function getValidationScript($operator = null)
     {
         $operator = $this->_findOperator($operator);
-        if ('===' != $operator && '!==' != $operator) {
+        if ('===' != $operator && '!==' != $operator) {
             $check = "!(Number({jsVar}[0]) {$operator} Number({jsVar}[1]))";
         } else {
-            $check = "!(String({jsVar}[0]) {$operator} String({jsVar}[1]))";
+            $check = "!(String({jsVar}[0]) {$operator} String({jsVar}[1]))";
         }
         return array('', "'' != {jsVar}[0] && {$check}");
     }

+ 5 - 0
main/inc/lib/template.lib.php

@@ -446,6 +446,11 @@ class Template
             $css[] = api_get_path(WEB_CSS_PATH).$this->theme.'/scorm.css';
         }
 
+        // if we have a scorm file in theme dont use default_scorm.css file
+        if (!is_file(api_get_path(SYS_CSS_PATH) . $this->theme . '/scorm.css')) {
+            $css[] = api_get_cdn_path(api_get_path(WEB_CSS_PATH).'/default_scorm.css');
+        }
+
         if (api_is_global_chat_enabled()) {
             $css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/chat/css/chat.css';
         }

+ 39 - 7
main/inc/lib/usergroup.lib.php

@@ -147,29 +147,61 @@ class UserGroup extends Model
     /**
      * Gets a list of course ids by user group
      * @param   int user group id
+     * @param array $conditionsLike
      * @return  array
      */
-    public function get_courses_by_usergroup($id)
+    public function get_courses_by_usergroup($id, $loadCourseData = false)
     {
         if ($this->useMultipleUrl) {
             $urlId = api_get_current_access_url_id();
             $from = $this->usergroup_rel_course_table." c
-                    INNER JOIN {$this->access_url_rel_usergroup} a ON (a.usergroup_id = c.usergroup_id) ";
-            $where = array('where' => array('a.usergroup_id = ? AND access_url_id = ? ' => array($id, $urlId)));
+                    INNER JOIN {$this->access_url_rel_usergroup} a
+                    ON (a.usergroup_id = c.usergroup_id) ";
+            $whereConditionSql = 'a.usergroup_id = ? AND access_url_id = ? ';
+            $whereConditionValues = array($id, $urlId);
+        } else {
+            $whereConditionSql = 'usergroup_id = ?';
+            $whereConditionValues = array($id);
+            $from = $this->usergroup_rel_course_table." c ";
+        }
+
+        if ($loadCourseData) {
+            $from .= " INNER JOIN {$this->table_course} as course ON c.course_id = course.id";
+        }
+
+        /*
+        if (!empty($conditionsLike)) {
+            $from .= " INNER JOIN {$this->table_course} as course ON c.course_id = course.id";
+            $conditionSql = array();
+            foreach ($conditionsLike as $field => $value) {
+                $conditionSql[] = $field.' LIKE %?%';
+                $whereConditionValues[] = $value;
+            }
+            $whereConditionSql .= ' AND '.implode(' AND ', $conditionSql);
+        }*/
+
+        $where = array('where' => array($whereConditionSql => $whereConditionValues));
+
+        if ($loadCourseData) {
+            $select = 'course.*';
         } else {
-            $from = $this->usergroup_rel_course_table;
-            $where = array('where' => array('usergroup_id = ?' => $id));
+            $select = 'course_id';
         }
 
         $results = Database::select(
-            'course_id',
+            $select,
             $from,
             $where
         );
+
         $array = array();
         if (!empty($results)) {
             foreach ($results as $row) {
-                $array[] = $row['course_id'];
+                if ($loadCourseData) {
+                    $array[$row['id']] = $row;
+                } else {
+                    $array[] = $row['course_id'];
+                }
             }
         }
         return $array;

+ 51 - 33
main/newscorm/learnpath.class.php

@@ -77,6 +77,25 @@ class learnpath
     public $course_int_id;
     public $course_info = array();
 
+
+
+    /**
+     * Get the depth level of LP item
+     * @param $in_tab_items
+     * @param $in_current_item_id
+     * @return int
+     */
+    private static function get_level_for_item($in_tab_items, $in_current_item_id)
+    {
+        $parent_item_id = $in_tab_items[$in_current_item_id]->parent;
+        if ($parent_item_id == 0) {
+            return 0;
+        } else {
+            return learnpath::get_level_for_item($in_tab_items, $parent_item_id) + 1;
+        }
+    }
+
+
     /**
     * Class constructor. Needs a database handler, a course code and a learnpath id from the database.
     * Also builds the list of items into $this->items.
@@ -280,22 +299,10 @@ class learnpath
                     break;
             }
 
-            // Items is a list of pointers to all items, classified by DB ID, not SCO id.
-            if ($row['parent_item_id'] == 0 || empty ($this->items[$row['parent_item_id']])) {
-                if (is_object($this->items[$row['id']])) {
-                  $this->items[$row['id']]->set_level(0);
-                }
-            } else {
-                $level = $this->items[$row['parent_item_id']]->get_level() + 1;
-                $this->items[$row['id']]->set_level($level);
-                if (is_object($this->items[$row['parent_item_id']])) {
-                    // Items is a list of pointers from item DB ids to item objects.
-                    $this->items[$row['parent_item_id']]->add_child($row['id']);
-                } else {
-                    if ($this->debug > 2) {
-                        error_log('New LP - learnpath::__construct() ' . __LINE__ . ' - The parent item (' . $row['parent_item_id'] . ') of item ' . $row['id'] . ' could not be found', 0);
-                    }
-                }
+            // Setting the object level with variable $this->items[$i][parent]
+            foreach ($this->items as $itemLPObject) {
+                $level = learnpath::get_level_for_item($this->items, $itemLPObject->db_id);
+                $itemLPObject->level = $level;
             }
 
             // Setting the view in the item object.
@@ -2897,30 +2904,28 @@ class learnpath
                 $html .= '<div id="toc_' . $item['id'] . '" class="' . $scorm_color_background . '">';
             }
 
-            // The anchor will let us center the TOC on the currently viewed item &^D
-            if ($item['type'] != 'dokeos_module' && $item['type'] != 'dokeos_chapter') {
-                $html .= '<div class="' . $style_item . '" style="padding-left: ' . ($item['level'] * 1.5) . 'em; padding-right:' . ($item['level'] / 2) . 'em"             title="' . $item['description'] . '" >';
-                $html .= '<a name="atoc_' . $item['id'] . '" ></a>';
-            } else {
-                $html .= '<div class="' . $style_item . '" style="padding-left: ' . ($item['level'] * 2) . 'em; padding-right:' . ($item['level'] * 1.5) . 'em"             title="' . $item['description'] . '" >';
-            }
+            // Learning path title
             $title = $item['title'];
             if (empty ($title)) {
                 $title = rl_get_resource_name(api_get_course_id(), $this->get_id(), $item['id']);
             }
-
             $title = Security::remove_XSS($title);
-            if ($item['type'] != 'dokeos_chapter' && $item['type'] != 'dir' && $item['type'] != 'dokeos_module') {
-                //$html .= "<a href='lp_controller.php?".api_get_cidreq()."&action=content&lp_id=".$this->get_id()."&item_id=".$item['id']."' target='lp_content_frame_name'>".$title."</a>" ;
-                $url = $this->get_link('http', $item['id'], $toc_list);
-                //$html .= '<a href="'.$url.'" target="content_name" onClick="top.load_item('.$item['id'].',\''.$url.'\');">'.$title.'</a>' ;
-                //$html .= '<a href="" onClick="top.load_item('.$item['id'].',\''.$url.'\');return false;">'.$title.'</a>' ;
 
-                //<img align="absbottom" width="13" height="13" src="../img/lp_document.png">&nbsp;background:#aaa;
+             // Learning path personalization
+            // build the LP tree
+            // The anchor atoc_ will let us center the TOC on the currently viewed item &^D
+            if ($item['type'] != 'dokeos_module' && $item['type'] != 'dokeos_chapter') {
+                $html .= '<div class="'.$style_item .' scorm_item_level_'.$item['level'].' scorm_type_'.learnpath::format_scorm_type_item($item['type']).'" title="'.$item['description'].'" >';
+                $html .= '<a name="atoc_'.$item['id'].'" />';
+            } else {
+                $html .= '<div class="'.$style_item.' scorm_section_level_'.$item['level'].'" title="'.$item['description'].'" >';
+            }
+            // display title
+            if ($item['type'] != 'dokeos_chapter' && $item['type'] != 'dir' && $item['type'] != 'dokeos_module') {
+                $this->get_link('http', $item['id'], $toc_list);
                 $html .= '<a href="" onClick="switch_item(' .$mycurrentitemid . ',' .$item['id'] . ');' .'return false;" >' . stripslashes($title) . '</a>';
-            } elseif ($item['type'] == 'dokeos_module' || $item['type'] == 'dokeos_chapter') {
-                $html .= "<img align='absbottom' width='13' height='13' src='../img/lp_dokeos_module.png'>&nbsp;" . stripslashes($title);
-            } elseif ($item['type'] == 'dir') {
+            } else {
+                // if you want to put an image before, you should use css
                 $html .= stripslashes($title);
             }
 
@@ -9283,6 +9288,19 @@ EOD;
             }
         }
     }
+
+
+    /**
+     * Return the scorm item type object with spaces replaced with _
+     * The return result is use to build a css classname like scorm_type_$return
+     * @param $in_type
+     * @return mixed
+     */
+    private static function format_scorm_type_item($in_type)
+    {
+        return str_replace(' ', '_', $in_type);
+    }
+
 }
 
 if (!function_exists('trim_value')) {

+ 3 - 3
main/template/default/layout/footer.tpl

@@ -80,7 +80,7 @@ $(document).ready( function() {
      *     hidden content :)
      * </div>
      * */
-    $(".advanced_options").on("click", function() {
+    $(".advanced_options").on("click", function(event) {
         event.preventDefault();
         var id = $(this).attr('id') + '_options';
         var button = $(this);
@@ -94,13 +94,13 @@ $(document).ready( function() {
      * <a class="advanced_options_close" href="http://" rel="div_id">Close</a>
      * <div id="div_id">Div content</div>
      * */
-    $(".advanced_options_open").on("click", function() {
+    $(".advanced_options_open").on("click", function(event) {
         event.preventDefault();
         var id = $(this).attr('rel');
         $("#"+id).show();
     });
 
-    $(".advanced_options_close").on("click", function() {
+    $(".advanced_options_close").on("click", function(event) {
         event.preventDefault();
         var id = $(this).attr('rel');
         $("#"+id).hide();

+ 0 - 1
main/template/default/layout/head.tpl

@@ -251,7 +251,6 @@ function showConfirmationPopup(obj, urlParam)
             }
         ]
     });
-    console.log('dd');
     // prevent the browser to follow the link
     return false;
 }

+ 1 - 1
main/tracking/courseLog.php

@@ -37,7 +37,7 @@ if ($from == 'myspace') {
 }
 
 // Access restrictions.
-$is_allowedToTrack = api_is_platform_admin() || api_is_allowed_to_create_course() || api_is_session_admin() || api_is_drh() || api_is_course_tutor();
+$is_allowedToTrack = api_is_platform_admin() || api_is_allowed_to_create_course() || api_is_session_admin() || api_is_drh() || api_is_course_tutor() || api_is_course_admin();
 
 if (!$is_allowedToTrack) {
     api_not_allowed(true);