aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElmar Ludwig <elmar.ludwig@uni-osnabrueck.de>2023-10-25 19:03:31 +0000
committerElmar Ludwig <elmar.ludwig@uni-osnabrueck.de>2023-10-25 19:03:31 +0000
commitf45178e528cbf7aa45f1e1d4e026a12cbde8ef03 (patch)
treee9561fa44e38e442ac6aa6379a67ae7286ac9d3f
parentcaa0ddefd2875bb307b4e100879393df98035b30 (diff)
drop login_info div with stats from start page, fixes #3390
Closes #3390 Merge request studip/studip!2309
-rw-r--r--public/index.php13
-rw-r--r--templates/index_nobody.php26
2 files changed, 2 insertions, 37 deletions
diff --git a/public/index.php b/public/index.php
index 429a35e..66c69bd 100644
--- a/public/index.php
+++ b/public/index.php
@@ -95,19 +95,10 @@ foreach ($portalplugins as $portalplugin) {
$index_nobody_template = $GLOBALS['template_factory']->open('index_nobody');
-$cache = StudipCacheFactory::getCache();
-$stat = $cache->read('LOGINFORM_STATISTICS');
-if (!is_array($stat)) {
- $stat = [];
- $stat['num_active_courses'] = Course::countBySQL();
- $stat['num_registered_users'] = User::countBySQL();
- $cache->write('LOGINFORM_STATISTICS', $stat, 3600);
-}
-$index_nobody_template->set_attributes(array_merge($stat, [
- 'num_online_users' => get_users_online_count(),
+$index_nobody_template->set_attributes([
'plugin_contents' => $plugin_contents,
'logout' => Request::bool('logout'),
-]));
+]);
echo $index_nobody_template->render();
diff --git a/templates/index_nobody.php b/templates/index_nobody.php
index f687775..8376cb7 100644
--- a/templates/index_nobody.php
+++ b/templates/index_nobody.php
@@ -1,8 +1,5 @@
<?php
/**
- * @var int $num_active_courses
- * @var int $num_registered_users
- * @var int $num_online_users
* @var bool $logout
* @var string[] $plugin_contents
*/
@@ -85,29 +82,6 @@ if ($bg_mobile) {
<? endif ?>
</div>
-
- <div class="login_info">
- <div>
- <?= _('Aktive Veranstaltungen') ?>:
- <?= number_format($num_active_courses, 0, ',', '.') ?>
- </div>
-
- <div>
- <?= _('Registrierte NutzerInnen') ?>:
- <?= number_format($num_registered_users, 0, ',', '.') ?>
- </div>
-
- <div>
- <?= _('Davon online') ?>:
- <?= number_format($num_online_users, 0, ',', '.') ?>
- </div>
-
- <div>
- <a href="dispatch.php/siteinfo/show">
- <?= _('mehr') ?> &hellip;
- </a>
- </div>
- </div>
</footer>
</article>