From 72785017584c639bd51dd2fb4e95ae5347ef3dd0 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Thu, 18 Mar 2010 14:55:41 -0500 Subject: [PATCH 1/3] Fixing sql query, UNIX_TIMESTAMP removed --- main/exercice/exercise_result.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/exercice/exercise_result.class.php b/main/exercice/exercise_result.class.php index c72855344c..3adaba89e9 100755 --- a/main/exercice/exercise_result.class.php +++ b/main/exercice/exercise_result.class.php @@ -116,7 +116,7 @@ class ExerciseResult AND cuser.course_code=te.exe_cours_id ORDER BY te.exe_cours_id ASC, ce.title ASC, te.exe_date ASC"; $hpsql="SELECT ".(api_is_western_name_order() ? "CONCAT(tu.firstname,' ',tu.lastname)" : "CONCAT(tu.lastname,' ',tu.firstname)").", tth.exe_name, - tth.exe_result , tth.exe_weighting, UNIX_TIMESTAMP(tth.exe_date), tu.email, tu.user_id + tth.exe_result , tth.exe_weighting, tth.exe_date, tu.email, tu.user_id FROM $TBL_TRACK_HOTPOTATOES tth, $TBL_USER tu WHERE tu.user_id=tth.exe_user_id AND tth.exe_cours_id = '" . Database :: escape_string($cid) . " $user_id_and ' ORDER BY tth.exe_cours_id ASC, tth.exe_date ASC"; From 0ff02d756b88ac4460bb3a7dd11f371b19d06f4a Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Thu, 18 Mar 2010 15:18:12 -0500 Subject: [PATCH 2/3] Reverting commit 95739d955c. api_convert_and_format_date changed to date() function. Date value came from the lp_item_view table --- main/mySpace/myStudents.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/main/mySpace/myStudents.php b/main/mySpace/myStudents.php index c0e3fd8a99..c4e5c9dacd 100755 --- a/main/mySpace/myStudents.php +++ b/main/mySpace/myStudents.php @@ -598,14 +598,14 @@ if ($timezone !== null) { else $css_class = "row_even"; $i++; - + // csv export content $csv_content[] = array ( api_html_entity_decode(stripslashes($lp_name), ENT_QUOTES, $charset), api_time_to_hms($total_time), $score . '%', $progress, - api_convert_and_format_date($start_time, "%Y-%m-%d") + date('Y-m-d h:i:s', $start_time) ); ?> @@ -637,7 +637,9 @@ if ($timezone !== null) { 0) { - echo api_convert_and_format_date($start_time, DATE_FORMAT_SHORT); + //Do not change with api_convert_and_format_date, because this value came from the lp_item_view table + //which implies several other changes not a priority right now + echo date('Y-m-d h:i:s', $start_time); } else { echo '-'; } From e2d0321d78e4c5f81d7d0216a4de15975c8e9657 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Thu, 18 Mar 2010 15:18:47 -0500 Subject: [PATCH 3/3] Minor - Changing headers --- main/tracking/courseLog.php | 18 +++++---------- main/tracking/courseLogCSV.php | 28 ++--------------------- main/tracking/course_access_details.php | 29 ++---------------------- main/tracking/logins_details.php | 26 ++------------------- main/tracking/personnalLog.php | 27 ++-------------------- main/tracking/toolaccess_details.php | 24 +------------------- main/tracking/userLog.php | 30 ++----------------------- main/tracking/userlogCSV.php | 25 +-------------------- 8 files changed, 18 insertions(+), 189 deletions(-) mode change 100644 => 100755 main/tracking/course_access_details.php mode change 100644 => 100755 main/tracking/toolaccess_details.php diff --git a/main/tracking/courseLog.php b/main/tracking/courseLog.php index c7256418bf..640abb6479 100755 --- a/main/tracking/courseLog.php +++ b/main/tracking/courseLog.php @@ -1,17 +1,16 @@ - - For a full list of contributors, see "credits.txt". - The full license can be read in "license.txt". - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - See the GNU General Public License for more details. - - Contact: Dokeos, 181 rue Royale, B-1000 Brussels, Belgium, info@dokeos.com -============================================================================== -*/ +/* For licensing terms, see /license.txt */ // TODO: Is this file deprecated? /** -============================================================================== -* @package dokeos.tracking +* @package chamilo.tracking * @todo clean code - structure is unclear and difficult to modify -============================================================================== */ /* -============================================================================== INIT SECTION -============================================================================== */ $uInfo = $_REQUEST['uInfo']; $view = $_REQUEST['view']; diff --git a/main/tracking/userlogCSV.php b/main/tracking/userlogCSV.php index f1ad639858..e8bae2385b 100755 --- a/main/tracking/userlogCSV.php +++ b/main/tracking/userlogCSV.php @@ -1,28 +1,5 @@ - - For a full list of contributors, see "credits.txt". - The full license can be read in "license.txt". - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - See the GNU General Public License for more details. - - Contact: Dokeos, 181 rue Royale, B-1000 Brussels, Belgium, info@dokeos.com -============================================================================== -*/ - +/* For licensing terms, see /license.txt */ // TODO: Is this file deprecated? /**