summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2018-02-05 16:17:08 +0100
committerSimon Rettberg2018-02-05 16:17:08 +0100
commitf3d02d625802003f8348eafe95090723bbd46244 (patch)
treece6b89461475e86d836305c949a08956049280bf
parent[statistics] Move replace-hook to statistics subdir (diff)
downloadslx-admin-f3d02d625802003f8348eafe95090723bbd46244.tar.gz
slx-admin-f3d02d625802003f8348eafe95090723bbd46244.tar.xz
slx-admin-f3d02d625802003f8348eafe95090723bbd46244.zip
[statistics_reporting] Fix perVM and perUser (type mismatch in SQL)
-rw-r--r--modules-available/statistics_reporting/inc/queries.inc.php12
-rw-r--r--modules-available/statistics_reporting/lang/de/template-tags.json1
-rw-r--r--modules-available/statistics_reporting/lang/en/template-tags.json1
-rw-r--r--modules-available/statistics_reporting/lang/pt/template-tags.json3
4 files changed, 6 insertions, 11 deletions
diff --git a/modules-available/statistics_reporting/inc/queries.inc.php b/modules-available/statistics_reporting/inc/queries.inc.php
index 395bb548..58e9e63b 100644
--- a/modules-available/statistics_reporting/inc/queries.inc.php
+++ b/modules-available/statistics_reporting/inc/queries.inc.php
@@ -326,9 +326,9 @@ class Queries
public static function getUserStatistics($from, $to, $lowerTimeBound = 0, $upperTimeBound = 24) {
$res = Database::simpleQuery("SELECT username AS name, COUNT(*) AS 'count'
FROM statistic
- WHERE typeid='.vmchooser-session-name' AND dateline >= :from and dateline <= :to
- AND FROM_UNIXTIME(dateline, '%H') >= :lowerTimeBound AND FROM_UNIXTIME(dateline, '%H') < :upperTimeBound
- GROUP BY username", compact('from', 'to', 'lowerTimeBound', 'upperTimeBound'));
+ WHERE typeid='.vmchooser-session-name' AND dateline >= $from and dateline <= $to
+ AND FROM_UNIXTIME(dateline, '%H') >= $lowerTimeBound AND FROM_UNIXTIME(dateline, '%H') < $upperTimeBound
+ GROUP BY username");
return $res;
}
@@ -336,9 +336,9 @@ class Queries
public static function getVMStatistics($from, $to, $lowerTimeBound = 0, $upperTimeBound = 24) {
$res = Database::simpleQuery("SELECT data AS name, COUNT(*) AS 'count'
FROM statistic
- WHERE typeid='.vmchooser-session-name' AND dateline >= :from and dateline <= :to
- AND FROM_UNIXTIME(dateline, '%H') >= :lowerTimeBound AND FROM_UNIXTIME(dateline, '%H') < :upperTimeBound
- GROUP BY data", compact('from', 'to', 'lowerTimeBound', 'upperTimeBound'));
+ WHERE typeid='.vmchooser-session-name' AND dateline >= $from and dateline <= $to
+ AND FROM_UNIXTIME(dateline, '%H') >= $lowerTimeBound AND FROM_UNIXTIME(dateline, '%H') < $upperTimeBound
+ GROUP BY data");
return $res;
}
diff --git a/modules-available/statistics_reporting/lang/de/template-tags.json b/modules-available/statistics_reporting/lang/de/template-tags.json
index 397d93de..3b8c24f1 100644
--- a/modules-available/statistics_reporting/lang/de/template-tags.json
+++ b/modules-available/statistics_reporting/lang/de/template-tags.json
@@ -22,6 +22,5 @@
"lang_totalSessionTime": "Belegt",
"lang_totalStandbyTime": "Standby",
"lang_totalTime": "Gesamtzeit",
- "lang_user": "Nutzer",
"lang_vm": "Veranstaltung"
} \ 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 a4d19222..d5f9948d 100644
--- a/modules-available/statistics_reporting/lang/en/template-tags.json
+++ b/modules-available/statistics_reporting/lang/en/template-tags.json
@@ -22,6 +22,5 @@
"lang_totalSessionTime": "Occupied",
"lang_totalStandbyTime": "Standby",
"lang_totalTime": "Total Time",
- "lang_user": "User",
"lang_vm": "Lecture"
} \ No newline at end of file
diff --git a/modules-available/statistics_reporting/lang/pt/template-tags.json b/modules-available/statistics_reporting/lang/pt/template-tags.json
deleted file mode 100644
index e7981844..00000000
--- a/modules-available/statistics_reporting/lang/pt/template-tags.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "lang_hello": "Olá"
-} \ No newline at end of file