From 6585e4ca22dfc076bccf5608efadeca666c2ddd4 Mon Sep 17 00:00:00 2001 From: Bart Mollet Date: Thu, 23 Nov 2006 14:35:20 +0100 Subject: [PATCH] [svn r10176] Cleaned stats for last access to course module --- main/admin/statistics/statistics.lib.php | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/main/admin/statistics/statistics.lib.php b/main/admin/statistics/statistics.lib.php index 73eb5f97e4..9c5a289b5f 100644 --- a/main/admin/statistics/statistics.lib.php +++ b/main/admin/statistics/statistics.lib.php @@ -230,23 +230,16 @@ class Statistics */ function print_tool_stats() { + $table = Database::get_statistic_table(STATISTIC_TRACK_E_ACCESS_TABLE); $tools = array('announcement','assignment','calendar_event','chat','conference','course_description','document','dropbox','group','learnpath','link','quiz','student_publication','user','bb_forum'); - $sql = "SELECT access_tool, count( access_id ) AS number_of_logins FROM dokeos_stats.track_e_access WHERE access_tool IN ('".implode("','",$tools)."') GROUP BY access_tool "; + $sql = "SELECT access_tool, count( access_id ) AS number_of_logins FROM $table WHERE access_tool IN ('".implode("','",$tools)."') GROUP BY access_tool "; $res = api_sql_query($sql,__FILE__,__LINE__); $result = array(); while($obj = mysql_fetch_object($res)) { $result[$obj->access_tool] = $obj->number_of_logins; } - Statistics::print_stats(get_lang('Statistics_Acces_to_coursemodules_hits'),$result,true); - $sql = "SELECT access_tool, count( access_id ) AS number_of_logins FROM dokeos_stats.track_e_lastaccess WHERE access_tool IN ('".implode("','",$tools)."') GROUP BY access_tool "; - $res = api_sql_query($sql,__FILE__,__LINE__); - $result = array(); - while($obj = mysql_fetch_object($res)) - { - $result[$obj->access_tool] = $obj->number_of_logins; - } - Statistics::print_stats(get_lang('Statistics_Acces_to_coursemodules_use'),$result,true); + Statistics::print_stats(get_lang('PlatformToolAccess'),$result,true); }