|
ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
Booking definition. More...
Collaboration diagram for ilBookingEntry: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 @global type $ilDB. More... | |
Static Public Member Functions | |
| static | resetGroup ($a_group_id) |
| Reset booking group (in case of deletion) @global 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 @global 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 | ) |
| 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, hasBooked(), and ilCalendarMailNotification\TYPE_BOOKING_CONFIRMATION.
Here is the call graph for this function:| 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(), deleteBooking(), hasBooked(), IL_CAL_UNIX, and ilCalendarMailNotification\TYPE_BOOKING_CANCELLATION.
Here is the call graph for this function:| ilBookingEntry::delete | ( | ) |
| ilBookingEntry::deleteBooking | ( | $a_entry_id, | |
| $a_user_id | |||
| ) |
Delete booking @global type $ilDB.
| type | $a_entry_id | |
| type | $a_user_id |
Definition at line 841 of file class.ilBookingEntry.php.
Referenced by cancelBooking().
Here is the caller graph for this function:| ilBookingEntry::getBookingGroup | ( | ) |
Definition at line 99 of file class.ilBookingEntry.php.
References $booking_group.
Referenced by isAppointmentBookableForUser(), save(), and update().
Here is the caller graph for this function:| ilBookingEntry::getCurrentBookings | ( | $a_entry_id | ) |
get current bookings
| int | $a_entry_id |
Definition at line 553 of file class.ilBookingEntry.php.
| 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().
Here is the caller graph for this function:| ilBookingEntry::getDeadlineHours | ( | ) |
get deadline hours
Definition at line 137 of file class.ilBookingEntry.php.
References $deadline.
Referenced by isAppointmentBookableForUser(), isBookedOut(), save(), and update().
Here is the caller graph for this function:| ilBookingEntry::getId | ( | ) |
Get id.
Definition at line 89 of file class.ilBookingEntry.php.
References $id.
Referenced by __construct(), delete(), read(), save(), and update().
Here is the caller graph for this function:
|
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().
Here is the caller graph for this function:| 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().
Here is the caller graph for this function:| ilBookingEntry::getObjId | ( | ) |
get obj id
Definition at line 118 of file class.ilBookingEntry.php.
References $obj_id.
Referenced by isAppointmentBookableForUser(), isOwner(), save(), and update().
Here is the caller graph for this function:| ilBookingEntry::getTargetObjIds | ( | ) |
get target object id
Definition at line 175 of file class.ilBookingEntry.php.
References $target_obj_ids.
Referenced by isTargetObjectVisible().
Here is the caller graph for this function:| 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().
Here is the caller graph for this function:
|
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().
Here is the caller graph for this function:| 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, lookupBookingsOfUser(), and ilConsultationHourGroups\lookupMaxBookings().
Here is the call graph for this function:
|
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, 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(), hasBooked(), and IL_CAL_UNIX.
Here is the call graph for this function:| 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().
Here is the call graph for this function:| 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().
Here is the call graph for this function:
|
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, ilDBConstants\FETCHMODE_OBJECT, and ilCalendarCategory\TYPE_CH.
Referenced by ilCalendarBlockGUI\getHTML().
Here is the caller graph for this function:
|
static |
Definition at line 497 of file class.ilBookingEntry.php.
References $ilDB, $query, $res, $row, and ilDBConstants\FETCHMODE_OBJECT.
Referenced by ilConsultationHourBookingTableGUI\parse().
Here is the caller graph for this function:
|
static |
Lookup booked users for appointment @global type $ilDB.
| type | $a_app_id |
Definition at line 573 of file class.ilBookingEntry.php.
References $ilDB, $query, $res, and $row.
Referenced by ilConsultationHoursGUI\confirmDelete(), and ilConsultationHourBookingTableGUI\parse().
Here is the caller graph for this function:
|
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, ilDBConstants\FETCHMODE_OBJECT, IL_CAL_DATETIME, IL_CAL_UNIX, and ilTimeZone\UTC.
Referenced by lookupManagedBookingsForObject().
Here is the caller graph for this function:
|
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, and ilDBConstants\FETCHMODE_OBJECT.
Referenced by ilConsultationHoursGUI\assignUsersToAppointment(), ilConsultationHoursGUI\assignUsersToGroup(), and isAppointmentBookableForUser().
Here is the caller graph for this function:
|
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(), lookupBookingsForObject(), and ilConsultationHourUtils\lookupManagedUsers().
Referenced by ilCourseParticipantsTableGUI\parse(), ilGroupParticipantsTableGUI\parse(), and ilMemberExport\write().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Read settings from db.
Definition at line 287 of file class.ilBookingEntry.php.
References $ilDB, $query, $res, $row, ilDBConstants\FETCHMODE_ASSOC, ilDBConstants\FETCHMODE_OBJECT, getId(), setBookingGroup(), setDeadlineHours(), setNumberOfBookings(), and setObjId().
Referenced by __construct().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Remove unused booking entries.
Definition at line 344 of file class.ilBookingEntry.php.
References $ilDB, $row, and ilCalendarCategory\TYPE_CH.
Referenced by ilConsultationHoursGUI\delete(), and ilConsultationHoursGUI\updateMulti().
Here is the caller graph for this function:
|
static |
Reset booking group (in case of deletion) @global type $ilDB.
| type | $a_group_id |
Definition at line 42 of file class.ilBookingEntry.php.
Referenced by ilConsultationHourGroup\delete().
Here is the caller graph for this function:| ilBookingEntry::save | ( | ) |
Save a new booking entry.
Definition at line 200 of file class.ilBookingEntry.php.
References $ilDB, $obj_id, $query, getBookingGroup(), getDeadlineHours(), getId(), getNumberOfBookings(), getObjId(), and setId().
Here is the call graph for this function:| ilBookingEntry::setBookingGroup | ( | $a_id | ) |
Definition at line 94 of file class.ilBookingEntry.php.
Referenced by read().
Here is the caller graph for this function:| ilBookingEntry::setDeadlineHours | ( | $a_hours | ) |
set deadline hours
| int | $a_hours |
Definition at line 128 of file class.ilBookingEntry.php.
Referenced by read().
Here is the caller graph for this function:
|
protected |
Set id.
| int | $a_id |
Definition at line 80 of file class.ilBookingEntry.php.
Referenced by __construct(), and save().
Here is the caller graph for this function:| ilBookingEntry::setNumberOfBookings | ( | $a_num | ) |
set number of bookings
| int | $a_num |
Definition at line 147 of file class.ilBookingEntry.php.
Referenced by read().
Here is the caller graph for this function:| ilBookingEntry::setObjId | ( | $a_id | ) |
Set obj id.
| int | $a_id |
Definition at line 109 of file class.ilBookingEntry.php.
Referenced by read().
Here is the caller graph for this function:| ilBookingEntry::setTargetObjIds | ( | $a_obj_id | ) |
set target object id
| int | $a_obj_id |
Definition at line 166 of file class.ilBookingEntry.php.
| ilBookingEntry::update | ( | ) |
Update an existing booking entry.
Definition at line 231 of file class.ilBookingEntry.php.
References $ilDB, $obj_id, $query, getBookingGroup(), getDeadlineHours(), getId(), getNumberOfBookings(), and getObjId().
Here is the call graph for this function:
|
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().
Here is the caller graph for this function:
|
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().