fixed date format refs BT#7277

1.9.x
César Perales 11 years ago
parent b173184941
commit d69d5881ff
  1. 4
      main/inc/ajax/model.ajax.php
  2. 5
      main/inc/lib/sessionmanager.lib.php
  3. 4
      main/mySpace/index.php

@ -794,8 +794,8 @@ switch ($action) {
$courseId = intval($_GET['course_id']);
$studentId = intval($_GET['student_id']);
$profile = intval($_GET['profile']);
$date_from = intval($_GET['date_from']);
$date_to = intval($_GET['date_to']);
$date_from = $_GET['date_from'];
$date_to = $_GET['date_to'];
}
$result = SessionManager::get_user_data_access_tracking_overview(intval($sessionId), intval($courseId), intval($studentId), intval($profile), $date_to, $date_from,

@ -1008,11 +1008,8 @@ class SessionManager
}
if (!empty($date_to) && !empty($date_from))
{
//FIX THIS
$to = substr($date_to, 0, 4) .'-' . substr($date_to, 4, 2) . '-' . substr($date_to, 6, 2);
$from = substr($date_from, 0, 4) . '-' . substr($date_from, 4, 2) . '-' . substr($date_from, 6, 2);
$where .= sprintf(" AND a.login_course_date >= '%s 00:00:00'
AND a.login_course_date <= '%s 23:59:59'", $to, $from);
AND a.login_course_date <= '%s 23:59:59'", $date_to, $date_from);
}
$limit = null;
if (!empty($options['limit'])) {

@ -635,7 +635,7 @@ if ($is_platform_admin && in_array($view, array('admin')) && $display != 'yourst
if (in_array($display, array('accessoverview','lpprogressoverview', 'progressoverview', 'exerciseprogress', 'surveyoverview')))
{
$courseFilter = new FormValidator('course_filter', 'get', '', '', array('class'=> 'form-horizontal'), false);
$a = 'search_course';
$a = 'search_course';
if (!empty($_GET['session_id'])) {
$a = 'search_course_by_session';
}
@ -723,9 +723,7 @@ if ($is_platform_admin && in_array($view, array('admin')) && $display != 'yourst
var filled = areBothFilled();
if (filled) {
var date_to = $(\'#date_to\').val();
date_to = date_to.replace(/-/g,"");
var date_from = $(\'#date_from\').val();
date_from = date_from.replace(/-/g,"");
var sessionId = $("#session_name").val();
var courseId = $("#course_name").val();
var studentId = $("#student_name").val();

Loading…
Cancel
Save