Skip to content

Commit

Permalink
Calendar: fix confirmation messages for consultation hour owners and …
Browse files Browse the repository at this point in the history
…managers (42891)
  • Loading branch information
schmitz-ilias committed Nov 25, 2024
1 parent f48da0c commit fff91db
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ public function send(): void

$comment = ilBookingEntry::lookupBookingMessage($entry->getEntryId(), $user_id);
if ($comment !== '') {
$this->appendBody("\n\n");
$this->appendBody(
$this->getLanguageText('cal_ch_booking_your_comment') . ' "' .
$comment
Expand All @@ -329,17 +330,25 @@ public function send(): void
);
$this->setBody(ilMail::getSalutation($user_id, $this->getLanguage()));
$this->appendBody("\n\n");
$this->appendBody(
sprintf(
$this->getLanguageText('cal_booking_confirmation_body'),
if ($user_id == $booking->getObjId()) {
$message = sprintf(
$this->getLanguageText('cal_booking_owner_confirmation_body'),
ilObjUser::_lookupFullname($this->getBookerID())
);
} else {
$message = sprintf(
$this->getLanguageText('cal_booking_manager_confirmation_body'),
ilObjUser::_lookupFullname($this->getBookerID()),
ilObjUser::_lookupFullname($booking->getObjId())
)
);
);
}
$this->appendBody($message);
$this->appendBody("\n\n");
$this->appendAppointmentDetails();

$comment = ilBookingEntry::lookupBookingMessage($entry->getEntryId(), $this->getBookerID());
if ($comment !== '') {
$this->appendBody("\n\n");
$this->appendBody(
$this->getLanguageText('cal_ch_booking_comment') . ' "' .
$comment
Expand Down
2 changes: 2 additions & 0 deletions lang/ilias_de.lang
Original file line number Diff line number Diff line change
Expand Up @@ -8208,6 +8208,8 @@ dateplaner#:#cal_booking_confirmation_subject#:#Termin „%s“ wurde gebucht
dateplaner#:#cal_booking_confirmation_user#:#Dies ist eine Kopie der Mail an Benutzer:
dateplaner#:#cal_booking_confirmed#:#Der Termin wurde erfolgreich gebucht.
dateplaner#:#cal_booking_failed_info#:#Die Buchung konnte nicht vorgenommen werden, da der Termin ausgebucht ist.
dateplaner#:#cal_booking_manager_confirmation_body#:#%s hat bei %s eine Sprechstunde gebucht.
dateplaner#:#cal_booking_owner_confirmation_body#:#%s hat bei Ihnen eine Sprechstunde gebucht.
dateplaner#:#cal_cache#:#Kalender-Cache
dateplaner#:#cal_cache_disabled#:#Ausgeschaltet
dateplaner#:#cal_cache_enabled#:#Eingeschaltet
Expand Down
4 changes: 3 additions & 1 deletion lang/ilias_en.lang
Original file line number Diff line number Diff line change
Expand Up @@ -8203,12 +8203,14 @@ dateplaner#:#cal_booked_out#:#booked up
dateplaner#:#cal_booking_cancellation_body#:#your appointment with %s has been cancelled.
dateplaner#:#cal_booking_cancellation_subject#:#The appointment "%s" has been cancelled
dateplaner#:#cal_booking_cancellation_user#:#This is a copy from the original mail to user:
dateplaner#:#cal_booking_confirmation_body#:#your appointment with %s has been booked.
dateplaner#:#cal_booking_confirmation_body#:#Your appointment with %s has been booked.
dateplaner#:#cal_booking_confirmation_link#:#Link to the appointment:
dateplaner#:#cal_booking_confirmation_subject#:#The appointment "%s" has been booked
dateplaner#:#cal_booking_confirmation_user#:#This is a copy from the original mail to user:
dateplaner#:#cal_booking_confirmed#:#The appointment has been booked successfully.
dateplaner#:#cal_booking_failed_info#:#This appointment is booked out. Please choose another appointment.
dateplaner#:#cal_booking_manager_confirmation_body#:#%s has booked an appointment with %s.
dateplaner#:#cal_booking_owner_confirmation_body#:#%s has booked an appointment with you.
dateplaner#:#cal_cache#:#Calendar Cache
dateplaner#:#cal_cache_disabled#:#Disabled
dateplaner#:#cal_cache_enabled#:#Enabled
Expand Down

0 comments on commit fff91db

Please sign in to comment.