diff options
| author | Felix Pahlow <felix.pahlow@itz.uni-halle.de> | 2023-09-18 15:50:07 +0000 |
|---|---|---|
| committer | André Noack <noack@data-quest.de> | 2023-09-18 15:50:07 +0000 |
| commit | e63b493f42262050662a2ea5f05bb438cf988ace (patch) | |
| tree | 7551f7c0f673976c8212173b7a6b97c0f2d1f249 | |
| parent | 3e5e9db202bb380d48b1a751a8cedfb156d20375 (diff) | |
Resolve #3195 "Name der Veranstaltung in Terminlöschungs-Nachricht"
Closes #3195
Merge request studip/studip!2162
| -rw-r--r-- | lib/models/resources/ResourceBooking.class.php | 5 | ||||
| -rw-r--r-- | locale/de/LC_MAILS/delete_booking_notification.php | 4 | ||||
| -rw-r--r-- | locale/en/LC_MAILS/delete_booking_notification.php | 4 |
3 files changed, 13 insertions, 0 deletions
diff --git a/lib/models/resources/ResourceBooking.class.php b/lib/models/resources/ResourceBooking.class.php index 779c4b5..51c7aed 100644 --- a/lib/models/resources/ResourceBooking.class.php +++ b/lib/models/resources/ResourceBooking.class.php @@ -1892,6 +1892,10 @@ class ResourceBooking extends SimpleORMap implements PrivacyObject, Studip\Calen $booking_resource = Resource::find($this->resource_id); $booking_user = User::find($this->booking_user_id); + $booking_course = null; + if ($this->course_id) { + $booking_course = Course::find($this->course_id); + } if (!$booking_resource || !$booking_user) { //Nothing we can do here. return; @@ -1913,6 +1917,7 @@ class ResourceBooking extends SimpleORMap implements PrivacyObject, Studip\Calen $template->set_attribute('begin', $this->begin); $template->set_attribute('end', $this->end); $template->set_attribute('deleting_user', User::findCurrent()); + $template->set_attribute('booking_course', $booking_course); $mail_text = $template->render(); diff --git a/locale/de/LC_MAILS/delete_booking_notification.php b/locale/de/LC_MAILS/delete_booking_notification.php index e3f80a0..c5ef18d 100644 --- a/locale/de/LC_MAILS/delete_booking_notification.php +++ b/locale/de/LC_MAILS/delete_booking_notification.php @@ -6,6 +6,10 @@ Ihre Buchung der Ressource <?= $resource->name ?> am <?= date('d.m.Y', $begin) ? von <?= date('H:i', $begin) ?> bis <?= date('H:i', $end) ?> Uhr wurde gelöscht. <? endif ?> +<? if ($booking_course instanceof Course): ?> +Es handelte sich um eine Buchung für die Veranstaltung <?= $booking_course->getFullname() ?>. +<? endif ?> + <? if ($deleting_user instanceof User) : ?> Die Löschung wurde von <?= $deleting_user->getFullName() ?> vorgenommen. <? endif ?> diff --git a/locale/en/LC_MAILS/delete_booking_notification.php b/locale/en/LC_MAILS/delete_booking_notification.php index 3d98780..3e57aea 100644 --- a/locale/en/LC_MAILS/delete_booking_notification.php +++ b/locale/en/LC_MAILS/delete_booking_notification.php @@ -6,6 +6,10 @@ Your booking of the resource <?= $resource->name ?> on <?= date('d.m.Y', $begin) from <?= date('H:i', $begin) ?> to <?= date('H:i', $end) ?> has been deleted. <? endif ?> +<? if ($booking_course instanceof Course): ?> +The booking deleted belonged to course <?= $booking_course->getFullname() ?>. +<? endif ?> + <? if ($deleting_user instanceof User) : ?> The deletion has been made by <?= $deleting_user->getFullName() ?>. <? endif ?> |
