From 8a7d2cdb4c8e1727474709706f4d9314cb82097a Mon Sep 17 00:00:00 2001
From: Udo Walter
Date: Tue, 22 Nov 2016 12:17:04 +0100
Subject: [statistics_reporting] new empty module
---
modules-available/statistics_reporting/lang/en/module.json | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 modules-available/statistics_reporting/lang/en/module.json
(limited to 'modules-available/statistics_reporting/lang/en/module.json')
diff --git a/modules-available/statistics_reporting/lang/en/module.json b/modules-available/statistics_reporting/lang/en/module.json
new file mode 100644
index 00000000..b2bcbb0c
--- /dev/null
+++ b/modules-available/statistics_reporting/lang/en/module.json
@@ -0,0 +1,4 @@
+{
+ "module_name": "My first module",
+ "page_title": "My first page title"
+}
\ No newline at end of file
--
cgit v1.2.3-55-g7522
From e10ad1d38de5fa13781c3af17a4de8fe85644a0e Mon Sep 17 00:00:00 2001
From: Christian Hofmaier
Date: Mon, 28 Nov 2016 15:41:15 +0100
Subject: login count and offline time database queries
---
.../statistics_reporting/lang/de/module.json | 4 +-
.../lang/de/template-tags.json | 12 +-
.../statistics_reporting/lang/en/module.json | 4 +-
.../lang/en/template-tags.json | 12 +-
.../statistics_reporting/page.inc.php | 103 ++++++++++++++-
.../statistics_reporting/templates/_page.html | 142 ++++++++++++++++++++-
6 files changed, 262 insertions(+), 15 deletions(-)
(limited to 'modules-available/statistics_reporting/lang/en/module.json')
diff --git a/modules-available/statistics_reporting/lang/de/module.json b/modules-available/statistics_reporting/lang/de/module.json
index 166909c3..bdbfe4fd 100644
--- a/modules-available/statistics_reporting/lang/de/module.json
+++ b/modules-available/statistics_reporting/lang/de/module.json
@@ -1,4 +1,4 @@
{
- "module_name": "Mein erstes Modul",
- "page_title": "Mein erster Seitentitel"
+ "module_name": "Statistik Auswertung",
+ "page_title": "Statistik Auswertung"
}
\ No newline at end of file
diff --git a/modules-available/statistics_reporting/lang/de/template-tags.json b/modules-available/statistics_reporting/lang/de/template-tags.json
index ce98ce38..d9b034b4 100644
--- a/modules-available/statistics_reporting/lang/de/template-tags.json
+++ b/modules-available/statistics_reporting/lang/de/template-tags.json
@@ -1,3 +1,13 @@
{
- "lang_hello": "Hallo"
+ "lang_user": "Nutzer",
+ "lang_countLogins": "Anzahl Logins",
+ "lang_client": "Client",
+ "lang_vm": "VM",
+ "lang_totalLogins": "Gesamt Logins",
+ "lang_overallOfftime": "Gesamtzeit Offline",
+ "lang_totalOffTime": "Gesamtzeit Offline",
+ "lang_clientLogout": "Letzter Logout",
+ "lang_clientStart": "Letzter Client Start",
+ "lang_room": "Raum",
+ "lang_offTime": "Zeit seit Logout"
}
\ No newline at end of file
diff --git a/modules-available/statistics_reporting/lang/en/module.json b/modules-available/statistics_reporting/lang/en/module.json
index b2bcbb0c..6b3f98f6 100644
--- a/modules-available/statistics_reporting/lang/en/module.json
+++ b/modules-available/statistics_reporting/lang/en/module.json
@@ -1,4 +1,4 @@
{
- "module_name": "My first module",
- "page_title": "My first page title"
+ "module_name": "Statistics Reporting",
+ "page_title": "Statistics Reporting"
}
\ No newline at end of file
diff --git a/modules-available/statistics_reporting/lang/en/template-tags.json b/modules-available/statistics_reporting/lang/en/template-tags.json
index c30739e5..2f33eaf5 100644
--- a/modules-available/statistics_reporting/lang/en/template-tags.json
+++ b/modules-available/statistics_reporting/lang/en/template-tags.json
@@ -1,3 +1,13 @@
{
- "lang_hello": "Hello"
+ "lang_user": "User",
+ "lang_countLogins": "Number of Logins",
+ "lang_client": "Client",
+ "lang_vm": "VM",
+ "lang_totalLogins": "Total Logins",
+ "lang_overallOfftime": "Overall time offline",
+ "lang_totalOffTime": "Time offline",
+ "lang_clientLogout": "Last Logout",
+ "lang_clientStart": "Last Client Start",
+ "lang_room": "Room",
+ "lang_offTime": "Time since offline"
}
\ No newline at end of file
diff --git a/modules-available/statistics_reporting/page.inc.php b/modules-available/statistics_reporting/page.inc.php
index ff73107a..3bd83034 100644
--- a/modules-available/statistics_reporting/page.inc.php
+++ b/modules-available/statistics_reporting/page.inc.php
@@ -1,6 +1,6 @@
'bar',
- 'now' => date('d.m.Y H:i:s')
- ));
+ //counting the total number of logins
+ $res = Database::simpleQuery("SELECT COUNT(*) AS 'count' FROM statistic WHERE typeid='.vmchooser-session-name'");
+ $row = $res->fetch(PDO::FETCH_ASSOC);
+ $datax = array('totalLogins' => $row['count']);
+
+ //counting logins per vm/event
+ $res = Database::simpleQuery("SELECT data, COUNT(*) AS 'count' FROM statistic WHERE typeid='.vmchooser-session-name' GROUP BY data ORDER BY 2 DESC");
+ $datax[] = array('vmLogins' => array());
+ while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
+ $datax['vmLogins'][] = array('vmname' => $row['data'], 'numLogins' => $row['count']);
+ }
+
+ //counting the logins per user
+ $res = Database::simpleQuery("SELECT username, COUNT(*) AS 'count' FROM statistic WHERE typeid='.vmchooser-session-name' GROUP BY username ORDER BY 2 DESC");
+ $datax[] = array('userLogins' => array());
+ while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
+ $datax['userLogins'][] = array('username' => $row['username'], 'numLogins' => $row['count']);
+ }
+
+ // TODO: got empty machine with alot of logins. isn't shown in the inner-join hostname query below.
+ // $res = Database::simpleQuery("SELECT machineuuid as 'hostname', COUNT(*) AS 'count' FROM statistic WHERE typeid='~session-length' GROUP BY machineuuid ORDER BY 2 DESC");
+
+ // TODO: session-length liefert 3000 Einträge mehr als vmchooser-session?
+ //counting the logins per client
+ $res = Database::simpleQuery("SELECT machine.hostname AS 'hostname', COUNT(*) AS 'count' FROM statistic
+ INNER JOIN machine ON statistic.machineuuid=machine.machineuuid
+ WHERE typeid='~session-length' GROUP BY machine.hostname ORDER BY 2 DESC");
+ $datax[] = array('machineLogins' => array());
+ while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
+ $datax['machineLogins'][] = array('client' => $row['hostname'], 'numLogins' => $row['count']);
+ }
+
+
+
+ //total time offline overall
+ $res = Database::simpleQUery("SELECT sum(cast(data AS UNSIGNED)) AS totalOfftime FROM statistic WHERE typeid='~offline-length'");
+ $row = $res->fetch(PDO::FETCH_ASSOC);
+ $datay= array('totalOfftime' => $row['totalOfftime']);
+
+ //total offline time per client
+ $res = Database::simpleQuery("SELECT machine.hostname AS 'hostname', statistic.data as time FROM statistic
+ INNER JOIN machine ON statistic.machineuuid=machine.machineuuid
+ WHERE typeid='~offline-length' GROUP BY machine.hostname ORDER BY cast(time AS UNSIGNED) DESC");
+ $datay[] = array('totalOfflineTimeClient' => array());
+ while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
+ $datay['totalOfflineTimeClient'][] = array('client' => $row['hostname'], 'offTime' => $row['time']);
+ }
+
+ // last logout of client
+ $res = Database::simpleQuery("SELECT machine.hostname AS 'hostname', max(statistic.dateline) as datetime, statistic.data as loginTime
+ FROM statistic INNER JOIN machine ON statistic.machineuuid=machine.machineuuid
+ WHERE typeid='~session-length' GROUP BY machine.hostname ORDER BY datetime DESC");
+ $datay[] = array('lastLogout' => array());
+ while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
+ $datay['lastLogout'][] = array('client' => $row['hostname'], 'lastlogout' => date(DATE_RSS,$row['datetime']+$row['loginTime']), 'howLongOff' => (time() - ($row['datetime']+$row['loginTime'])));
+ }
+
+ // last start of client
+ $res = Database::simpleQuery("SELECT machine.hostname AS 'hostname', max(statistic.dateline) as datetime FROM statistic
+ INNER JOIN machine ON statistic.machineuuid=machine.machineuuid
+ WHERE typeid='~offline-length' GROUP BY machine.hostname ORDER BY datetime DESC");
+ $datay[] = array('lastLogin' => array());
+ while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
+ $datay['lastLogin'][] = array('client' => $row['hostname'], 'lastlogin' => date(DATE_RSS,$row['datetime']));
+ }
+
+ //total time offline per room
+ $res = Database::simpleQuery("SELECT location.locationname AS 'room', statistic.data as time FROM statistic
+ INNER JOIN machine ON statistic.machineuuid=machine.machineuuid
+ INNER JOIN location ON machine.locationid=location.locationid
+ WHERE typeid='~offline-length' GROUP BY room ORDER BY cast(time AS UNSIGNED) DESC");
+ $datay[] = array('offTimeRoom' => array());
+ while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
+ $datay['offTimeRoom'][] = array('room' => $row['room'], 'offTime' => $this->formatSeconds($row['time']));
+ }
+
+ $data = array_merge($datax, $datay);
+ Render::addTemplate('_page', $data);
}
+
+
+ function formatSeconds($seconds) {
+ $seconds = $seconds * 1;
+
+ $minutes = floor($seconds / 60);
+ $hours = floor($minutes / 60);
+ $days = floor($hours / 24);
+
+ $seconds = $seconds % 60;
+ $minutes = $minutes % 60;
+ $hours = $hours % 24;
+
+ $format = '%u:%u:%02u:%02u';
+ $time = sprintf($format, $days, $hours, $minutes, $seconds);
+ return rtrim($time, '0');
+ }
+
+
}
diff --git a/modules-available/statistics_reporting/templates/_page.html b/modules-available/statistics_reporting/templates/_page.html
index dfc941ae..101a124e 100644
--- a/modules-available/statistics_reporting/templates/_page.html
+++ b/modules-available/statistics_reporting/templates/_page.html
@@ -1,4 +1,138 @@
-
-
{{lang_hello}}, {{foo}}
- ** {{now}} **
-
\ No newline at end of file
+
+
+
+ {{lang_totalLogins}} |
+
+
+ {{totalLogins}} |
+
+
+
+
+
+
+
+ {{lang_overallOfftime}} |
+
+
+ {{totalOfftime}} |
+
+
+
+
+
+
+
+
+
+
+ {{lang_client}} |
+ {{lang_totalOffTime}} |
+
+ {{#totalOfflineTimeClient}}
+
+ {{client}} |
+ {{offTime}} |
+
+ {{/totalOfflineTimeClient }}
+
+
+
+
+
+
+ {{lang_client}} |
+ {{lang_clientLogout}} |
+ {{lang_offTime}} |
+
+ {{#lastLogout}}
+
+ {{client}} |
+ {{lastlogout}} |
+ {{howLongOff}} |
+
+ {{/lastLogout}}
+
+
+
+
+
+
+ {{lang_client}} |
+ {{lang_clientStart}} |
+
+ {{#lastLogin}}
+
+ {{client}} |
+ {{lastlogin}} |
+
+ {{/lastLogin}}
+
+
+
+
+
+
+ {{lang_room}} |
+ {{lang_totalOffTime}} |
+
+ {{#offTimeRoom}}
+
+ {{room}} |
+ {{offTime}} |
+
+ {{/offTimeRoom}}
+
+
+
+
+
+
+
+
+
+
+
+ {{lang_vm}} |
+ {{lang_countLogins}} |
+
+ {{#vmLogins}}
+
+ {{vmname}} |
+ {{numLogins}} |
+
+ {{/vmLogins}}
+
+
+
+
+
+
+ {{lang_client}} |
+ {{lang_countLogins}} |
+
+ {{#machineLogins}}
+
+ {{client}} |
+ {{numLogins}} |
+
+ {{/machineLogins}}
+
+
+
+
+
+
+ {{lang_user}} |
+ {{lang_countLogins}} |
+
+ {{#userLogins}}
+
+ {{username}} |
+ {{numLogins}} |
+
+ {{/userLogins}}
+
+
+
+
--
cgit v1.2.3-55-g7522
From 2963be53876e57c0d403ffe5dfa978d7736a0c4b Mon Sep 17 00:00:00 2001
From: Simon Rettberg
Date: Thu, 19 Jan 2017 13:18:40 +0100
Subject: [statistics_reporting] i18n: Move tags used in code to separate file,
delete unused tags
---
.../statistics_reporting/inc/queries.inc.php | 4 +-
.../statistics_reporting/lang/de/module.json | 1 +
.../lang/de/template-tags.json | 44 ++++++++++------------
.../statistics_reporting/lang/en/module.json | 1 +
.../lang/en/template-tags.json | 44 ++++++++++------------
5 files changed, 42 insertions(+), 52 deletions(-)
(limited to 'modules-available/statistics_reporting/lang/en/module.json')
diff --git a/modules-available/statistics_reporting/inc/queries.inc.php b/modules-available/statistics_reporting/inc/queries.inc.php
index 77deb4f8..2b2ebb13 100644
--- a/modules-available/statistics_reporting/inc/queries.inc.php
+++ b/modules-available/statistics_reporting/inc/queries.inc.php
@@ -6,7 +6,7 @@ class Queries
// Client Data: Name, Time Online, Median Time Online, Time Offline, last start, last logout, Last Time Booted, Number of Sessions > 60Sec, Number of Sessions < 60Sec, name of location, id of location (anonymized), machine uuid (anonymized)
public static function getClientStatistics($from, $to, $lowerTimeBound = 0, $upperTimeBound = 24, $excludeToday = false) {
- $notassigned = Dictionary::translateFile('template-tags', 'lang_notassigned');
+ $notassigned = Dictionary::translate('notAssigned', true);
$res = Database::simpleQuery("SELECT t1.name AS clientName, timeSum, medianTime, offlineSum, lastStart, lastLogout, longSessions, shortSessions, locName, MD5(CONCAT(locId, :salt)) AS locHash, MD5(CONCAT(t1.uuid, :salt)) AS clientHash FROM (
SELECT machine.hostname AS 'name', machine.machineuuid AS 'uuid', SUM(CAST(sessionTable.length AS UNSIGNED)) AS 'timeSum', GROUP_CONCAT(sessionTable.length) AS 'medianTime', SUM(sessionTable.length >= 60) AS 'longSessions', SUM(sessionTable.length < 60) AS 'shortSessions',MAX(sessionTable.dateline + sessionTable.data) AS 'lastLogout', IFNULL(location.locationname, '$notassigned') AS 'locName', location.locationid AS 'locId'
FROM ".self::getBoundedTableQueryString('~session-length', $from, $to, $lowerTimeBound, $upperTimeBound)." sessionTable
@@ -27,7 +27,7 @@ class Queries
// Location Data: Name, ID (anonymized), Time Online, Median Time Online, Time Offline, Number of Sessions > 60Sec, Number of Sessions < 60Sec
public static function getLocationStatistics($from, $to, $lowerTimeBound = 0, $upperTimeBound = 24, $excludeToday = false) {
- $notassigned = Dictionary::translateFile('template-tags', 'lang_notassigned');
+ $notassigned = Dictionary::translate('notAssigned', true);
$res = Database::simpleQuery("SELECT t1.locName AS locName, MD5(CONCAT(locId, :salt)) AS locHash, timeSum, medianTime, offlineSum, longSessions, shortSessions FROM (
SELECT IFNULL(location.locationname, '$notassigned') AS 'locName', location.locationid AS 'locId', SUM(CAST(sessionTable.length AS UNSIGNED)) AS 'timeSum', GROUP_CONCAT(sessionTable.length) AS 'medianTime', SUM(sessionTable.length >= 60) AS 'longSessions', SUM(sessionTable.length < 60) AS 'shortSessions'
FROM ".self::getBoundedTableQueryString('~session-length', $from, $to, $lowerTimeBound, $upperTimeBound)." sessionTable
diff --git a/modules-available/statistics_reporting/lang/de/module.json b/modules-available/statistics_reporting/lang/de/module.json
index bdbfe4fd..86ed5f45 100644
--- a/modules-available/statistics_reporting/lang/de/module.json
+++ b/modules-available/statistics_reporting/lang/de/module.json
@@ -1,4 +1,5 @@
{
"module_name": "Statistik Auswertung",
+ "notAssigned": "Nicht zugewiesen",
"page_title": "Statistik Auswertung"
}
\ No newline at end of file
diff --git a/modules-available/statistics_reporting/lang/de/template-tags.json b/modules-available/statistics_reporting/lang/de/template-tags.json
index 73c39e1e..d4d7887a 100644
--- a/modules-available/statistics_reporting/lang/de/template-tags.json
+++ b/modules-available/statistics_reporting/lang/de/template-tags.json
@@ -1,34 +1,28 @@
{
- "lang_user": "Nutzer",
- "lang_countLogins": "Anzahl Logins",
- "lang_client": "Client",
- "lang_vm": "VM",
- "lang_sessions": "Sitzungen",
- "lang_longSessions": "Sitzungen \u2265 60s",
- "lang_shortSessions": "Sitzungen < 60s",
- "lang_overallOfftime": "Insgesamte Zeit Offline",
- "lang_totalOffTime": "Gesamtzeit Offline",
+ "lang_apply": "Anwenden",
"lang_clientLogout": "Letzter VM Logout",
"lang_clientStart": "Letzter Client Boot",
- "lang_room": "Raum",
- "lang_offTime": "Zeit seit Logout",
- "lang_total": "Gesamt",
- "lang_perlocation": "Pro Raum",
- "lang_perclient": "Pro Client",
- "lang_peruser": "Pro Benutzer",
- "lang_pervm": "Pro VM",
"lang_hostname": "Client Name",
- "lang_location": "Raum",
- "lang_medianSessionLength": "Mittlere Sitzungsdauer",
- "lang_totalTime": "Gesamte Zeit",
"lang_last1": "Heute",
- "lang_last2": "Letzten 2 Tage",
- "lang_last7": "Letzten 7 Tage",
"lang_last14": "Letzten 14 Tage",
+ "lang_last2": "Letzten 2 Tage",
"lang_last30": "Letzten 30 Tage",
+ "lang_last7": "Letzten 7 Tage",
"lang_last90": "Letzten 90 Tage",
- "lang_apply": "Anwenden",
- "lang_save": "Speichern",
- "lang_notassigned": "NICHT ZUGEWIESEN",
- "lang_reportingDescription": "Helfen Sie uns bwLehrpool, durch das wöchentliche, automatische Verschicken eines anonymisierten Statistikberichts, zu verbessern."
+ "lang_location": "Raum",
+ "lang_longSessions": "Sitzungen \u2265 60s",
+ "lang_medianSessionLength": "Mittlere Sitzungsdauer",
+ "lang_overallOfftime": "Insgesamte Zeit Offline",
+ "lang_perclient": "Pro Client",
+ "lang_perlocation": "Pro Raum",
+ "lang_peruser": "Pro Benutzer",
+ "lang_pervm": "Pro VM",
+ "lang_reportingDescription": "Helfen Sie uns bwLehrpool, durch das w\u00f6chentliche, automatische Verschicken eines anonymisierten Statistikberichts, zu verbessern.",
+ "lang_sessions": "Sitzungen",
+ "lang_shortSessions": "Sitzungen < 60s",
+ "lang_total": "Gesamt",
+ "lang_totalOffTime": "Gesamtzeit Offline",
+ "lang_totalTime": "Gesamte Zeit",
+ "lang_user": "Nutzer",
+ "lang_vm": "VM"
}
\ No newline at end of file
diff --git a/modules-available/statistics_reporting/lang/en/module.json b/modules-available/statistics_reporting/lang/en/module.json
index 6b3f98f6..5362fee2 100644
--- a/modules-available/statistics_reporting/lang/en/module.json
+++ b/modules-available/statistics_reporting/lang/en/module.json
@@ -1,4 +1,5 @@
{
"module_name": "Statistics Reporting",
+ "notAssigned": "Not assigned",
"page_title": "Statistics Reporting"
}
\ No newline at end of file
diff --git a/modules-available/statistics_reporting/lang/en/template-tags.json b/modules-available/statistics_reporting/lang/en/template-tags.json
index 90d59b38..0047c7a4 100644
--- a/modules-available/statistics_reporting/lang/en/template-tags.json
+++ b/modules-available/statistics_reporting/lang/en/template-tags.json
@@ -1,34 +1,28 @@
{
- "lang_user": "User",
- "lang_countLogins": "Number of Logins",
- "lang_client": "Client",
- "lang_vm": "VM",
- "lang_sessions": "Sessions",
- "lang_longSessions": "Sessions \u2265 60s",
- "lang_shortSessions": "Sessions < 60s",
- "lang_overallOfftime": "Overall time offline",
- "lang_totalOffTime": "Total Time Offline",
+ "lang_apply": "Apply",
"lang_clientLogout": "Last VM Logout",
"lang_clientStart": "Last Client Boot",
- "lang_room": "Room",
- "lang_offTime": "Time since offline",
- "lang_total": "Total",
- "lang_perlocation": "Per Location",
- "lang_perclient": "Per Client",
- "lang_peruser": "Per User",
- "lang_pervm": "Per VM",
"lang_hostname": "Client Name",
- "lang_location": "Location",
- "lang_medianSessionLength": "Median Session Length",
- "lang_totalTime": "Total Time",
"lang_last1": "Today",
- "lang_last2": "Last 2 days",
- "lang_last7": "Last 7 days",
"lang_last14": "Last 14 days",
+ "lang_last2": "Last 2 days",
"lang_last30": "Last 30 days",
+ "lang_last7": "Last 7 days",
"lang_last90": "Last 90 days",
- "lang_apply": "Apply",
- "lang_save": "Save",
- "lang_notassigned": "NOT ASSIGNED",
- "lang_reportingDescription": "Help us improve bwLehrpool by automatically sending an anonymized statistics report once per week."
+ "lang_location": "Location",
+ "lang_longSessions": "Sessions \u2265 60s",
+ "lang_medianSessionLength": "Median Session Length",
+ "lang_overallOfftime": "Overall time offline",
+ "lang_perclient": "Per Client",
+ "lang_perlocation": "Per Location",
+ "lang_peruser": "Per User",
+ "lang_pervm": "Per VM",
+ "lang_reportingDescription": "Help us improve bwLehrpool by automatically sending an anonymized statistics report once per week.",
+ "lang_sessions": "Sessions",
+ "lang_shortSessions": "Sessions < 60s",
+ "lang_total": "Total",
+ "lang_totalOffTime": "Total Time Offline",
+ "lang_totalTime": "Total Time",
+ "lang_user": "User",
+ "lang_vm": "VM"
}
\ No newline at end of file
--
cgit v1.2.3-55-g7522
From 1aee69c75e10a1f098ec3a93614cc36da407e22b Mon Sep 17 00:00:00 2001
From: Simon Rettberg
Date: Tue, 7 Feb 2017 14:06:27 +0100
Subject: [statistics_reporting] Unify translation handling
---
.../statistics_reporting/lang/de/module.json | 9 +++++--
.../lang/de/template-tags.json | 30 ++++++++--------------
.../statistics_reporting/lang/en/module.json | 7 ++++-
.../lang/en/template-tags.json | 22 +++++-----------
.../statistics_reporting/page.inc.php | 15 +++--------
.../templates/table-client.html | 4 +--
.../templates/table-total.html | 2 +-
7 files changed, 37 insertions(+), 52 deletions(-)
(limited to 'modules-available/statistics_reporting/lang/en/module.json')
diff --git a/modules-available/statistics_reporting/lang/de/module.json b/modules-available/statistics_reporting/lang/de/module.json
index 86ed5f45..64003d47 100644
--- a/modules-available/statistics_reporting/lang/de/module.json
+++ b/modules-available/statistics_reporting/lang/de/module.json
@@ -1,5 +1,10 @@
{
- "module_name": "Statistik Auswertung",
+ "module_name": "Statistikauswertung",
"notAssigned": "Nicht zugewiesen",
- "page_title": "Statistik Auswertung"
+ "page_title": "Statistikauswertung",
+ "table_client": "Nach Clients",
+ "table_location": "Nach Orten",
+ "table_total": "Gesamt",
+ "table_user": "Nach Benutzern",
+ "table_vm": "Nach Veranstaltungen"
}
\ No newline at end of file
diff --git a/modules-available/statistics_reporting/lang/de/template-tags.json b/modules-available/statistics_reporting/lang/de/template-tags.json
index d4d7887a..379e2030 100644
--- a/modules-available/statistics_reporting/lang/de/template-tags.json
+++ b/modules-available/statistics_reporting/lang/de/template-tags.json
@@ -1,28 +1,20 @@
{
"lang_apply": "Anwenden",
- "lang_clientLogout": "Letzter VM Logout",
- "lang_clientStart": "Letzter Client Boot",
- "lang_hostname": "Client Name",
- "lang_last1": "Heute",
- "lang_last14": "Letzten 14 Tage",
- "lang_last2": "Letzten 2 Tage",
- "lang_last30": "Letzten 30 Tage",
- "lang_last7": "Letzten 7 Tage",
- "lang_last90": "Letzten 90 Tage",
- "lang_location": "Raum",
+ "lang_displayColumns": "Auswahl angezeigter Spalten",
+ "lang_displaySelection": "Anzeigemodus, Auswahl Zeitfenster",
+ "lang_export": "Exportieren",
+ "lang_hostname": "Hostname",
+ "lang_lastLogout": "Letzter Logout",
+ "lang_lastStart": "Letzter Boot",
+ "lang_location": "Ort",
"lang_longSessions": "Sitzungen \u2265 60s",
- "lang_medianSessionLength": "Mittlere Sitzungsdauer",
- "lang_overallOfftime": "Insgesamte Zeit Offline",
- "lang_perclient": "Pro Client",
- "lang_perlocation": "Pro Raum",
- "lang_peruser": "Pro Benutzer",
- "lang_pervm": "Pro VM",
+ "lang_medianSessionLength": "Sitzungsdauer Median",
"lang_reportingDescription": "Helfen Sie uns bwLehrpool, durch das w\u00f6chentliche, automatische Verschicken eines anonymisierten Statistikberichts, zu verbessern.",
"lang_sessions": "Sitzungen",
"lang_shortSessions": "Sitzungen < 60s",
"lang_total": "Gesamt",
- "lang_totalOffTime": "Gesamtzeit Offline",
- "lang_totalTime": "Gesamte Zeit",
+ "lang_totalOffTime": "Gesamtzeit offline",
+ "lang_totalTime": "Gesamtzeit",
"lang_user": "Nutzer",
- "lang_vm": "VM"
+ "lang_vm": "Veranstaltung"
}
\ No newline at end of file
diff --git a/modules-available/statistics_reporting/lang/en/module.json b/modules-available/statistics_reporting/lang/en/module.json
index 5362fee2..f5ed37d3 100644
--- a/modules-available/statistics_reporting/lang/en/module.json
+++ b/modules-available/statistics_reporting/lang/en/module.json
@@ -1,5 +1,10 @@
{
"module_name": "Statistics Reporting",
"notAssigned": "Not assigned",
- "page_title": "Statistics Reporting"
+ "page_title": "Statistics Reporting",
+ "table_client": "By client",
+ "table_location": "By location",
+ "table_total": "Total",
+ "table_user": "By user",
+ "table_vm": "By lecture"
}
\ No newline at end of file
diff --git a/modules-available/statistics_reporting/lang/en/template-tags.json b/modules-available/statistics_reporting/lang/en/template-tags.json
index 0047c7a4..466a8530 100644
--- a/modules-available/statistics_reporting/lang/en/template-tags.json
+++ b/modules-available/statistics_reporting/lang/en/template-tags.json
@@ -1,22 +1,14 @@
{
"lang_apply": "Apply",
- "lang_clientLogout": "Last VM Logout",
- "lang_clientStart": "Last Client Boot",
- "lang_hostname": "Client Name",
- "lang_last1": "Today",
- "lang_last14": "Last 14 days",
- "lang_last2": "Last 2 days",
- "lang_last30": "Last 30 days",
- "lang_last7": "Last 7 days",
- "lang_last90": "Last 90 days",
+ "lang_displayColumns": "Select columns to display",
+ "lang_displaySelection": "Select display mode and specify time span",
+ "lang_export": "Export",
+ "lang_hostname": "Hostname",
+ "lang_lastLogout": "Last logout",
+ "lang_lastStart": "Last boot",
"lang_location": "Location",
"lang_longSessions": "Sessions \u2265 60s",
"lang_medianSessionLength": "Median Session Length",
- "lang_overallOfftime": "Overall time offline",
- "lang_perclient": "Per Client",
- "lang_perlocation": "Per Location",
- "lang_peruser": "Per User",
- "lang_pervm": "Per VM",
"lang_reportingDescription": "Help us improve bwLehrpool by automatically sending an anonymized statistics report once per week.",
"lang_sessions": "Sessions",
"lang_shortSessions": "Sessions < 60s",
@@ -24,5 +16,5 @@
"lang_totalOffTime": "Total Time Offline",
"lang_totalTime": "Total Time",
"lang_user": "User",
- "lang_vm": "VM"
+ "lang_vm": "Lecture"
}
\ No newline at end of file
diff --git a/modules-available/statistics_reporting/page.inc.php b/modules-available/statistics_reporting/page.inc.php
index 05a26c41..c5640d41 100644
--- a/modules-available/statistics_reporting/page.inc.php
+++ b/modules-available/statistics_reporting/page.inc.php
@@ -13,8 +13,8 @@ class Page_Statistics_Reporting extends Page
/**
* @var array Names of columns that are being used by the various tables
*/
- private $COLUMNS = array('col_lastlogout', 'col_laststart', 'col_location', 'col_longsessions', 'col_mediantime',
- 'col_sessions', 'col_shortsessions', 'col_timeoffline', 'col_totaltime');
+ private $COLUMNS = array('lastLogout', 'lastStart', 'location', 'longSessions', 'medianSessionLength',
+ 'sessions', 'shortSessions', 'totalOffTime', 'totalTime');
/**
* @var array Names of the tables we can display
@@ -66,15 +66,6 @@ class Page_Statistics_Reporting extends Page
/*
* Leave these here for the translate module
- * Dictionary::translate('col_lastlogout');
- * Dictionary::translate('col_laststart');
- * Dictionary::translate('col_location');
- * Dictionary::translate('col_longsessions');
- * Dictionary::translate('col_mediantime');
- * Dictionary::translate('col_sessions');
- * Dictionary::translate('col_shortsessions');
- * Dictionary::translate('col_timeoffline');
- * Dictionary::translate('col_totaltime');
* Dictionary::translate('table_total');
* Dictionary::translate('table_location');
* Dictionary::translate('table_client');
@@ -91,7 +82,7 @@ class Page_Statistics_Reporting extends Page
foreach ($this->COLUMNS as $column) {
$data['columns'][] = array(
'id' => $column,
- 'name' => Dictionary::translate($column, true),
+ 'name' => Dictionary::translateFile('template-tags', 'lang_' . $column, true),
'checked' => Request::get($column, 'on', 'string') === 'on' ? 'checked' : '',
);
}
diff --git a/modules-available/statistics_reporting/templates/table-client.html b/modules-available/statistics_reporting/templates/table-client.html
index e4538da6..e53a49d6 100644
--- a/modules-available/statistics_reporting/templates/table-client.html
+++ b/modules-available/statistics_reporting/templates/table-client.html
@@ -8,8 +8,8 @@
{{lang_longSessions}} |
{{lang_shortSessions}} |
{{lang_totalOffTime}} |
- {{lang_clientLogout}} |
- {{lang_clientStart}} |
+ {{lang_lastLogout}} |
+ {{lang_lastStart}} |
diff --git a/modules-available/statistics_reporting/templates/table-total.html b/modules-available/statistics_reporting/templates/table-total.html
index 8e24dc01..2e100ae5 100644
--- a/modules-available/statistics_reporting/templates/table-total.html
+++ b/modules-available/statistics_reporting/templates/table-total.html
@@ -6,7 +6,7 @@
{{lang_medianSessionLength}} |
{{lang_longSessions}} |
{{lang_shortSessions}} |
- {{lang_overallOfftime}} |
+ {{lang_totalOffTime}} |
--
cgit v1.2.3-55-g7522