ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Booking definition. More...
Public Member Functions | |
__construct ($a_booking_id=0) | |
Constructor. More... | |
getId () | |
Get id. More... | |
setBookingGroup ($a_id) | |
getBookingGroup () | |
setObjId ($a_id) | |
Set obj id. More... | |
getObjId () | |
get obj id More... | |
setDeadlineHours ($a_hours) | |
set deadline hours More... | |
getDeadlineHours () | |
get deadline hours More... | |
setNumberOfBookings ($a_num) | |
set number of bookings More... | |
getNumberOfBookings () | |
get number of bookings More... | |
setTargetObjIds ($a_obj_id) | |
set target object id More... | |
getTargetObjIds () | |
get target object id More... | |
isTargetObjectVisible ($a_ref_id) | |
Check if target ref id is visible. More... | |
save () | |
Save a new booking entry. More... | |
update () | |
Update an existing booking entry. More... | |
delete () | |
Delete. More... | |
isOwner ($a_user_id=null) | |
check if current (or given) user is entry owner More... | |
getCurrentNumberOfBookings ($a_entry_id) | |
get current number of bookings More... | |
getCurrentBookings ($a_entry_id) | |
get current bookings More... | |
hasBooked ($a_entry_id, $a_user_id=null) | |
get current number of bookings More... | |
isBookedOut ($a_entry_id, $a_check_current_user=false) | |
get current number of bookings More... | |
isAppointmentBookableForUser ($a_app_id, $a_user_id) | |
Check if a calendar appointment is bookable for a specific user. More... | |
book ($a_entry_id, $a_user_id=false) | |
book calendar entry for user More... | |
cancelBooking ($a_entry_id, $a_user_id=false) | |
cancel calendar booking for user More... | |
deleteBooking ($a_entry_id, $a_user_id) | |
Delete booking type $ilDB. More... | |
Static Public Member Functions | |
static | resetGroup ($a_group_id) |
Reset booking group (in case of deletion) type $ilDB. More... | |
static | lookupBookingsOfUser ($a_app_ids, $a_usr_id, ilDateTime $start=null) |
Lookup bookings if user. More... | |
static | removeObsoleteEntries () |
Remove unused booking entries. More... | |
static | getInstanceByCalendarEntryId ($a_id) |
Get instance by calendar entry. More... | |
static | isBookable (array $a_obj_ids, $a_target_obj_id=null) |
Which objects are bookable? More... | |
static | lookupBookableUsersForObject ($a_obj_id, $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 ($a_obj_id, $a_usr_id) |
Check if object has assigned consultation hour appointments. More... | |
static | lookupBookingMessage ($a_entry_id, $a_usr_id) |
static | writeBookingMessage ($a_entry_id, $a_usr_id, $a_message) |
Write booking message. More... | |
static | lookupBookingsForAppointment ($a_app_id) |
Lookup booked users for appointment type $ilDB. More... | |
static | lookupBookingsForObject ($a_obj_id, $a_usr_id) |
Lookup booking for an object and user. More... | |
static | lookupManagedBookingsForObject ($a_obj_id, $a_usr_id) |
Lookup bookings for own and managed consultation hours of an object. More... | |
Protected Member Functions | |
setId ($a_id) | |
Set id. More... | |
read () | |
Read settings from db. More... | |
Protected Attributes | |
$db | |
$user | |
Private Attributes | |
$id = 0 | |
$obj_id = 0 | |
$deadline = 0 | |
$num_bookings = 1 | |
$target_obj_ids = array() | |
$booking_group = 0 | |
ilBookingEntry::__construct | ( | $a_booking_id = 0 | ) |
ilBookingEntry::book | ( | $a_entry_id, | |
$a_user_id = false |
|||
) |
book calendar entry for user
int | $a_entry_id | |
int | $a_user_id |
Definition at line 771 of file class.ilBookingEntry.php.
References $db, $ilDB, $ilUser, $user, hasBooked(), and ilCalendarMailNotification\TYPE_BOOKING_CONFIRMATION.
Referenced by ilConsultationHourUtils\bookAppointment().
ilBookingEntry::cancelBooking | ( | $a_entry_id, | |
$a_user_id = false |
|||
) |
cancel calendar booking for user
int | $a_entry_id | |
int | $a_user_id |
Definition at line 800 of file class.ilBookingEntry.php.
References $db, $ilDB, $ilUser, $user, ilDateTime\_before(), deleteBooking(), hasBooked(), IL_CAL_UNIX, and ilCalendarMailNotification\TYPE_BOOKING_CANCELLATION.
Referenced by ilConsultationHourUtils\cancelBooking(), and ilCalendarAppointmentGUI\cancelConfirmed().
ilBookingEntry::delete | ( | ) |
ilBookingEntry::deleteBooking | ( | $a_entry_id, | |
$a_user_id | |||
) |
Delete booking type $ilDB.
type | $a_entry_id | |
type | $a_user_id |
Definition at line 832 of file class.ilBookingEntry.php.
References $db, $ilDB, and $query.
Referenced by cancelBooking().
ilBookingEntry::getBookingGroup | ( | ) |
Definition at line 115 of file class.ilBookingEntry.php.
References $booking_group.
Referenced by isAppointmentBookableForUser(), save(), and update().
ilBookingEntry::getCurrentBookings | ( | $a_entry_id | ) |
get current bookings
int | $a_entry_id |
Definition at line 560 of file class.ilBookingEntry.php.
References $db, $ilDB, $res, and $row.
Referenced by ilConsultationHoursTableGUI\parse().
ilBookingEntry::getCurrentNumberOfBookings | ( | $a_entry_id | ) |
get current number of bookings
int | $a_entry_id |
Definition at line 545 of file class.ilBookingEntry.php.
References $db, $ilDB, and $row.
Referenced by isAppointmentBookableForUser(), and isBookedOut().
ilBookingEntry::getDeadlineHours | ( | ) |
get deadline hours
Definition at line 153 of file class.ilBookingEntry.php.
References $deadline.
Referenced by isAppointmentBookableForUser(), isBookedOut(), save(), and update().
ilBookingEntry::getId | ( | ) |
Get id.
Definition at line 105 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 376 of file class.ilBookingEntry.php.
Referenced by ilConsultationHoursGUI\assignUsersToAppointment(), ilConsultationHoursGUI\assignUsersToGroup(), ilConsultationHoursGUI\delete(), and ilConsultationHoursGUI\rewriteBookingIdsForAppointments().
ilBookingEntry::getNumberOfBookings | ( | ) |
get number of bookings
Definition at line 172 of file class.ilBookingEntry.php.
References $num_bookings.
Referenced by isAppointmentBookableForUser(), isBookedOut(), save(), and update().
ilBookingEntry::getObjId | ( | ) |
get obj id
Definition at line 134 of file class.ilBookingEntry.php.
References $obj_id.
Referenced by isAppointmentBookableForUser(), isBookedOut(), isOwner(), save(), and update().
ilBookingEntry::getTargetObjIds | ( | ) |
get target object id
Definition at line 191 of file class.ilBookingEntry.php.
References $target_obj_ids.
Referenced by isTargetObjectVisible().
ilBookingEntry::hasBooked | ( | $a_entry_id, | |
$a_user_id = null |
|||
) |
get current number of bookings
int | $a_entry_id | |
int | $a_user_id |
Definition at line 659 of file class.ilBookingEntry.php.
References $db, $ilDB, $ilUser, $query, $row, and $user.
Referenced by book(), cancelBooking(), and isBookedOut().
|
static |
Check if object has assigned consultation hour appointments.
type | $a_obj_id | |
type | $a_usr_id |
Definition at line 477 of file class.ilBookingEntry.php.
References $DIC, $ilDB, $query, $res, $row, and ilDBConstants\FETCHMODE_OBJECT.
Referenced by ilExportFieldsInfo\getSelectableFieldsInfo(), and ilMemberExportGUI\initSettingsForm().
ilBookingEntry::isAppointmentBookableForUser | ( | $a_app_id, | |
$a_user_id | |||
) |
Check if a calendar appointment is bookable for a specific user.
type | $a_cal_entry_id | |
type | $a_user_id |
Definition at line 717 of file class.ilBookingEntry.php.
References ilDateTime\_after(), ilConsultationHourAppointments\getAppointmentIdsByGroup(), getBookingGroup(), getCurrentNumberOfBookings(), getDeadlineHours(), getNumberOfBookings(), getObjId(), IL_CAL_HOUR, IL_CAL_UNIX, and ilConsultationHourGroups\lookupMaxBookings().
|
static |
Which objects are bookable?
array | $a_obj_ids | |
int | $a_target_obj_id |
Definition at line 393 of file class.ilBookingEntry.php.
References $DIC, $ilDB, $query, $res, $row, and ilDBConstants\FETCHMODE_OBJECT.
ilBookingEntry::isBookedOut | ( | $a_entry_id, | |
$a_check_current_user = false |
|||
) |
get current number of bookings
int | $a_entry_id | (calendar entry) |
bool | $a_check_current_user |
Definition at line 683 of file class.ilBookingEntry.php.
References $deadline, $ilUser, $user, getCurrentNumberOfBookings(), getDeadlineHours(), getNumberOfBookings(), getObjId(), hasBooked(), and IL_CAL_UNIX.
ilBookingEntry::isOwner | ( | $a_user_id = null | ) |
check if current (or given) user is entry owner
int | $a_user_id |
Definition at line 335 of file class.ilBookingEntry.php.
References $ilUser, $user, and getObjId().
ilBookingEntry::isTargetObjectVisible | ( | $a_ref_id | ) |
Check if target ref id is visible.
type | $a_ref_id |
Definition at line 200 of file class.ilBookingEntry.php.
References $obj_id, 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.
type | $a_obj_ids | |
type | $a_user_ids |
Definition at line 425 of file class.ilBookingEntry.php.
References $DIC, $ilDB, $query, $res, $row, ilDBConstants\FETCHMODE_OBJECT, and ilCalendarCategory\TYPE_CH.
Referenced by ilCalendarBlockGUI\getHTML(), and ilCalendarCategories\readAllConsultationHoursCalendarOfContainer().
|
static |
Definition at line 501 of file class.ilBookingEntry.php.
References $DIC, $ilDB, $query, $res, $row, and ilDBConstants\FETCHMODE_OBJECT.
Referenced by ilConsultationHourBookingTableGUI\parse().
|
static |
Lookup booked users for appointment type $ilDB.
type | $a_app_id |
Definition at line 579 of file class.ilBookingEntry.php.
References $DIC, $ilDB, $query, $res, $row, and $users.
Referenced by ilConsultationHoursGUI\confirmDelete(), and ilConsultationHourBookingTableGUI\parse().
|
static |
Lookup booking for an object and user.
type | $a_obj_id | |
type | $a_usr_id |
Definition at line 602 of file class.ilBookingEntry.php.
References $DIC, $ilDB, $query, $res, $row, ilDBConstants\FETCHMODE_OBJECT, IL_CAL_DATETIME, IL_CAL_UNIX, and ilTimeZone\UTC.
|
static |
Lookup bookings if user.
type | $a_app_ids | |
type | $a_usr_id |
Definition at line 72 of file class.ilBookingEntry.php.
References $DIC, $ilDB, $query, $res, $row, and ilDBConstants\FETCHMODE_OBJECT.
Referenced by ilConsultationHoursGUI\assignUsersToAppointment(), and ilConsultationHoursGUI\assignUsersToGroup().
|
static |
Lookup bookings for own and managed consultation hours of an object.
type | $a_obj_id | |
type | $a_usr_id |
Definition at line 636 of file class.ilBookingEntry.php.
References ilObjUser\_lookupFullname(), and ilConsultationHourUtils\lookupManagedUsers().
Referenced by ilGroupParticipantsTableGUI\parse(), ilCourseParticipantsTableGUI\parse(), and ilMemberExport\write().
|
protected |
Read settings from db.
Definition at line 300 of file class.ilBookingEntry.php.
References $db, $ilDB, $query, $res, $row, ilDBConstants\FETCHMODE_ASSOC, ilDBConstants\FETCHMODE_OBJECT, getId(), setBookingGroup(), setDeadlineHours(), setNumberOfBookings(), and setObjId().
Referenced by __construct().
|
static |
Remove unused booking entries.
Definition at line 352 of file class.ilBookingEntry.php.
References $DIC, $ilDB, $row, and ilCalendarCategory\TYPE_CH.
Referenced by ilConsultationHoursGUI\delete(), and ilConsultationHoursGUI\updateMulti().
|
static |
Reset booking group (in case of deletion) type $ilDB.
type | $a_group_id |
Definition at line 55 of file class.ilBookingEntry.php.
References $DIC, $ilDB, and $query.
Referenced by ilConsultationHourGroup\delete().
ilBookingEntry::save | ( | ) |
Save a new booking entry.
Definition at line 215 of file class.ilBookingEntry.php.
References $db, $ilDB, $obj_id, $query, getBookingGroup(), getDeadlineHours(), getId(), getNumberOfBookings(), getObjId(), and setId().
ilBookingEntry::setBookingGroup | ( | $a_id | ) |
Definition at line 110 of file class.ilBookingEntry.php.
Referenced by read().
ilBookingEntry::setDeadlineHours | ( | $a_hours | ) |
set deadline hours
int | $a_hours |
Definition at line 144 of file class.ilBookingEntry.php.
Referenced by read().
|
protected |
Set id.
int | $a_id |
Definition at line 96 of file class.ilBookingEntry.php.
Referenced by __construct(), and save().
ilBookingEntry::setNumberOfBookings | ( | $a_num | ) |
set number of bookings
int | $a_num |
Definition at line 163 of file class.ilBookingEntry.php.
Referenced by read().
ilBookingEntry::setObjId | ( | $a_id | ) |
Set obj id.
int | $a_id |
Definition at line 125 of file class.ilBookingEntry.php.
Referenced by read().
ilBookingEntry::setTargetObjIds | ( | $a_obj_id | ) |
set target object id
int | $a_obj_id |
Definition at line 182 of file class.ilBookingEntry.php.
Referenced by ilCalendarScheduleFilterBookings\modifyEvent().
ilBookingEntry::update | ( | ) |
Update an existing booking entry.
Definition at line 245 of file class.ilBookingEntry.php.
References $db, $ilDB, $obj_id, $query, getBookingGroup(), getDeadlineHours(), getId(), getNumberOfBookings(), and getObjId().
|
static |
Write booking message.
type | $a_entry_id | |
type | $a_usr_id | |
type | $a_message |
Definition at line 523 of file class.ilBookingEntry.php.
References $DIC, $GLOBALS, $ilDB, and $query.
Referenced by ilCalendarAppointmentGUI\bookconfirmed().
|
private |
Definition at line 31 of file class.ilBookingEntry.php.
Referenced by getBookingGroup().
|
protected |
Definition at line 18 of file class.ilBookingEntry.php.
Referenced by book(), cancelBooking(), delete(), deleteBooking(), getCurrentBookings(), getCurrentNumberOfBookings(), hasBooked(), read(), save(), and update().
|
private |
Definition at line 28 of file class.ilBookingEntry.php.
Referenced by getDeadlineHours(), and isBookedOut().
|
private |
Definition at line 25 of file class.ilBookingEntry.php.
Referenced by getId().
|
private |
Definition at line 29 of file class.ilBookingEntry.php.
Referenced by getNumberOfBookings().
|
private |
Definition at line 26 of file class.ilBookingEntry.php.
Referenced by getObjId(), isTargetObjectVisible(), save(), and update().
|
private |
Definition at line 30 of file class.ilBookingEntry.php.
Referenced by getTargetObjIds().
|
protected |
Definition at line 23 of file class.ilBookingEntry.php.
Referenced by book(), cancelBooking(), hasBooked(), isBookedOut(), and isOwner().