Minor - cosmetic changes

skala
Julio Montoya 14 years ago
parent a5cf64e7ab
commit 553d64d96f
  1. 1
      main/admin/statistics/index.php
  2. 9
      main/admin/statistics/statistics.lib.php
  3. 7
      main/inc/lib/events.lib.inc.php

@ -82,6 +82,7 @@ switch ($_GET['action']) {
get_lang('Students') => statistics::count_users(5,null,$_GET['count_invisible_courses'])
)
);
$teachers = $students = array();
foreach ($course_categories as $code => $name) {
$name = str_replace(get_lang('Department'),"",$name);
$teachers[$name] = statistics::count_users(1,$code,$_GET['count_invisible_courses']);

@ -115,8 +115,7 @@ class Statistics {
function get_activities_data($from, $number_of_items, $column, $direction) {
global $dateTimeFormatLong, $_configuration;
$track_e_default = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_DEFAULT);
$table_user = Database::get_main_table(TABLE_MAIN_USER);
$table_course = Database::get_main_table(TABLE_MAIN_COURSE);
$table_user = Database::get_main_table(TABLE_MAIN_USER);
$access_url_rel_user_table = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
$current_url_id = api_get_current_access_url_id();
@ -172,10 +171,10 @@ class Statistics {
}
}
}
if (!empty($row[4]) && $row[4] != '0000-00-00 00:00:00') {
$row[4] = api_get_local_time($row[4]);
if (!empty($row['default_date']) && $row['default_date'] != '0000-00-00 00:00:00') {
$row['default_date'] = api_get_local_time($row['default_date']);
} else {
$row[4] = '-';
$row['default_date'] = '-';
}
$activities[] = $row;
}

@ -567,14 +567,15 @@ function event_system($event_type, $event_value_type, $event_value, $datetime =
$event_value = serialize($event_value);
}
}
$event_value = Database::escape_string($event_value);
$datetime = Database::escape_string($datetime);
$event_value = Database::escape_string($event_value);
$user_id = Database::escape_string($user_id);
$course_code = Database::escape_string($course_code);
if(!isset($datetime)) {
if (!isset($datetime)) {
$datetime = api_get_utc_datetime();
}
$datetime = Database::escape_string($datetime);
if(!isset($user_id)) {
$user_id = 0;
}

Loading…
Cancel
Save