ILIAS
Release_5_0_x_branch Revision 61816
|
Booking definition. More...
Public Member Functions | |
__construct ($a_booking_id=0) | |
Constructor. | |
getId () | |
Get id. | |
setBookingGroup ($a_id) | |
getBookingGroup () | |
setObjId ($a_id) | |
Set obj id. | |
getObjId () | |
get obj id | |
setDeadlineHours ($a_hours) | |
set deadline hours | |
getDeadlineHours () | |
get deadline hours | |
setNumberOfBookings ($a_num) | |
set number of bookings | |
getNumberOfBookings () | |
get number of bookings | |
setTargetObjIds ($a_obj_id) | |
set target object id | |
getTargetObjIds () | |
get target object id | |
isTargetObjectVisible ($a_ref_id) | |
Check if target ref id is visible. | |
save () | |
Save a new booking entry. | |
update () | |
Update an existing booking entry. | |
delete () | |
Delete. | |
isOwner ($a_user_id=NULL) | |
check if current (or given) user is entry owner | |
getCurrentNumberOfBookings ($a_entry_id) | |
get current number of bookings | |
getCurrentBookings ($a_entry_id) | |
get current bookings | |
hasBooked ($a_entry_id, $a_user_id=NULL) | |
get current number of bookings | |
isBookedOut ($a_entry_id, $a_check_current_user=false) | |
get current number of bookings | |
isAppointmentBookableForUser ($a_app_id, $a_user_id) | |
Check if a calendar appointment is bookable for a specific user. | |
book ($a_entry_id, $a_user_id=false) | |
book calendar entry for user | |
cancelBooking ($a_entry_id, $a_user_id=false) | |
cancel calendar booking for user | |
deleteBooking ($a_entry_id, $a_user_id) | |
Delete booking type $ilDB. |
Static Public Member Functions | |
static | resetGroup ($a_group_id) |
Reset booking group (in case of deletion) type $ilDB. | |
static | lookupBookingsOfUser ($a_app_ids, $a_usr_id, ilDateTime $start=null) |
Lookup bookings if user. | |
static | removeObsoleteEntries () |
Remove unused booking entries. | |
static | getInstanceByCalendarEntryId ($a_id) |
Get instance by calendar entry. | |
static | isBookable (array $a_obj_ids, $a_target_obj_id=NULL) |
Which objects are bookable? | |
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. | |
static | hasObjectBookingEntries ($a_obj_id, $a_usr_id) |
Check if object has assigned consultation hour appointments. | |
static | lookupBookingMessage ($a_entry_id, $a_usr_id) |
static | writeBookingMessage ($a_entry_id, $a_usr_id, $a_message) |
Write booking message. | |
static | lookupBookingsForAppointment ($a_app_id) |
Lookup booked users for appointment type $ilDB. | |
static | lookupBookingsForObject ($a_obj_id, $a_usr_id) |
Lookup booking for an object and user. | |
static | lookupManagedBookingsForObject ($a_obj_id, $a_usr_id) |
Lookup bookings for own and managed consultation hours of an object. |
Protected Member Functions | |
setId ($a_id) | |
Set id. | |
read () | |
Read settings from db. |
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.
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(), deleteBooking(), hasBooked(), IL_CAL_UNIX, 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, and $row.
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 DB_FETCHMODE_OBJECT.
Referenced by ilExportFieldsInfo\getSelectableFieldsInfo(), and ilMemberExportGUI\show().
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().
|
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 DB_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(), 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 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, DB_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 DB_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, and $row.
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, DB_FETCHMODE_OBJECT, IL_CAL_DATETIME, IL_CAL_UNIX, and ilTimeZone\UTC.
Referenced by lookupManagedBookingsForObject().
|
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 DB_FETCHMODE_OBJECT.
Referenced by ilConsultationHoursGUI\assignUsersToAppointment(), ilConsultationHoursGUI\assignUsersToGroup(), and isAppointmentBookableForUser().
|
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 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, DB_FETCHMODE_ASSOC, DB_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, 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, 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\isValidEvent().
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().
|
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().