ILIAS
release_8 Revision v8.19-1-g4e8f2f9140c
|
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...
Public Member Functions | |
__construct (int $a_booking_id=0) | |
Constructor. More... | |
getId () | |
setBookingGroup (int $a_id) | |
getBookingGroup () | |
setObjId (int $a_id) | |
getObjId () | |
setDeadlineHours (int $a_hours) | |
getDeadlineHours () | |
setNumberOfBookings (int $a_num) | |
getNumberOfBookings () | |
setTargetObjIds (?array $a_obj_id) | |
getTargetObjIds () | |
isTargetObjectVisible (int $a_ref_id) | |
Check if target ref id is visible. More... | |
save () | |
update () | |
delete () | |
isOwner (?int $a_user_id=null) | |
check if current (or given) user is entry owner More... | |
getCurrentNumberOfBookings (int $a_entry_id) | |
get current number of bookings More... | |
getCurrentBookings (int $a_entry_id) | |
get current bookings More... | |
hasBooked (int $a_entry_id, ?int $a_user_id=null) | |
get current number of bookings More... | |
isBookedOut (int $a_entry_id, bool $a_check_current_user=false) | |
get current number of bookings More... | |
isAppointmentBookableForUser (int $a_app_id, int $a_user_id) | |
Check if a calendar appointment is bookable for a specific user. More... | |
book (int $a_entry_id, ?int $a_user_id=null) | |
book calendar entry for user More... | |
cancelBooking (int $a_entry_id, ?int $a_user_id=null) | |
cancel calendar booking for user More... | |
deleteBooking (int $a_entry_id, int $a_user_id) | |
Delete booking. More... | |
Static Public Member Functions | |
static | resetGroup (int $a_group_id) |
Reset booking group (in case of deletion) More... | |
static | lookupBookingsOfUser (array $a_app_ids, int $a_usr_id, ?ilDateTime $start=null) |
Lookup bookings of user. More... | |
static | removeObsoleteEntries () |
Remove unused booking entries. More... | |
static | getInstanceByCalendarEntryId (int $a_id) |
Get instance by calendar entry. More... | |
static | isBookable (array $a_obj_ids, ?int $a_target_obj_id=null) |
Which objects are bookable? More... | |
static | lookupBookableUsersForObject (array $a_obj_id, array $a_user_ids) |
Consultation hours are offered if 1) consultation hour owner is admin or tutor and no object assignment 2) object is assigned to consultation hour. More... | |
static | hasObjectBookingEntries (int $a_obj_id, int $a_usr_id) |
Check if object has assigned consultation hour appointments. More... | |
static | lookupBookingMessage (int $a_entry_id, int $a_usr_id) |
static | writeBookingMessage (int $a_entry_id, int $a_usr_id, string $a_message) |
Write booking message. More... | |
static | lookupBookingsForAppointment (int $a_app_id) |
Lookup booked users for appointment. More... | |
static | lookupBookingsForObject (int $a_obj_id, int $a_usr_id) |
Lookup booking for an object and user. More... | |
static | lookupManagedBookingsForObject (int $a_obj_id, int $a_usr_id) |
Lookup bookings for own and managed consultation hours of an object. More... | |
Protected Member Functions | |
setId (int $a_id) | |
read () | |
Protected Attributes | |
ilDBInterface | $db |
ilObjUser | $user |
Private Attributes | |
int | $id = 0 |
int | $obj_id = 0 |
int | $deadline = 0 |
int | $num_bookings = 1 |
array | $target_obj_ids = [] |
int | $booking_group = 0 |
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Booking definition
Definition at line 27 of file class.ilBookingEntry.php.
ilBookingEntry::__construct | ( | int | $a_booking_id = 0 | ) |
Constructor.
Definition at line 43 of file class.ilBookingEntry.php.
References $DIC, getId(), read(), setId(), and ILIAS\Repository\user().
ilBookingEntry::book | ( | int | $a_entry_id, |
?int | $a_user_id = null |
||
) |
book calendar entry for user
Definition at line 654 of file class.ilBookingEntry.php.
References hasBooked(), ilCalendarMailNotification\TYPE_BOOKING_CONFIRMATION, and ILIAS\Repository\user().
Referenced by ilConsultationHourUtils\bookAppointment().
ilBookingEntry::cancelBooking | ( | int | $a_entry_id, |
?int | $a_user_id = null |
||
) |
cancel calendar booking for user
Definition at line 677 of file class.ilBookingEntry.php.
References ilDateTime\_before(), deleteBooking(), hasBooked(), IL_CAL_UNIX, ilCalendarMailNotification\TYPE_BOOKING_CANCELLATION, and ILIAS\Repository\user().
Referenced by ilConsultationHourUtils\cancelBooking(), and ilCalendarAppointmentGUI\cancelConfirmed().
ilBookingEntry::delete | ( | ) |
Definition at line 227 of file class.ilBookingEntry.php.
References $query, and getId().
ilBookingEntry::deleteBooking | ( | int | $a_entry_id, |
int | $a_user_id | ||
) |
Delete booking.
Definition at line 701 of file class.ilBookingEntry.php.
References $query.
Referenced by cancelBooking().
ilBookingEntry::getBookingGroup | ( | ) |
Definition at line 110 of file class.ilBookingEntry.php.
References $booking_group.
Referenced by ilConsultationHoursGUI\edit(), isAppointmentBookableForUser(), save(), and update().
ilBookingEntry::getCurrentBookings | ( | int | $a_entry_id | ) |
get current bookings
int | $a_entry_id |
Definition at line 479 of file class.ilBookingEntry.php.
References $res, and ILIAS\Repository\int().
Referenced by ilConsultationHoursGUI\delete(), and ilConsultationHoursTableGUI\parse().
ilBookingEntry::getCurrentNumberOfBookings | ( | int | $a_entry_id | ) |
get current number of bookings
Definition at line 463 of file class.ilBookingEntry.php.
Referenced by ilConsultationHoursGUI\assignUsersToAppointment(), ilConsultationHoursGUI\assignUsersToGroup(), isAppointmentBookableForUser(), and isBookedOut().
ilBookingEntry::getDeadlineHours | ( | ) |
Definition at line 130 of file class.ilBookingEntry.php.
References $deadline.
Referenced by ilConsultationHoursGUI\edit(), isAppointmentBookableForUser(), isBookedOut(), save(), and update().
ilBookingEntry::getId | ( | ) |
Definition at line 100 of file class.ilBookingEntry.php.
References $id.
Referenced by __construct(), ilConsultationHoursGUI\createAppointments(), delete(), ilConsultationHourUtils\findCalendarAppointmentsForBooking(), read(), ilConsultationHoursGUI\rewriteBookingIdsForAppointments(), save(), and update().
|
static |
Get instance by calendar entry.
int | $id |
Definition at line 311 of file class.ilBookingEntry.php.
Referenced by ilConsultationHoursGUI\assignUsersToAppointment(), ilConsultationHoursGUI\assignUsersToGroup(), ilConsultationHoursGUI\delete(), and ilConsultationHoursGUI\rewriteBookingIdsForAppointments().
ilBookingEntry::getNumberOfBookings | ( | ) |
Definition at line 140 of file class.ilBookingEntry.php.
References $num_bookings.
Referenced by ilConsultationHoursGUI\assignUsersToAppointment(), ilConsultationHoursGUI\assignUsersToGroup(), ilConsultationHoursGUI\edit(), isAppointmentBookableForUser(), isBookedOut(), save(), ilCalendarAppointmentsTableGUI\setAppointments(), and update().
ilBookingEntry::getObjId | ( | ) |
Definition at line 120 of file class.ilBookingEntry.php.
References $obj_id.
Referenced by isAppointmentBookableForUser(), isBookedOut(), isOwner(), save(), and update().
ilBookingEntry::getTargetObjIds | ( | ) |
Definition at line 156 of file class.ilBookingEntry.php.
References $target_obj_ids.
Referenced by ilConsultationHoursGUI\edit(), and isTargetObjectVisible().
ilBookingEntry::hasBooked | ( | int | $a_entry_id, |
?int | $a_user_id = null |
||
) |
get current number of bookings
Definition at line 565 of file class.ilBookingEntry.php.
References $query, and ILIAS\Repository\user().
Referenced by book(), cancelBooking(), and isBookedOut().
|
static |
Check if object has assigned consultation hour appointments.
Definition at line 405 of file class.ilBookingEntry.php.
References $DIC, $ilDB, $query, $res, ilDBConstants\FETCHMODE_OBJECT, and ilDBConstants\T_INTEGER.
Referenced by ilExportFieldsInfo\getSelectableFieldsInfo(), and ilMemberExportGUI\initSettingsForm().
ilBookingEntry::isAppointmentBookableForUser | ( | int | $a_app_id, |
int | $a_user_id | ||
) |
Check if a calendar appointment is bookable for a specific user.
Definition at line 613 of file class.ilBookingEntry.php.
References ilDateTime\_after(), ANONYMOUS_USER_ID, ilConsultationHourAppointments\getAppointmentIdsByGroup(), getBookingGroup(), getCurrentNumberOfBookings(), getDeadlineHours(), getNumberOfBookings(), getObjId(), IL_CAL_HOUR, IL_CAL_UNIX, and ilConsultationHourGroups\lookupMaxBookings().
|
static |
Which objects are bookable?
int[] | $a_obj_ids | |
int | null | $a_target_obj_id |
Definition at line 327 of file class.ilBookingEntry.php.
References $DIC, $ilDB, $query, $res, ilDBConstants\FETCHMODE_OBJECT, and ILIAS\Repository\int().
ilBookingEntry::isBookedOut | ( | int | $a_entry_id, |
bool | $a_check_current_user = false |
||
) |
get current number of bookings
Definition at line 585 of file class.ilBookingEntry.php.
References getCurrentNumberOfBookings(), getDeadlineHours(), getNumberOfBookings(), getObjId(), hasBooked(), IL_CAL_UNIX, and ILIAS\Repository\user().
ilBookingEntry::isOwner | ( | ?int | $a_user_id = null | ) |
check if current (or given) user is entry owner
int | null | $a_user_id |
Definition at line 267 of file class.ilBookingEntry.php.
References getObjId(), and ILIAS\Repository\user().
ilBookingEntry::isTargetObjectVisible | ( | int | $a_ref_id | ) |
Check if target ref id is visible.
Definition at line 164 of file class.ilBookingEntry.php.
References ilObject\_lookupObjId(), and getTargetObjIds().
|
static |
Consultation hours are offered if 1) consultation hour owner is admin or tutor and no object assignment 2) object is assigned to consultation hour.
int[] | $a_obj_ids |
int[] | $a_user_ids |
Definition at line 358 of file class.ilBookingEntry.php.
References $DIC, $ilDB, $query, $res, ilDBConstants\FETCHMODE_OBJECT, ILIAS\Repository\int(), and ilCalendarCategory\TYPE_CH.
Referenced by ilConsultationHourUtils\getConsultationHourLinksForRepositoryObject(), ilCalendarBlockGUI\getHTML(), and ilCalendarCategories\readAllConsultationHoursCalendarOfContainer().
|
static |
Definition at line 428 of file class.ilBookingEntry.php.
References $DIC, $ilDB, $query, $res, and ilDBConstants\FETCHMODE_OBJECT.
Referenced by ilConsultationHourBookingTableGUI\parse().
|
static |
Lookup booked users for appointment.
int | $a_app_id |
Definition at line 495 of file class.ilBookingEntry.php.
References $DIC, $ilDB, $query, $res, and ILIAS\Repository\int().
Referenced by ilConsultationHoursGUI\confirmDelete(), and ilConsultationHourBookingTableGUI\parse().
|
static |
Lookup booking for an object and user.
int | $a_obj_id | |
int | $a_usr_id |
Definition at line 516 of file class.ilBookingEntry.php.
References $DIC, $ilDB, $query, $res, ilDBConstants\FETCHMODE_OBJECT, IL_CAL_DATETIME, IL_CAL_UNIX, ILIAS\Repository\int(), ilDBConstants\T_INTEGER, and ilTimeZone\UTC.
|
static |
Lookup bookings of user.
int[] | |
int | |
?ilDateTime |
Definition at line 77 of file class.ilBookingEntry.php.
References $DIC, $ilDB, $query, $res, ilDBConstants\FETCHMODE_OBJECT, and ILIAS\Repository\int().
Referenced by ilConsultationHoursGUI\assignUsersToAppointment(), and ilConsultationHoursGUI\assignUsersToGroup().
|
static |
Lookup bookings for own and managed consultation hours of an object.
Definition at line 547 of file class.ilBookingEntry.php.
References ilObjUser\_lookupFullname(), and ilConsultationHourUtils\lookupManagedUsers().
Referenced by ilGroupParticipantsTableGUI\parse(), ilCourseParticipantsTableGUI\parse(), and ilMemberExport\write().
|
protected |
Definition at line 237 of file class.ilBookingEntry.php.
References $query, $res, ilDBConstants\FETCHMODE_ASSOC, ilDBConstants\FETCHMODE_OBJECT, getId(), ILIAS\Repository\int(), setBookingGroup(), setDeadlineHours(), setNumberOfBookings(), and setObjId().
Referenced by __construct().
|
static |
Remove unused booking entries.
Definition at line 281 of file class.ilBookingEntry.php.
References $DIC, $ilDB, and ilCalendarCategory\TYPE_CH.
Referenced by ilConsultationHoursGUI\delete(), and ilConsultationHoursGUI\updateMulti().
|
static |
Reset booking group (in case of deletion)
Definition at line 58 of file class.ilBookingEntry.php.
References $DIC, $ilDB, and $query.
Referenced by ilConsultationHourGroup\delete().
ilBookingEntry::save | ( | ) |
Definition at line 175 of file class.ilBookingEntry.php.
References $query, getBookingGroup(), getDeadlineHours(), getId(), getNumberOfBookings(), getObjId(), and setId().
Referenced by ilConsultationHoursGUI\createNewBookingEntry(), and ilConsultationHoursGUI\saveSequence().
ilBookingEntry::setBookingGroup | ( | int | $a_id | ) |
Definition at line 105 of file class.ilBookingEntry.php.
Referenced by ilConsultationHoursGUI\createNewBookingEntry(), read(), and ilConsultationHoursGUI\saveSequence().
ilBookingEntry::setDeadlineHours | ( | int | $a_hours | ) |
Definition at line 125 of file class.ilBookingEntry.php.
Referenced by ilConsultationHoursGUI\createNewBookingEntry(), read(), and ilConsultationHoursGUI\saveSequence().
|
protected |
Definition at line 95 of file class.ilBookingEntry.php.
Referenced by __construct(), and save().
ilBookingEntry::setNumberOfBookings | ( | int | $a_num | ) |
Definition at line 135 of file class.ilBookingEntry.php.
Referenced by ilConsultationHoursGUI\createNewBookingEntry(), read(), and ilConsultationHoursGUI\saveSequence().
ilBookingEntry::setObjId | ( | int | $a_id | ) |
Definition at line 115 of file class.ilBookingEntry.php.
Referenced by ilConsultationHoursGUI\createNewBookingEntry(), read(), and ilConsultationHoursGUI\saveSequence().
ilBookingEntry::setTargetObjIds | ( | ?array | $a_obj_id | ) |
int[]|null | $a_obj_id |
Definition at line 148 of file class.ilBookingEntry.php.
Referenced by ilConsultationHoursGUI\createNewBookingEntry(), ilCalendarScheduleFilterBookings\modifyEvent(), and ilConsultationHoursGUI\saveSequence().
ilBookingEntry::update | ( | ) |
Definition at line 198 of file class.ilBookingEntry.php.
References $query, getBookingGroup(), getDeadlineHours(), getId(), getNumberOfBookings(), and getObjId().
|
static |
Write booking message.
Definition at line 447 of file class.ilBookingEntry.php.
References $DIC, $ilDB, and $query.
Referenced by ilCalendarAppointmentGUI\bookconfirmed().
|
private |
Definition at line 38 of file class.ilBookingEntry.php.
Referenced by getBookingGroup().
|
protected |
Definition at line 29 of file class.ilBookingEntry.php.
|
private |
Definition at line 35 of file class.ilBookingEntry.php.
Referenced by getDeadlineHours().
|
private |
Definition at line 32 of file class.ilBookingEntry.php.
Referenced by getId().
|
private |
Definition at line 36 of file class.ilBookingEntry.php.
Referenced by getNumberOfBookings().
|
private |
Definition at line 33 of file class.ilBookingEntry.php.
Referenced by getObjId().
|
private |
Definition at line 37 of file class.ilBookingEntry.php.
Referenced by getTargetObjIds().
|
protected |
Definition at line 30 of file class.ilBookingEntry.php.