25 include_once
'./Services/Language/classes/class.ilLanguageFactory.php';
27 $cal_lang->loadLanguageModule(
'dateplaner');
29 include_once
'./Services/Calendar/classes/class.ilCalendarUtil.php';
30 include_once
'./Services/Calendar/classes/class.ilCalendarCategory.php';
34 $cal_lang->txt(
'cal_ch_personal_ch'),
39 include_once
'./Services/Calendar/classes/class.ilCalendarEntry.php';
41 $personal_app = clone $app;
42 $personal_app->save();
45 include_once
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php';
50 include_once
'./Services/Booking/classes/class.ilBookingEntry.php';
52 $booking->
book($app->getEntryId(),$a_usr_id);
62 public static function cancelBooking($a_usr_id,$a_app_id, $a_send_notification =
true)
65 include_once
'./Services/Calendar/classes/class.ilCalendarEntry.php';
68 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourAppointments.php';
76 foreach($user_apps as $uapp_id)
81 include_once
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php';
90 if($a_send_notification)
96 $booking->deleteBooking($a_app_id, $a_usr_id);
109 $query =
'SELECT user_id FROM cal_ch_settings '.
110 'WHERE admin_id = '.$ilDB->quote($a_usr_id,
'integer');
116 $users[] =
$row->user_id;
Model for a calendar entry.
static lookupManagedUsers($a_usr_id)
Lookup managed users.
static getAppointmentIds($a_user_id, $a_context_id=NULL, $a_start=NULL, $a_type=NULL, $a_check_owner=true)
Get all appointment ids.
static _getLanguage($a_lang_key='')
Get langauge object.
cancelBooking($a_entry_id, $a_user_id=false)
cancel calendar booking for user
static _deleteByAppointmentId($a_app_id)
Delete appointment assignment.
Create styles array
The data for the language used.
addAssignment($a_cal_cat_id)
add assignment
static cancelBooking($a_usr_id, $a_app_id, $a_send_notification=true)
Cancel a booking.
book($a_entry_id, $a_user_id=false)
book calendar entry for user
static initDefaultCalendarByType($a_type_id, $a_usr_id, $a_title, $a_create=false)
Init the default calendar for given type and user.
static bookAppointment($a_usr_id, $a_app_id)
Book an appointment.