diff options
author | Simon Rettberg | 2022-12-02 15:21:26 +0100 |
---|---|---|
committer | Simon Rettberg | 2022-12-02 15:24:08 +0100 |
commit | 200d92c8491d5060af5dd839aa82d1e51b058dd6 (patch) | |
tree | afd9274f2de28b4c387f08550712629798883b26 /modules-available/statistics/inc | |
parent | [inc/ArrayUtil] Fix sort flag handling (diff) | |
download | slx-admin-200d92c8491d5060af5dd839aa82d1e51b058dd6.tar.gz slx-admin-200d92c8491d5060af5dd839aa82d1e51b058dd6.tar.xz slx-admin-200d92c8491d5060af5dd839aa82d1e51b058dd6.zip |
[statistics] Per-location usage stats; include active lecture count
Diffstat (limited to 'modules-available/statistics/inc')
-rw-r--r-- | modules-available/statistics/inc/statisticsfilter.inc.php | 6 | ||||
-rw-r--r-- | modules-available/statistics/inc/statisticsfilterset.inc.php | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/modules-available/statistics/inc/statisticsfilter.inc.php b/modules-available/statistics/inc/statisticsfilter.inc.php index dfba4eb8..996364ae 100644 --- a/modules-available/statistics/inc/statisticsfilter.inc.php +++ b/modules-available/statistics/inc/statisticsfilter.inc.php @@ -208,7 +208,7 @@ abstract class StatisticsFilter } elseif ($filter->type() === 'enum') { $col['enum'] = true; $col['values'] = $filter->values; - if ($bind !== false) { + if ($bind !== null) { // Current value from GET foreach ($col['values'] as &$value) { if ($value['key'] == $bind->argument) { @@ -218,7 +218,7 @@ abstract class StatisticsFilter } } // current value from GET - if ($bind !== false) { + if ($bind !== null) { $col['currentvalue'] = $bind->argument; $col['checked'] = 'checked'; $showCount++; @@ -228,7 +228,7 @@ abstract class StatisticsFilter $col['op'] = $filter->ops; foreach ($col['op'] as &$value) { $value = ['op' => $value]; - if ($bind !== false && $bind->op === $value['op']) { + if ($bind !== null && $bind->op === $value['op']) { $value['selected'] = 'selected'; } } diff --git a/modules-available/statistics/inc/statisticsfilterset.inc.php b/modules-available/statistics/inc/statisticsfilterset.inc.php index 086c4fae..90a39f7d 100644 --- a/modules-available/statistics/inc/statisticsfilterset.inc.php +++ b/modules-available/statistics/inc/statisticsfilterset.inc.php @@ -40,7 +40,7 @@ class StatisticsFilterSet public function filterNonClients() { - if (Module::get('runmode') === false || $this->hasFilter('IsClientStatisticsFilter') !== false) + if (Module::get('runmode') === false || $this->hasFilter('IsClientStatisticsFilter') !== null) return; $this->cache = false; // Runmode module exists, add filter @@ -49,7 +49,7 @@ class StatisticsFilterSet /** * @param string $type filter type (class name) - * @return false|DatabaseFilter The filter, false if not found + * @return ?DatabaseFilter The filter, false if not found */ public function hasFilter(string $type) { @@ -58,18 +58,18 @@ class StatisticsFilterSet return $filter; } } - return false; + return null; } /** * @param string $type filter type key/id - * @return false|DatabaseFilter The filter, false if not found + * @return ?DatabaseFilter The filter, false if not found */ public function hasFilterKey(string $type) { if (isset($this->filters[$type])) return $this->filters[$type]; - return false; + return null; } /** |