aboutsummaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorElmar Ludwig <elmar.ludwig@uni-osnabrueck.de>2025-01-24 15:26:52 +0100
committerElmar Ludwig <elmar.ludwig@uni-osnabrueck.de>2025-01-24 15:26:52 +0100
commitcba3b3c1b8c0ce11c818e8e832752221b70fd3ba (patch)
treed32771ad6154f25db4e2296301fd497fb0c18a2c /app/controllers
parent7ff14f9d59d098147bb78ee0de8e385fe2fdc208 (diff)
add room name to schedule events, fixes #5149biest-5149
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/calendar/schedule.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/app/controllers/calendar/schedule.php b/app/controllers/calendar/schedule.php
index f20a640..fca00c5 100644
--- a/app/controllers/calendar/schedule.php
+++ b/app/controllers/calendar/schedule.php
@@ -273,6 +273,11 @@ class Calendar_ScheduleController extends AuthenticatedController
$event_classes[] = 'hidden-course';
}
+ $room = $cycle_date->getMostBookedRoom() ?: $cycle_date->getMostUsedFreetextRoomName();
+ if ($room) {
+ $room = is_object($room) ? $room->name : '(' . $cycle_date->getMostUsedFreetextRoomName() . ')';
+ }
+
$event = new \Studip\Calendar\EventData(
$fake_begin,
$fake_end,
@@ -291,7 +296,11 @@ class Calendar_ScheduleController extends AuthenticatedController
'show' => $this->url_for('calendar/schedule/course_info/' . $cycle_date->seminar_id)
],
[],
- $event_icon ?: ''
+ $event_icon ?: '',
+ '',
+ false,
+ '',
+ $room
);
$result[] = $event->toFullcalendarEvent();