Fix time tracking in track_e_course_access being non-UTC

1.9.x
César Perales 11 years ago committed by Yannick Warnier
parent ad02d9fd85
commit a5de33b6b4
  1. 6
      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."')";

Loading…
Cancel
Save