aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/course/dates.php
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2024-05-30 06:57:51 +0000
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2024-05-30 06:57:51 +0000
commitcb11393661f5cdf9a1ddacb8cd9602de70f5b8f9 (patch)
treea1d34239ca3973ebb9f3b0797d3a8841f0fdec48 /app/controllers/course/dates.php
parentb506b133d371742ef23b3a22cc1c6bb20c860d40 (diff)
fixes #4221issue-4232
Closes #4221 Merge request studip/studip!3064
Diffstat (limited to 'app/controllers/course/dates.php')
-rw-r--r--app/controllers/course/dates.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/course/dates.php b/app/controllers/course/dates.php
index a4e18e9..f64d66b 100644
--- a/app/controllers/course/dates.php
+++ b/app/controllers/course/dates.php
@@ -80,7 +80,10 @@ class Course_DatesController extends AuthenticatedController
)->asDialog();
}
- if (Seminar::setInstance(new Seminar(Course::findCurrent()))->getSlotModule('documents') && CourseDateFolder::availableInRange(Course::findCurrent(), User::findCurrent()->id)) {
+ if (
+ Seminar::setInstance(new Seminar(Course::findCurrent()))->getSlotModule('documents')
+ && CourseDateFolder::availableInRange(Course::findCurrent(), User::findCurrent() ? User::findCurrent()->id : null)
+ ) {
$actions->addLink(
_('Sitzungsordner anlegen'),
$this->url_for('course/dates/create_folders'),