Pārlūkot izejas kodu

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

Yannick Warnier 10 gadi atpakaļ
vecāks
revīzija
884208ba00
3 mainītis faili ar 30 papildinājumiem un 21 dzēšanām
  1. 2 1
      main/inc/lib/document.lib.php
  2. 12 13
      main/inc/lib/uri.class.php
  3. 16 7
      main/tracking/courseLog.php

+ 2 - 1
main/inc/lib/document.lib.php

@@ -4028,6 +4028,7 @@ class DocumentManager
     }
 
     /**
+     * Sets 
      * @param string $file ($document_data['path'])
      * @param string $file_url_sys
      * @return string
@@ -4072,7 +4073,7 @@ class DocumentManager
     }
 
     /**
-     * Erase temp nanogons' audio, image edit
+     * Erase temp nanogong audio.
      */
     public static function removeGeneratedAudioTempFile()
     {

+ 12 - 13
main/inc/lib/uri.class.php

@@ -2,13 +2,13 @@
 
 /**
  * Utility functions to manage uris/urls.
- * 
+ *
  * @license see /license.txt
  * @author Laurent Opprecht <laurent@opprecht.info> for the Univesity of Geneva
  */
 class Uri
 {
-    
+
     public static function chamilo()
     {
         return 'http://chamilo.org/';
@@ -20,21 +20,20 @@ class Uri
     public static function www()
     {
         static $result = false;
-        if (empty($result))
-        {
+        if (empty($result)) {
             $result = api_get_path(WEB_PATH);
         }
         return $result;
     }
-    
+
     public static function here($params = array(), $html = true)
     {
         $protocol = Request::server()->server_protocol();
         $protocol = stripos($protocol, 'https') !== false ? 'https' : 'http';
-        
+
         $host = Request::server()->server_name();
         $host = $host ? $host : Request::server()->server_addr();
-        
+
         $here = Request::server()->request_uri();
         $here = explode('?', $here);
         $here = reset($here);
@@ -45,10 +44,10 @@ class Uri
     /**
      * Returns a full url from local/absolute path and parameters.
      * Append the root as required for relative urls.
-     * 
+     *
      * @param string $path
      * @param array $params
-     * @return string 
+     * @return string
      */
     public static function url($path = '', $params = array(), $html = true)
     {
@@ -69,7 +68,7 @@ class Uri
 
     /**
      * Format url parameters
-     * 
+     *
      * @param array $params
      * @return string
      */
@@ -86,11 +85,11 @@ class Uri
 
     /**
      * Returns the course parameters. If null default to the current user parameters.
-     * 
+     *
      * @param string $course_code
      * @param string|int $session_id
      * @param string|int $group_id
-     * @return type 
+     * @return type
      */
     public static function course_params($course_code = null, $session_id = null, $group_id = null)
     {
@@ -102,4 +101,4 @@ class Uri
         return array('cidReq' => $course_code, 'id_session' => $session_id, 'gidReq' => $group_id);
     }
 
-}
+}

+ 16 - 7
main/tracking/courseLog.php

@@ -108,10 +108,17 @@ $js = "<script>
 
         // add the red cross on top of each column
         function init_hide() {
-            $('div#reporting_table table tr th').each(
+            $('#reporting_table .data_table tr th').each(
                 function(index) {
                     num_index = index + 1;
-                   // $(this).prepend('<div style=\"cursor:pointer\" onclick=\"foldup('+num_index+')\">".Display :: return_icon('visible.png', get_lang('HideColumn'), array('align' => 'absmiddle', 'hspace' => '3px'), 22)."</div>');
+                    $(this).prepend(
+                        '<div style=\"cursor:pointer\" onclick=\"foldup('+num_index+')\">".Display::return_icon(
+                            'visible.png',
+                            get_lang('HideColumn'),
+                            array('align' => 'absmiddle', 'hspace' => '3px'),
+                            ICON_SIZE_SMALL
+                         )."</div>'
+                    );
                 }
             );
         }
@@ -120,7 +127,7 @@ $js = "<script>
         // be sure that these columns always exists
         // see tab_table_header = array();    // tab of header texts
         $(document).ready( function() {
-            //init_hide();
+            init_hide();
             foldup(1);
             foldup(9);
             foldup(10);
@@ -183,6 +190,7 @@ if (empty($session_id)) {
 }
 
 $nbStudents = count($a_students);
+$extra_info = array();
 
 // Getting all the additional information of an additional profile field.
 if (isset($_GET['additional_profile_field']) && is_numeric($_GET['additional_profile_field'])) {
@@ -298,6 +306,9 @@ if (!empty($sessionList)) {
 
 echo Display::page_subheader2(get_lang('StudentList'));
 
+// PERSON_NAME_DATA_EXPORT is buggy
+$is_western_name_order = api_is_western_name_order();
+
 if (count($a_students) > 0) {
     $form = new FormValidator('reminder_form', 'get', api_get_path(REL_CODE_PATH).'announcements/announcements.php');
     $renderer = $form->defaultRenderer();
@@ -328,9 +339,6 @@ if (count($a_students) > 0) {
 
     $form->display();
 
-    // PERSON_NAME_DATA_EXPORT is buggy
-    $is_western_name_order = api_is_western_name_order();
-
     if ($export_csv) {
         $csv_content = array();
         //override the SortableTable "per page" limit if CSV
@@ -353,7 +361,8 @@ if (count($a_students) > 0) {
     $parameters['from'] 		= isset($_GET['myspace']) ? Security::remove_XSS($_GET['myspace']) : null;
 
     $table->set_additional_parameters($parameters);
-    $tab_table_header = array();    // tab of header texts
+    $tab_table_header = array();
+    // tab of header texts
     $table->set_header(0, get_lang('OfficialCode'), true);
     $tab_table_header[] = get_lang('OfficialCode');
     if ($is_western_name_order) {