From a5de33b6b444e425a37e2afc6e923cdf504ce5e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Perales?= Date: Thu, 3 Apr 2014 16:26:13 -0500 Subject: [PATCH] Fix time tracking in track_e_course_access being non-UTC --- main/inc/lib/events.lib.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main/inc/lib/events.lib.inc.php b/main/inc/lib/events.lib.inc.php index 7a91c652ea..b6a39d1d93 100644 --- a/main/inc/lib/events.lib.inc.php +++ b/main/inc/lib/events.lib.inc.php @@ -1499,11 +1499,11 @@ function event_course_login($course_code, $user_id, $session_id) { global $course_tracking_table; //@todo use api_get_utc_datetime - $time = api_get_datetime(); + $time = api_get_utc_datetime(); $course_code = Database::escape_string($course_code); - $user_id = Database::escape_string($user_id); - $session_id = Database::escape_string($session_id); + $user_id = intval($user_id); + $session_id = intval($session_id); $sql = "INSERT INTO $course_tracking_table(course_code, user_id, login_course_date, logout_course_date, counter, session_id) VALUES('".$course_code."', '".$user_id."', '$time', '$time', '1', '".$session_id."')";