19 declare(strict_types=1);
81 $this->
http = $DIC->http();
85 if ($this->
http->wrapper()->query()->has(
'user_id')) {
86 $user_id = $this->
http->wrapper()->query()->retrieve(
99 $this->user_id = $DIC->user()->getId();
102 $this->
ctrl = $DIC->ctrl();
103 $this->
lng = $DIC->language();
104 $this->tpl = $DIC->ui()->mainTemplate();
105 $this->
help = $DIC->help();
106 $this->
tabs = $DIC->tabs();
107 $this->
toolbar = $DIC->toolbar();
108 $this->global_user = $DIC->user();
109 $this->ui_factory = $DIC->ui()->factory();
110 $this->ui_renderer = $DIC->ui()->renderer();
115 $this->search_assignment_to_appointments = $a_default;
116 if ($this->
http->wrapper()->query()->has(
'assignM')) {
117 $this->search_assignment_to_appointments = $this->
http->wrapper()->query()->retrieve(
128 return $this->
http->wrapper()->query()->retrieve(
129 BookingTableGUI::ID_TOKEN_NS,
132 $this->refinery->custom()->transformation(
function ($value) use ($current_user_id) {
133 if ($value !== [
'ALL_OBJECTS']) {
147 if ($this->
http->wrapper()->query()->has(
'apps')) {
148 return [$this->
http->wrapper()->query()->retrieve(
'apps', $this->
refinery->kindlyTo()->int())];
155 if ($this->
http->wrapper()->post()->has(
'apps')) {
156 return $this->
http->wrapper()->post()->retrieve(
158 $this->
refinery->kindlyTo()->dictOf(
168 if ($this->
http->wrapper()->post()->has(
'apps_string')) {
169 $app_string = $this->
http->wrapper()->post()->retrieve(
171 $this->
refinery->kindlyTo()->string()
173 return array_map(
'intval', explode(
';', $app_string));
183 if ($this->
http->wrapper()->post()->has(
'bookuser')) {
184 return $this->
http->wrapper()->post()->retrieve(
186 $this->
refinery->kindlyTo()->dictOf(
187 $this->
refinery->kindlyTo()->string()
199 if ($this->
http->wrapper()->query()->has(
'bookuser')) {
201 $this->
http->wrapper()->query()->retrieve(
203 $this->
refinery->kindlyTo()->string()
212 $this->
help->setScreenIdComponent(
"cal");
213 switch ($this->
ctrl->getNextClass($this)) {
214 case "ilpublicuserprofilegui":
215 #22168 don't send the current user if no GET user_id 219 $ret = $this->
ctrl->forwardCommand($profile);
220 $this->tpl->setContent($ret);
223 case 'ilrepositorysearchgui':
226 $rep_search->setCallback(
228 'assignUsersToAppointments',
231 $this->
ctrl->setParameter($this,
'assignM', 1);
232 $this->
ctrl->setReturn($this,
'appointments');
234 $rep_search->setCallback(
236 'assignUsersToAppointment',
239 $this->
ctrl->saveParameter($this,
'apps');
240 $this->
ctrl->setReturn($this,
'appointments');
242 $rep_search->setCallback(
244 'assignUsersToAppointment',
247 $this->
ctrl->saveParameter($this,
'apps');
248 $this->
ctrl->setReturn($this,
'appointments');
250 $this->
ctrl->forwardCommand($rep_search);
254 $this->tpl->setTitle($this->
lng->txt(
"cal_ch_form_header"));
258 $this->
ctrl->setParameter($this,
'user_id', $this->user_id);
260 $cmd = $this->
ctrl->getCmd(
'appointments');
274 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'),
true);
275 $this->
ctrl->redirect($this,
'appointments');
278 $this->
ctrl->setParameterByClass(ilConsultationHoursGUI::class,
'assignM', 1);
279 $this->
ctrl->redirectByClass(ilRepositorySearchGUI::class,
'');
292 foreach ($unassigned as $user_id) {
295 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'cal_ch_user_assignment_failed_info') .
296 '<br />' . implode(
'<br />', $users),
true);
305 $unassigned_users = [];
307 foreach ($ch_apps as $app) {
308 $unassigned_users = array_unique(array_merge(
315 $this->
ctrl->redirect($this,
'appointments');
332 $app = current($app);
335 $app = current($app);
337 if (!count($users)) {
338 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'),
true);
342 $assigned_users = array();
343 foreach ($users as $user) {
349 $assigned_users[] = $user;
352 $unassigned_users = array_diff($users, $assigned_users);
355 $this->
ctrl->redirect($this,
'appointments');
357 return $unassigned_users;
374 $this->
help->setScreenId(
"consultation_hours");
378 $this->tpl->setContent($btable->getHTML());
401 if ($bookusers === []) {
402 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
408 $confirm->setFormAction($this->
ctrl->getFormAction($this));
410 if ($a_send_notification) {
411 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'cal_ch_cancel_booking_info'));
412 $confirm->setHeaderText($this->
lng->txt(
'cal_ch_cancel_booking_sure'));
413 $confirm->setConfirm($this->
lng->txt(
'cal_ch_reject_booking'),
'rejectBooking');
415 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'cal_ch_delete_booking_info'));
416 $confirm->setHeaderText($this->
lng->txt(
'cal_ch_delete_booking_sure'));
417 $confirm->setConfirm($this->
lng->txt(
'cal_ch_delete_booking'),
'deleteBooking');
420 $confirm->setCancel($this->
lng->txt(
'cancel'),
'bookingList');
422 foreach ($bookusers as $bookuser) {
423 $ids = explode(
'_', $bookuser);
439 $this->tpl->setContent($confirm->getHTML());
450 $this->
form->getItemByPostVar(
'bo')->setValue((
string) $this->booking->getNumberOfBookings());
451 $this->
form->getItemByPostVar(
'ap')->setValue(
"1");
452 $this->
form->getItemByPostVar(
'du')->setMinutes(15);
453 $this->
form->getItemByPostVar(
'st')->setDate(
454 new ilDateTime(mktime(8, 0, 0, (
int) date(
'n', time()), (
int) date(
'd', time()), (
int) date(
'Y', time())),
IL_CAL_UNIX)
456 $this->tpl->setContent($this->
form->getHTML());
467 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
470 case self::MODE_CREATE:
471 $this->
form->setTitle($this->
lng->txt(
'cal_ch_add_sequence'));
472 $this->
form->addCommandButton(
'saveSequence', $this->
lng->txt(
'save'));
473 $this->
form->addCommandButton(
'appointments', $this->
lng->txt(
'cancel'));
476 case self::MODE_MULTI:
477 $this->
form->setTitle($this->
lng->txt(
'cal_ch_multi_edit_sequence'));
478 $this->
form->addCommandButton(
'updateMulti', $this->
lng->txt(
'save'));
479 $this->
form->addCommandButton(
'appointments', $this->
lng->txt(
'cancel'));
486 $ti->setMaxLength(128);
487 $ti->setRequired(
true);
488 $this->
form->addItem($ti);
490 if ($a_mode != self::MODE_MULTI) {
494 $dur->setRequired(
true);
495 $this->
form->addItem($dur);
500 $du->setShowHours(
true);
501 $this->
form->addItem($du);
505 $nu->
setInfo($this->
lng->txt(
'cal_ch_num_appointments_info'));
507 $nu->setMaxLength(2);
508 $nu->setRequired(
true);
510 $this->
form->addItem($nu);
521 $this->
form->addItem($rec);
527 $nu->setMaxLength(2);
529 $nu->setRequired(
true);
530 $this->
form->addItem($nu);
534 $dead->
setInfo($this->
lng->txt(
'cal_ch_deadline_info'));
535 $dead->setShowMinutes(
false);
536 $dead->setShowHours(
true);
537 $dead->setShowDays(
true);
538 $this->
form->addItem($dead);
543 $lo->setMaxLength(128);
544 $this->
form->addItem($lo);
550 $this->
form->addItem($de);
554 $tgt->setInfo($this->
lng->txt(
'cal_ch_target_object_info'));
556 $tgt->setMaxLength(128);
557 $this->
form->addItem($tgt);
568 if ($this->
form->checkInput()) {
569 $this->
form->setValuesByPost();
575 $deadline = $this->
form->getInput(
'dead');
576 $deadline = $deadline[
'dd'] * 24 + $deadline[
'hh'];
579 $tgt =
array_map(
'intval', explode(
',', $this->
form->getInput(
'tgt')));
587 $valid_types = array(
'crs',
'grp');
588 if (!$obj_id or !in_array($type, $valid_types)) {
589 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'cal_ch_unknown_repository_object'));
590 $this->tpl->setContent($this->
form->getHTML());
594 $obj_ids[] = $obj_id;
599 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'),
true);
600 $this->
ctrl->redirect($this,
'appointments');
602 $this->
form->setValuesByPost();
603 $this->tpl->setContent($this->
form->getHTML());
613 $start = clone $this->
form->getItemByPostVar(
'st')->getDate();
614 for ($i = 0; $i < $this->
form->getItemByPostVar(
'ap')->getValue(); $i++) {
615 $concurrent_dates->add(clone $start);
619 #$start = new ilDateTime(,IL_CAL_UNIX); 625 $this->
lng->txt(
'cal_ch_personal_ch'),
631 $num_appointments = 0;
632 foreach ($concurrent_dates as $dt) {
633 if ($num_appointments >= self::MAX_APPOINTMENTS_PER_SEQUENCE) {
643 $this->
form->getItemByPostVar(
'frequence')->getRecurrence()
653 foreach ($date_list as $app_start) {
654 $app_end = clone $app_start;
659 $entry->setContextId($booking->
getId());
660 $entry->setTitle($this->
form->getInput(
'ti'));
661 $entry->setSubtitle(
"#consultationhour#");
662 $entry->setDescription($this->
form->getInput(
'de'));
663 $entry->setLocation($this->
form->getInput(
'lo'));
664 $entry->setStart($app_start);
665 $entry->setEnd($app_end);
680 $this->
ctrl->setParameter($this,
'user_id',
'');
682 'consultation_hours_' . $this->user_id,
683 $this->
lng->txt(
'cal_ch_ch'),
684 $this->
ctrl->getLinkTarget($this,
'appointments')
688 $this->
ctrl->setParameter($this,
'user_id', $user_id);
690 'consultation_hours_' . $user_id,
691 $this->
lng->txt(
'cal_ch_ch') .
': ' . $login,
692 $this->
ctrl->getLinkTarget($this,
'appointments')
695 $this->
ctrl->setParameter($this,
'user_id',
'');
696 $this->
tabs->addTab(
'ch_settings', $this->
lng->txt(
'settings'), $this->
ctrl->getLinkTarget($this,
'settings'));
697 $this->
tabs->activateTab(
'consultation_hours_' . $this->
getUserId());
711 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
718 $hidden->setValue(implode(
';', $apps));
719 $this->
form->addItem($hidden);
722 $first = array_shift($apps);
725 $this->
form->getItemByPostVar(
'ti')->setValue($entry->getTitle());
726 $this->
form->getItemByPostVar(
'lo')->setValue($entry->getLocation());
727 $this->
form->getItemByPostVar(
'de')->setValue($entry->getDescription());
736 $ref_ids[] = end($refs);
738 $this->
form->getItemByPostVar(
'tgt')->setValue(implode(
',', $ref_ids));
741 $this->
form->getItemByPostVar(
'dead')->setDays((
int) floor($deadline / 24));
742 $this->
form->getItemByPostVar(
'dead')->setHours($deadline % 24);
743 $this->tpl->setContent($this->
form->getHTML());
748 $booking = new \ilBookingEntry();
752 $deadline = $this->
form->getInput(
'dead');
753 $deadline = $deadline[
'dd'] * 24 + $deadline[
'hh'];
756 $tgt =
array_map(
'intval', explode(
',', (
string) $this->
form->getInput(
'tgt')));
764 $valid_types = [
'crs',
'grp'];
765 if (!$obj_id or !in_array($type, $valid_types)) {
766 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'cal_ch_unknown_repository_object'));
769 $obj_ids[] = $obj_id;
781 foreach ($appointments as $appointment_id) {
782 $booking_appointment = new \ilCalendarEntry($appointment_id);
783 $booking_start = $booking_appointment->getStart();
784 $booking_end = $booking_appointment->getEnd();
797 foreach ($relevant_appointments as $relevant_appointment_id) {
798 $entry = new \ilCalendarEntry($relevant_appointment_id);
799 $entry->setContextId($booking->
getId());
800 $entry->setTitle($form->
getInput(
'ti'));
801 $entry->setLocation($form->
getInput(
'lo'));
802 $entry->setDescription($form->
getInput(
'de'));
814 if (!$this->
form->checkInput()) {
815 $this->
form->setValuesByPost();
816 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'err_check_input'));
821 $this->
form->setValuesByPost();
833 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'),
true);
834 $this->
ctrl->redirect($this,
'appointments');
835 $this->tpl->setContent($this->
form->getHTML());
843 $this->
tabs->clearTargets();
846 if ($this->
http->wrapper()->query()->has(
'user')) {
847 $user_id = $this->
http->wrapper()->query()->retrieve(
854 $this->tpl->setContent($this->
ctrl->getHTML($profile));
863 if ($this->
http->wrapper()->query()->has(
'ref_id')) {
864 $url = $this->
ctrl->getLinkTargetByClass(
'ilCalendarMonthGUI');
866 elseif ($this->
http->wrapper()->query()->has(
'panel')) {
867 $url = $this->
ctrl->getLinkTargetByClass(
'ilCalendarPresentationGUI');
870 $url = $this->
ctrl->getLinkTarget($this,
'appointments');
880 $this->
help->setScreenId(
"consultation_hours_settings");
881 $this->
tabs->activateTab(
'ch_settings');
884 $this->tpl->setContent($form->
getHTML());
896 $mng->setInfo($this->
lng->txt(
'cal_ch_manager_info'));
915 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'),
true);
916 $this->
ctrl->redirect($this,
'settings');
918 $this->
tabs->activateTab(
'ch_settings');
920 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'cal_ch_unknown_user'));
922 $field->setValue($mng);
923 $this->tpl->setContent($form->
getHTML());
935 $this->tpl->setContent(
944 $action = $this->
http->wrapper()->query()->retrieve(
945 BookingTableGUI::ACTION_TOKEN_NS,
948 $this->refinery->kindlyTo()->string(),
954 'edit' => $this->
edit(),
960 default => $this->
ctrl->redirect($this,
'appointments')
967 if ($appointment_ids === []) {
968 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
974 foreach ($appointment_ids as $appointment_id) {
979 if (!in_array($login, $bookusers)) {
980 $bookusers[] = $login;
984 $this->
ctrl->redirectToURL(
991 'rcp_to' => implode(
',', $bookusers)
1000 if ($appointment_ids === []) {
1001 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
1006 $appointment = end($appointment_ids);
1007 $this->
ctrl->setParameter($this,
'appointment_id', $appointment);
1011 $cancel = new \ILIAS\Calendar\ConsultationHours\BookingCancellationGUI(
1015 $with_notification ?
1016 \
ILIAS\Calendar\ConsultationHours\BookingCancellationGUI::TYPE_CANCEL :
1017 \
ILIAS\Calendar\ConsultationHours\BookingCancellationGUI::TYPE_DELETE
1019 $modal = $cancel->renderModal();
1020 $output = $this->ui_renderer->renderAsync($modal);
1021 $this->
http->saveResponse($this->
http->response()->withBody(
1022 Streams::ofString($output)
1024 $this->
http->sendResponse();
1025 $this->
http->close();
1035 $appointment_id = $this->
http->wrapper()->query()->retrieve(
1039 $this->refinery->kindlyTo()->int(),
1044 if (!$appointment_id) {
1045 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
1052 $cancel = new \ILIAS\Calendar\ConsultationHours\BookingCancellationGUI(
1056 $with_notification ?
1057 \
ILIAS\Calendar\ConsultationHours\BookingCancellationGUI::TYPE_CANCEL :
1058 \
ILIAS\Calendar\ConsultationHours\BookingCancellationGUI::TYPE_DELETE
1060 $data = $cancel->renderModal()->withRequest($this->
http->request())->getData();
1061 foreach ((array)
$data[
'bookings'] as $user => $checked) {
1070 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'cal_ch_canceled_bookings'),
true);
1071 $this->
ctrl->redirect($this,
'appointments');
1077 if (!count($appointment_ids)) {
1078 $output = $this->ui_factory->messageBox()->failure($this->
lng->txt(
'select_one'));
1081 foreach ($appointment_ids as $appointment) {
1083 $items[] = $this->ui_factory->modal()->interruptiveItem()->standard(
1084 (
string) $appointment,
1089 $output = $this->ui_factory->modal()->interruptive(
1090 $this->
lng->txt(
'confirm'),
1091 $this->
lng->txt(
'cal_ch_delete_app_booking_info'),
1092 $this->
ctrl->getFormAction($this,
'deleteAppointments')
1093 )->withAffectedItems($items);
1096 $rendered_output = $this->ui_renderer->renderAsync($output);
1097 $this->
http->saveResponse($this->
http->response()->withBody(
1098 Streams::ofString($rendered_output)
1100 $this->
http->sendResponse();
1101 $this->
http->close();
1106 $appointment_ids = $this->
http->wrapper()->post()->retrieve(
1107 'interruptive_items',
1110 $this->refinery->kindlyTo()->listOf($this->
refinery->kindlyTo()->int()),
1115 if (!count($appointment_ids)) {
1116 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
1121 foreach ($appointment_ids as $appointment_id) {
1135 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'cal_deleted_app'),
true);
1136 $this->
ctrl->redirect($this,
'appointments');
1141 $add_sequence_button = $this->ui_factory->button()->standard(
1142 $this->
lng->txt(
'cal_ch_add_sequence'),
1143 $this->
ctrl->getLinkTarget($this,
'createSequence')
1145 return $add_sequence_button;
1154 $this->
ctrl->setParameter($this,
'vm_period', self::VIEW_MODE_PERIOD_PAST);
1155 $actions[$this->
lng->txt(
'cal_ch_vm_period_' . self::VIEW_MODE_PERIOD_PAST)] = $this->
ctrl->getLinkTarget(
1159 $this->
ctrl->setParameter($this,
'vm_period', self::VIEW_MODE_PERIOD_UPCOMING);
1160 $actions[$this->
lng->txt(
'cal_ch_vm_period_' . self::VIEW_MODE_PERIOD_UPCOMING)] = $this->
ctrl->getLinkTarget(
1164 $this->
ctrl->setParameter($this,
'vm_period', self::VIEW_MODE_PERIOD_ALL);
1165 $actions[$this->
lng->txt(
'cal_ch_vm_period_' . self::VIEW_MODE_PERIOD_ALL)] = $this->
ctrl->getLinkTarget(
1169 $this->
ctrl->setParameter($this,
'vm_period',
'');
1171 $view_control_period = $this->ui_factory->viewControl()->mode(
1173 $this->
lng->txt(
'meta_aria_language_selection')
1174 )->withActive($this->
lng->txt(
'cal_ch_vm_period_' . $this->vm_period));
1179 $this->
ctrl->setParameter($this,
'vm_status', self::VIEW_MODE_STATUS_OPEN);
1180 $actions[$this->
lng->txt(
'cal_ch_vm_status_' . self::VIEW_MODE_STATUS_OPEN)] = $this->
ctrl->getLinkTarget(
1184 $this->
ctrl->setParameter($this,
'vm_status', self::VIEW_MODE_STATUS_BOOKED);
1185 $actions[$this->
lng->txt(
'cal_ch_vm_status_' . self::VIEW_MODE_STATUS_BOOKED)] = $this->
ctrl->getLinkTarget(
1189 $this->
ctrl->setParameter($this,
'vm_status', self::VIEW_MODE_STATUS_ALL);
1190 $actions[$this->
lng->txt(
'cal_ch_vm_status_' . self::VIEW_MODE_STATUS_ALL)] = $this->
ctrl->getLinkTarget(
1194 $this->
ctrl->setParameter($this,
'vm_status',
'');
1196 $view_control_status = $this->ui_factory->viewControl()->mode(
1198 $this->
lng->txt(
'meta_aria_language_selection')
1199 )->withActive($this->
lng->txt(
'cal_ch_vm_status_' . $this->vm_status));
1202 return $toolbar->getHTML();
1209 $user = $DIC->user();
1210 $vm_period = $this->
http->wrapper()->query()->retrieve(
1214 $this->refinery->kindlyTo()->string(),
1219 $vm_status = $this->
http->wrapper()->query()->retrieve(
1223 $this->refinery->kindlyTo()->string(),
1229 if ($vm_period !==
'') {
1230 $user->writePref(
'cal_ch_vm_period', $vm_period);
1232 if ($vm_status !==
'') {
1233 $user->writePref(
'cal_ch_vm_status', $vm_status);
1235 $this->vm_period = $user->getPref(
'cal_ch_vm_period') ? $user->getPref(
'cal_ch_vm_period') : self::VIEW_MODE_PERIOD_ALL;
1236 $this->vm_status = $user->getPref(
'cal_ch_vm_status') ? $user->getPref(
'cal_ch_vm_status') : self::VIEW_MODE_STATUS_ALL;
const VIEW_MODE_STATUS_ALL
initBookingUsersFromQuery()
showProfile()
show public profile of given user
static get(string $a_var)
bookingList()
Show list of bookings.
assignUsersToAppointment(array $users, int $a_app=0, bool $a_redirect=true)
Assign users to an appointment.
rewriteBookingIdsForAppointments(ilBookingEntry $booking, array $appointments, ilPropertyFormGUI $form)
const VIEW_MODE_STATUS_OPEN
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getCurrentBookings(int $a_entry_id)
get current bookings
handleBookingTableActions()
static _lookupFullname(int $a_user_id)
ilGlobalTemplateInterface $tpl
static getAppointmentIds(int $a_user_id, ?int $a_context_id=null, ?ilDateTime $a_start=null, ?int $a_type=null, bool $a_check_owner=true)
getCurrentNumberOfBookings(int $a_entry_id)
get current number of bookings
confirmDeleteAppointments()
RefineryFactory $refinery
sendMailToSelectedUsers()
assignUsersToAppointments(array $users)
Assign users to multiple appointments.
Interface Observer Contains several chained tasks and infos about them.
static _getAllReferences(int $id)
get all reference ids for object ID
static cancelBooking(int $a_usr_id, int $a_app_id, bool $a_send_notification=true)
Cancel a booking.
static initDomEvent(?ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI DomEvent used in Services/Calendar, Modules/Session, Modules/Test (Jan 2022) ...
static removeObsoleteEntries()
Remove unused booking entries.
bool $search_assignment_to_appointments
confirmDeleteBooking()
Show delete booking confirmation.
createNewBookingEntry(ilPropertyFormGUI $validate_form)
settings()
display settings gui
const VIEW_MODE_PERIOD_UPCOMING
updateSettings()
save settings
static getManager(bool $a_as_name=false, bool $a_full_name=false, ?int $a_user_id=null)
Get consultation hour manager for current user or specific user.
const VIEW_MODE_PERIOD_ALL
const MAX_APPOINTMENTS_PER_SEQUENCE
static lookupBookingsOfUser(array $a_app_ids, int $a_usr_id, ?ilDateTime $start=null)
Lookup bookings of user.
static _lookupObjId(int $ref_id)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
const VIEW_MODE_STATUS_BOOKED
initAppointmentIdsFromTableAction()
createAppointments(ilBookingEntry $booking)
Create calendar appointments.
searchUsersForAppointments()
static getInstanceByCalendarEntryId(int $a_id)
Get instance by calendar entry.
GUI class for public user profile presentation.
static http()
Fetches the global http state from ILIAS.
confirmRejectBooking(bool $a_send_notification=true)
Show delete booking confirmation.
setDeadlineHours(int $a_hours)
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path='ilpublicuserprofilegui')
Default behaviour is:
sendInfoAboutUnassignedUsers(array $unassigned)
Send info message about unassigned users.
static getManagedUsers()
Get all managed consultation hours users for current users.
static _deleteByAppointmentId(int $a_app_id)
Delete appointment assignment.
Calculates an ilDateList for a given calendar entry and recurrence rule.
static initDefaultCalendarByType(int $a_type_id, int $a_usr_id, string $a_title, bool $a_create=false)
Init the default calendar for given type and user.
__construct()
Constructor.
addAssignment(int $a_cal_cat_id)
cancelBooking(bool $with_notification=true)
initAppointmentIdsFromPostString()
initAppointmentIdsFromQuery()
confirmCancelBooking(bool $with_notification=true)
form( $class_path, string $cmd, string $submit_caption="")
This class represents a text area property in a property form.
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
setNumberOfBookings(int $a_num)
saveSequence()
Save new sequence.
initSearchAssignmentToAppointments($a_default=false)
const VIEW_MODE_PERIOD_PAST
initBookingUsersFromPost()
static bookAppointment(int $a_usr_id, int $a_app_id, string $comment='')
Book an appointment.
createSequence()
Create new sequence.
initFormSequence(int $a_mode)
static findCalendarAppointmentsForBooking(ilBookingEntry $booking, ilDateTime $start, ilDateTime $end)
static _lookupType(int $id, bool $reference=false)
setTargetObjIds(?array $a_obj_id)
Booking period Used for calculation of recurring events.
static set(string $a_var, $a_val)
Set a value.
updateMulti()
Update multiple sequence items.
static setManager(string $a_user_name)
Set consultation hour manager for current user.
calculateDateList(ilDateTime $a_start, ilDateTime $a_end, int $a_limit=-1)
calculate date list
initAppointmentIdsFromPost()
getProfileBackUrl()
Build context-sensitive profile back url.
initSettingsForm()
build settings form
static _lookupLogin(int $a_user_id)