diff options
| author | André Noack <noack@data-quest.de> | 2024-10-30 12:32:42 +0000 |
|---|---|---|
| committer | David Siegfried <david.siegfried@uni-vechta.de> | 2024-10-30 12:32:42 +0000 |
| commit | 363c78feaae65f3dfaba40b39463e2f1156048d4 (patch) | |
| tree | 696ae2f6ee3e14700a565b9d0ff99fd3486a8875 /app/controllers/resources/export.php | |
| parent | fb0acb3e51d1d8e354a2eca2dd02ba69caebdd32 (diff) | |
Resolve #4253 "Erfassung der tatsächlichen Teilnehmendenzahl"
Closes #4253
Merge request studip/studip!3212
Diffstat (limited to 'app/controllers/resources/export.php')
| -rw-r--r-- | app/controllers/resources/export.php | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/app/controllers/resources/export.php b/app/controllers/resources/export.php index 626563a..585c5db 100644 --- a/app/controllers/resources/export.php +++ b/app/controllers/resources/export.php @@ -342,6 +342,11 @@ class Resources_ExportController extends AuthenticatedController ] ]; + if (Config::get()->ENABLE_NUMBER_OF_PARTICIPANTS) { + $number_of_participants = null; + $booking_data[0][] = _('Anzahl der Teilnehmenden'); + } + foreach ($resources as $resource) { //Retrieve the bookings in the specified time range: $intervals = ResourceBookingInterval::findBySql( @@ -398,9 +403,12 @@ class Resources_ExportController extends AuthenticatedController if ($course instanceof Course) { $description = $course->getFullName(); $turnout = $course->admission_turnout; + if (Config::get()->ENABLE_NUMBER_OF_PARTICIPANTS) { + $number_of_participants = $booking->assigned_course_date->number_of_participants; + } } } - $booking_data[] = [ + $row = [ date('d.m.Y', $interval->begin), date('H:i', $interval->begin + $booking->preparation_time), date('H:i', $interval->end), @@ -429,6 +437,12 @@ class Resources_ExportController extends AuthenticatedController implode(', ', $booking->getAssignedUsers()), $booking->internal_comment ]; + + if (Config::get()->ENABLE_NUMBER_OF_PARTICIPANTS) { + $row[] = $number_of_participants; + } + + $booking_data[] = $row; } } |
