ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
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... | |
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 | ) |
Constructor.
Definition at line 27 of file class.ilBookingEntry.php.
References getId(), read(), and setId().
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 778 of file class.ilBookingEntry.php.
References $ilDB, $ilUser, array, hasBooked(), time, 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 808 of file class.ilBookingEntry.php.
References $ilDB, $ilUser, ilDateTime\_before(), array, deleteBooking(), hasBooked(), IL_CAL_UNIX, time, and ilCalendarMailNotification\TYPE_BOOKING_CANCELLATION.
Referenced by ilConsultationHourUtils\cancelBooking(), and ilCalendarAppointmentGUI\cancelConfirmed().
ilBookingEntry::delete | ( | ) |
Delete.
Definition at line 268 of file class.ilBookingEntry.php.
References $ilDB, $query, and getId().
ilBookingEntry::deleteBooking | ( | $a_entry_id, | |
$a_user_id | |||
) |
Delete booking type $ilDB.
type | $a_entry_id | |
type | $a_user_id |
Definition at line 841 of file class.ilBookingEntry.php.
Referenced by cancelBooking().
ilBookingEntry::getBookingGroup | ( | ) |
Definition at line 99 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 553 of file class.ilBookingEntry.php.
References $ilDB, $res, $row, and array.
Referenced by ilConsultationHoursTableGUI\parse().
ilBookingEntry::getCurrentNumberOfBookings | ( | $a_entry_id | ) |
get current number of bookings
int | $a_entry_id |
Definition at line 538 of file class.ilBookingEntry.php.
Referenced by isAppointmentBookableForUser(), and isBookedOut().
ilBookingEntry::getDeadlineHours | ( | ) |
get deadline hours
Definition at line 137 of file class.ilBookingEntry.php.
References $deadline.
Referenced by isAppointmentBookableForUser(), isBookedOut(), save(), and update().
ilBookingEntry::getId | ( | ) |
Get id.
Definition at line 89 of file class.ilBookingEntry.php.
References $id.
Referenced by __construct(), ilConsultationHoursGUI\createAppointments(), delete(), read(), save(), and update().
|
static |
Get instance by calendar entry.
int | $id |
Definition at line 367 of file class.ilBookingEntry.php.
Referenced by ilConsultationHoursGUI\assignUsersToAppointment(), ilConsultationHoursGUI\assignUsersToGroup(), ilConsultationHoursGUI\delete(), and ilConsultationHoursGUI\updateMulti().
ilBookingEntry::getNumberOfBookings | ( | ) |
get number of bookings
Definition at line 156 of file class.ilBookingEntry.php.
References $num_bookings.
Referenced by isAppointmentBookableForUser(), isBookedOut(), save(), and update().
ilBookingEntry::getObjId | ( | ) |
get obj id
Definition at line 118 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 175 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 655 of file class.ilBookingEntry.php.
References $ilDB, $ilUser, $query, and $row.
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 473 of file class.ilBookingEntry.php.
References $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 719 of file class.ilBookingEntry.php.
References ilDateTime\_after(), ilConsultationHourAppointments\getAppointmentIdsByGroup(), getBookingGroup(), getCurrentNumberOfBookings(), getDeadlineHours(), getNumberOfBookings(), getObjId(), IL_CAL_HOUR, IL_CAL_UNIX, ilConsultationHourGroups\lookupMaxBookings(), and time.
|
static |
Which objects are bookable?
array | $a_obj_ids | |
int | $a_target_obj_id |
Definition at line 385 of file class.ilBookingEntry.php.
References $ilDB, $query, $res, $row, array, 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 679 of file class.ilBookingEntry.php.
References $deadline, $ilUser, getCurrentNumberOfBookings(), getDeadlineHours(), getNumberOfBookings(), getObjId(), hasBooked(), IL_CAL_UNIX, and time.
ilBookingEntry::isOwner | ( | $a_user_id = NULL | ) |
check if current (or given) user is entry owner
int | $a_user_id |
Definition at line 325 of file class.ilBookingEntry.php.
References $ilUser, and getObjId().
ilBookingEntry::isTargetObjectVisible | ( | $a_ref_id | ) |
Check if target ref id is visible.
type | $a_ref_id |
Definition at line 184 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 419 of file class.ilBookingEntry.php.
References $ilDB, $query, $res, $row, array, ilDBConstants\FETCHMODE_OBJECT, and ilCalendarCategory\TYPE_CH.
Referenced by ilCalendarBlockGUI\getHTML().
|
static |
Definition at line 497 of file class.ilBookingEntry.php.
References $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 573 of file class.ilBookingEntry.php.
References $ilDB, $query, $res, $row, and array.
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 595 of file class.ilBookingEntry.php.
References $ilDB, $query, $res, $row, array, 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 57 of file class.ilBookingEntry.php.
References $ilDB, $query, $res, $row, array, 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 629 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 287 of file class.ilBookingEntry.php.
References $ilDB, $query, $res, $row, array, ilDBConstants\FETCHMODE_ASSOC, ilDBConstants\FETCHMODE_OBJECT, getId(), setBookingGroup(), setDeadlineHours(), setNumberOfBookings(), and setObjId().
Referenced by __construct().
|
static |
Remove unused booking entries.
Definition at line 344 of file class.ilBookingEntry.php.
References $ilDB, $row, array, 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 42 of file class.ilBookingEntry.php.
Referenced by ilConsultationHourGroup\delete().
ilBookingEntry::save | ( | ) |
Save a new booking entry.
Definition at line 200 of file class.ilBookingEntry.php.
References $ilDB, $obj_id, $query, array, getBookingGroup(), getDeadlineHours(), getId(), getNumberOfBookings(), getObjId(), and setId().
ilBookingEntry::setBookingGroup | ( | $a_id | ) |
Definition at line 94 of file class.ilBookingEntry.php.
Referenced by read().
ilBookingEntry::setDeadlineHours | ( | $a_hours | ) |
set deadline hours
int | $a_hours |
Definition at line 128 of file class.ilBookingEntry.php.
Referenced by read().
|
protected |
Set id.
int | $a_id |
Definition at line 80 of file class.ilBookingEntry.php.
Referenced by __construct(), and save().
ilBookingEntry::setNumberOfBookings | ( | $a_num | ) |
set number of bookings
int | $a_num |
Definition at line 147 of file class.ilBookingEntry.php.
Referenced by read().
ilBookingEntry::setObjId | ( | $a_id | ) |
Set obj id.
int | $a_id |
Definition at line 109 of file class.ilBookingEntry.php.
Referenced by read().
ilBookingEntry::setTargetObjIds | ( | $a_obj_id | ) |
set target object id
int | $a_obj_id |
Definition at line 166 of file class.ilBookingEntry.php.
Referenced by ilCalendarScheduleFilterBookings\modifyEvent().
ilBookingEntry::update | ( | ) |
Update an existing booking entry.
Definition at line 231 of file class.ilBookingEntry.php.
References $ilDB, $obj_id, $query, array, getBookingGroup(), getDeadlineHours(), getId(), getNumberOfBookings(), and getObjId().
|
static |
Write booking message.
type | $a_entry_id | |
type | $a_usr_id | |
type | $a_message |
Definition at line 518 of file class.ilBookingEntry.php.
References $GLOBALS, $ilDB, and $query.
Referenced by ilCalendarAppointmentGUI\bookconfirmed().
|
private |
Definition at line 21 of file class.ilBookingEntry.php.
Referenced by getBookingGroup().
|
private |
Definition at line 18 of file class.ilBookingEntry.php.
Referenced by getDeadlineHours(), and isBookedOut().
|
private |
Definition at line 15 of file class.ilBookingEntry.php.
Referenced by getId().
|
private |
Definition at line 19 of file class.ilBookingEntry.php.
Referenced by getNumberOfBookings().
|
private |
Definition at line 16 of file class.ilBookingEntry.php.
Referenced by getObjId(), isTargetObjectVisible(), save(), and update().
|
private |
Definition at line 20 of file class.ilBookingEntry.php.
Referenced by getTargetObjIds().