Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion lbplanner/services/slots/book_reservation.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ public static function book_reservation(int $slotid, string $date, int $userid):
slot_helper::TABLE_RESERVATIONS,
['id' => $overlapres->id]
);
notifications_helper::notify_user($userid, $overlapres->id, NOTIF_TRIGGER::UNBOOK_FORCED);
}
}

Expand Down
7 changes: 0 additions & 7 deletions lbplanner/services/slots/delete_slot.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
use core_external\{external_api, external_function_parameters, external_value};

use local_lbplanner\helpers\slot_helper;
use local_lbplanner\helpers\notifications_helper;
use local_lbplanner\enums\NOTIF_TRIGGER;

/**
* Deletes slot
Expand Down Expand Up @@ -63,11 +61,6 @@ public static function delete_slot(int $id): void {
// Check if user is supervisor for this slot, throw error if not.
slot_helper::assert_slot_supervisor($USER->id, $id);

// Notify affected users.
$reservations = slot_helper::get_reservations_for_slot($id);
foreach ($reservations as $res) {
notifications_helper::notify_user($res->userid, $res->id, NOTIF_TRIGGER::UNBOOK_FORCED);
}
// Delete all reservations for this slot.
$DB->delete_records(
slot_helper::TABLE_RESERVATIONS,
Expand Down
2 changes: 0 additions & 2 deletions lbplanner/services/slots/unbook_reservation.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ public static function unbook_reservation(int $reservationid, bool $nice): void
}
notifications_helper::notify_user($reservation->userid, $reservation->id, NOTIF_TRIGGER::UNBOOK_REQUESTED);
return;
} else {
notifications_helper::notify_user($reservation->userid, $reservation->id, NOTIF_TRIGGER::UNBOOK_FORCED);
}
} else {
throw new \moodle_exception('insufficient permission to unbook this reservation');
Expand Down
Loading