19declare(strict_types=1);
82 $this->
http = $DIC->http();
86 if ($this->
http->wrapper()->query()->has(
'user_id')) {
87 $user_id = $this->
http->wrapper()->query()->retrieve(
100 $this->user_id =
$DIC->user()->getId();
103 $this->
ctrl = $DIC->ctrl();
104 $this->
lng = $DIC->language();
105 $this->tpl =
$DIC->ui()->mainTemplate();
106 $this->
help = $DIC->help();
107 $this->
tabs = $DIC->tabs();
108 $this->
toolbar = $DIC->toolbar();
109 $this->global_user =
$DIC->user();
110 $this->ui_factory =
$DIC->ui()->factory();
111 $this->ui_renderer =
$DIC->ui()->renderer();
116 $this->search_assignment_to_appointments = $a_default;
117 if ($this->
http->wrapper()->query()->has(
'assignM')) {
118 $this->search_assignment_to_appointments = $this->
http->wrapper()->query()->retrieve(
129 return $this->
http->wrapper()->query()->retrieve(
130 BookingTableGUI::ID_TOKEN_NS,
133 $this->refinery->custom()->transformation(function ($value) use ($current_user_id) {
134 if ($value !== [
'ALL_OBJECTS']) {
135 throw new Exception(
'Invalid token');
148 if ($this->
http->wrapper()->query()->has(
'apps')) {
149 return [$this->
http->wrapper()->query()->retrieve(
'apps', $this->
refinery->kindlyTo()->int())];
156 if ($this->
http->wrapper()->post()->has(
'apps')) {
157 return $this->
http->wrapper()->post()->retrieve(
159 $this->
refinery->kindlyTo()->dictOf(
160 $this->refinery->kindlyTo()->int()
169 if ($this->
http->wrapper()->post()->has(
'apps_string')) {
170 $app_string = $this->
http->wrapper()->post()->retrieve(
172 $this->
refinery->kindlyTo()->string()
174 return array_map(
'intval', explode(
';', $app_string));
184 if ($this->
http->wrapper()->post()->has(
'bookuser')) {
185 return $this->
http->wrapper()->post()->retrieve(
187 $this->
refinery->kindlyTo()->dictOf(
188 $this->refinery->kindlyTo()->string()
200 if ($this->
http->wrapper()->query()->has(
'bookuser')) {
202 $this->
http->wrapper()->query()->retrieve(
204 $this->
refinery->kindlyTo()->string()
213 $this->
help->setScreenIdComponent(
"cal");
214 switch ($this->
ctrl->getNextClass($this)) {
215 case strtolower(PublicProfileGUI::class):
216 #22168 don't send the current user if no GET user_id
220 $ret = $this->
ctrl->forwardCommand($profile);
221 $this->tpl->setContent($ret);
224 case 'ilrepositorysearchgui':
227 $rep_search->setCallback(
229 'assignUsersToAppointments',
232 $this->
ctrl->setParameter($this,
'assignM', 1);
233 $this->
ctrl->setReturn($this,
'appointments');
235 $rep_search->setCallback(
237 'assignUsersToAppointment',
240 $this->
ctrl->saveParameter($this,
'apps');
241 $this->
ctrl->setReturn($this,
'appointments');
243 $rep_search->setCallback(
245 'assignUsersToAppointment',
248 $this->
ctrl->saveParameter($this,
'apps');
249 $this->
ctrl->setReturn($this,
'appointments');
251 $this->
ctrl->forwardCommand($rep_search);
255 $this->tpl->setTitle($this->
lng->txt(
"cal_ch_form_header"));
258 if ($this->global_user->getId() != $this->user_id) {
259 $this->
ctrl->setParameter($this,
'user_id', $this->user_id);
261 $cmd = $this->
ctrl->getCmd(
'appointments');
275 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'),
true);
276 $this->
ctrl->redirect($this,
'appointments');
279 $this->
ctrl->setParameterByClass(ilConsultationHoursGUI::class,
'assignM', 1);
280 $this->
ctrl->redirectByClass(ilRepositorySearchGUI::class,
'');
296 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'cal_ch_user_assignment_failed_info') .
297 '<br />' . implode(
'<br />', $users),
true);
306 $unassigned_users = [];
308 foreach ($ch_apps as $app) {
309 $unassigned_users = array_unique(array_merge(
316 $this->
ctrl->redirect($this,
'appointments');
333 $app = current($app);
336 $app = current($app);
338 if (!count($users)) {
339 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'),
true);
343 $assigned_users = array();
344 foreach ($users as $user) {
350 $assigned_users[] = $user;
353 $unassigned_users = array_diff($users, $assigned_users);
356 $this->
ctrl->redirect($this,
'appointments');
358 return $unassigned_users;
375 $this->
help->setScreenId(
"consultation_hours");
379 $this->tpl->setContent($btable->getHTML());
402 if ($bookusers === []) {
403 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
409 $confirm->setFormAction($this->
ctrl->getFormAction($this));
411 if ($a_send_notification) {
412 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'cal_ch_cancel_booking_info'));
413 $confirm->setHeaderText($this->
lng->txt(
'cal_ch_cancel_booking_sure'));
414 $confirm->setConfirm($this->
lng->txt(
'cal_ch_reject_booking'),
'rejectBooking');
416 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'cal_ch_delete_booking_info'));
417 $confirm->setHeaderText($this->
lng->txt(
'cal_ch_delete_booking_sure'));
418 $confirm->setConfirm($this->
lng->txt(
'cal_ch_delete_booking'),
'deleteBooking');
421 $confirm->setCancel($this->
lng->txt(
'cancel'),
'bookingList');
423 foreach ($bookusers as $bookuser) {
424 $ids = explode(
'_', $bookuser);
440 $this->tpl->setContent($confirm->getHTML());
451 $this->
form->getItemByPostVar(
'bo')->setValue((
string) $this->booking->getNumberOfBookings());
452 $this->
form->getItemByPostVar(
'ap')->setValue(
"1");
453 $this->
form->getItemByPostVar(
'du')->setMinutes(15);
454 $this->
form->getItemByPostVar(
'st')->setDate(
455 new ilDateTime(mktime(8, 0, 0, (
int) date(
'n', time()), (
int) date(
'd', time()), (
int) date(
'Y', time())),
IL_CAL_UNIX)
457 $this->tpl->setContent($this->
form->getHTML());
468 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
472 $this->
form->setTitle($this->
lng->txt(
'cal_ch_add_sequence'));
473 $this->
form->addCommandButton(
'saveSequence', $this->
lng->txt(
'save'));
474 $this->
form->addCommandButton(
'appointments', $this->
lng->txt(
'cancel'));
478 $this->
form->setTitle($this->
lng->txt(
'cal_ch_multi_edit_sequence'));
479 $this->
form->addCommandButton(
'updateMulti', $this->
lng->txt(
'save'));
480 $this->
form->addCommandButton(
'appointments', $this->
lng->txt(
'cancel'));
487 $ti->setMaxLength(128);
488 $ti->setRequired(
true);
489 $this->
form->addItem($ti);
491 if ($a_mode != self::MODE_MULTI) {
494 $dur->setShowTime(
true);
495 $dur->setRequired(
true);
496 $this->
form->addItem($dur);
500 $du->setShowMinutes(
true);
501 $du->setShowHours(
true);
502 $this->
form->addItem($du);
506 $nu->setInfo($this->
lng->txt(
'cal_ch_num_appointments_info'));
508 $nu->setMaxLength(2);
509 $nu->setRequired(
true);
511 $this->
form->addItem($nu);
515 $rec->setEnabledSubForms(
522 $this->
form->addItem($rec);
528 $nu->setMaxLength(2);
530 $nu->setRequired(
true);
531 $this->
form->addItem($nu);
535 $dead->setInfo($this->
lng->txt(
'cal_ch_deadline_info'));
536 $dead->setShowMinutes(
false);
537 $dead->setShowHours(
true);
538 $dead->setShowDays(
true);
539 $this->
form->addItem($dead);
544 $lo->setMaxLength(128);
545 $this->
form->addItem($lo);
551 $this->
form->addItem($de);
555 $tgt->setInfo($this->
lng->txt(
'cal_ch_target_object_info'));
557 $tgt->setMaxLength(128);
558 $this->
form->addItem($tgt);
569 if ($this->
form->checkInput()) {
570 $this->
form->setValuesByPost();
576 $deadline = $this->
form->getInput(
'dead');
577 $deadline = $deadline[
'dd'] * 24 + $deadline[
'hh'];
580 $tgt = array_map(
'intval', explode(
',', $this->
form->getInput(
'tgt')));
588 $valid_types = array(
'crs',
'grp');
589 if (!$obj_id or !in_array($type, $valid_types)) {
590 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'cal_ch_unknown_repository_object'));
591 $this->tpl->setContent($this->
form->getHTML());
595 $obj_ids[] = $obj_id;
600 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'),
true);
601 $this->
ctrl->redirect($this,
'appointments');
603 $this->
form->setValuesByPost();
604 $this->tpl->setContent($this->
form->getHTML());
614 $start = clone $this->
form->getItemByPostVar(
'st')->getDate();
615 for ($i = 0; $i < $this->
form->getItemByPostVar(
'ap')->
getValue(); $i++) {
616 $concurrent_dates->add(clone $start);
620 #$start = new ilDateTime(,IL_CAL_UNIX);
626 $this->
lng->txt(
'cal_ch_personal_ch'),
632 $num_appointments = 0;
633 foreach ($concurrent_dates as $dt) {
634 if ($num_appointments >= self::MAX_APPOINTMENTS_PER_SEQUENCE) {
644 $this->
form->getItemByPostVar(
'frequence')->getRecurrence()
651 $date_list = $calc->calculateDateList($dt, $limit);
654 foreach ($date_list as $app_start) {
655 $app_end = clone $app_start;
661 $entry->setTitle($this->
form->getInput(
'ti'));
662 $entry->setSubtitle(
"#consultationhour#");
663 $entry->setDescription($this->
form->getInput(
'de'));
664 $entry->setLocation($this->
form->getInput(
'lo'));
665 $entry->setStart($app_start);
666 $entry->setEnd($app_end);
672 $cat_assign->addAssignment($def_cat->getCategoryID());
681 $this->
ctrl->setParameter($this,
'user_id',
'');
683 'consultation_hours_' . $this->user_id,
684 $this->
lng->txt(
'cal_ch_ch'),
685 $this->ctrl->getLinkTarget($this,
'appointments')
691 'consultation_hours_' . $user_id,
692 $this->
lng->txt(
'cal_ch_ch') .
': ' . $login,
693 $this->ctrl->getLinkTarget($this,
'appointments')
696 $this->
ctrl->setParameter($this,
'user_id',
'');
697 $this->
tabs->addTab(
'ch_settings', $this->
lng->txt(
'settings'), $this->ctrl->getLinkTarget($this,
'settings'));
698 $this->
tabs->activateTab(
'consultation_hours_' . $this->
getUserId());
712 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
719 $hidden->setValue(implode(
';', $apps));
720 $this->
form->addItem($hidden);
723 $first = array_shift($apps);
726 $this->
form->getItemByPostVar(
'ti')->setValue($entry->getTitle());
727 $this->
form->getItemByPostVar(
'lo')->setValue($entry->getLocation());
728 $this->
form->getItemByPostVar(
'de')->setValue($entry->getDescription());
737 $ref_ids[] = end($refs);
739 $this->
form->getItemByPostVar(
'tgt')->setValue(implode(
',', $ref_ids));
742 $this->
form->getItemByPostVar(
'dead')->setDays((
int) floor($deadline / 24));
743 $this->
form->getItemByPostVar(
'dead')->setHours($deadline % 24);
744 $this->tpl->setContent($this->
form->getHTML());
753 $deadline = $this->
form->getInput(
'dead');
754 $deadline = $deadline[
'dd'] * 24 + $deadline[
'hh'];
757 $tgt = array_map(
'intval', explode(
',', (
string) $this->
form->getInput(
'tgt')));
765 $valid_types = [
'crs',
'grp'];
766 if (!$obj_id or !in_array($type, $valid_types)) {
767 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'cal_ch_unknown_repository_object'));
770 $obj_ids[] = $obj_id;
782 foreach ($appointments as $appointment_id) {
783 $booking_appointment = new \ilCalendarEntry($appointment_id);
784 $booking_start = $booking_appointment->getStart();
785 $booking_end = $booking_appointment->getEnd();
798 foreach ($relevant_appointments as $relevant_appointment_id) {
799 $entry = new \ilCalendarEntry($relevant_appointment_id);
814 $this->initFormSequence(self::MODE_MULTI);
815 if (!$this->
form->checkInput()) {
816 $this->
form->setValuesByPost();
817 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'err_check_input'));
822 $this->
form->setValuesByPost();
823 $apps = $this->initAppointmentIdsFromPostString();
826 $booking = $this->createNewBookingEntry($this->
form);
831 $this->rewriteBookingIdsForAppointments($booking, $apps, $this->
form);
834 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'),
true);
835 $this->
ctrl->redirect($this,
'appointments');
836 $this->tpl->setContent($this->
form->getHTML());
844 $this->
tabs->clearTargets();
847 if ($this->
http->wrapper()->query()->has(
'user')) {
854 $profile->setBackUrl($this->getProfileBackUrl());
855 $this->tpl->setContent($this->
ctrl->getHTML($profile));
864 if ($this->
http->wrapper()->query()->has(
'ref_id')) {
865 $url = $this->
ctrl->getLinkTargetByClass(
'ilCalendarMonthGUI');
867 elseif ($this->
http->wrapper()->query()->has(
'panel')) {
868 $url = $this->
ctrl->getLinkTargetByClass(
'ilCalendarPresentationGUI');
871 $url = $this->
ctrl->getLinkTarget($this,
'appointments');
881 $this->
help->setScreenId(
"consultation_hours_settings");
882 $this->
tabs->activateTab(
'ch_settings');
884 $form = $this->initSettingsForm();
885 $this->tpl->setContent($form->getHTML());
894 $form->setFormAction($this->
ctrl->getFormAction($this));
897 $mng->setInfo($this->
lng->txt(
'cal_ch_manager_info'));
898 $form->addItem($mng);
902 $form->setTitle($this->
lng->txt(
'settings'));
903 $form->addCommandButton(
'updateSettings', $this->
lng->txt(
'save'));
912 $form = $this->initSettingsForm();
913 if ($form->checkInput()) {
914 $mng = $form->getInput(
'mng');
916 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'),
true);
917 $this->
ctrl->redirect($this,
'settings');
919 $this->
tabs->activateTab(
'ch_settings');
921 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'cal_ch_unknown_user'));
922 $field = $form->getItemByPostVar(
'mng');
923 $field->setValue($mng);
924 $this->tpl->setContent($form->getHTML());
932 $this->initViewMode();
936 $this->tpl->setContent(
937 $this->renderViewControl() .
945 $action = $this->
http->wrapper()->query()->retrieve(
946 BookingTableGUI::ACTION_TOKEN_NS,
949 $this->refinery->kindlyTo()->string(),
950 $this->refinery->always(
'')
955 'edit' => $this->edit(),
956 'searchUsersForAppointments' => $this->searchUsersForAppointments(),
957 'confirmDeleteAppointments' => $this->confirmDeleteAppointments(),
958 'confirmCancelBooking' => $this->confirmCancelBooking(
true),
959 'confirmDeleteBooking' => $this->confirmCancelBooking(
false),
960 'sendMail' => $this->sendMailToSelectedUsers(),
961 default => $this->
ctrl->redirect($this,
'appointments')
967 $appointment_ids = $this->initAppointmentIdsFromTableAction();
968 if ($appointment_ids === []) {
969 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
970 $this->appointments();
975 foreach ($appointment_ids as $appointment_id) {
978 foreach ($booking->getCurrentBookings($entry->getEntryId()) as $bookuser) {
980 if (!in_array($login, $bookusers)) {
981 $bookusers[] = $login;
985 $this->
ctrl->redirectToURL(
992 'rcp_to' => implode(
',', $bookusers)
1000 $appointment_ids = $this->initAppointmentIdsFromTableAction();
1001 if ($appointment_ids === []) {
1002 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
1003 $this->appointments();
1007 $appointment = end($appointment_ids);
1008 $this->
ctrl->setParameter($this,
'appointment_id', $appointment);
1012 $cancel = new \ILIAS\Calendar\ConsultationHours\BookingCancellationGUI(
1016 $with_notification ?
1017 \
ILIAS\Calendar\ConsultationHours\BookingCancellationGUI::TYPE_CANCEL :
1018 \
ILIAS\Calendar\ConsultationHours\BookingCancellationGUI::TYPE_DELETE
1020 $modal = $cancel->renderModal();
1021 $output = $this->ui_renderer->renderAsync($modal);
1022 $this->
http->saveResponse($this->
http->response()->withBody(
1023 Streams::ofString($output)
1025 $this->
http->sendResponse();
1026 $this->
http->close();
1031 $this->cancelBooking(
false);
1036 $appointment_id = $this->
http->wrapper()->query()->retrieve(
1040 $this->refinery->kindlyTo()->int(),
1041 $this->refinery->always(0)
1045 if (!$appointment_id) {
1046 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
1047 $this->appointments();
1053 $cancel = new \ILIAS\Calendar\ConsultationHours\BookingCancellationGUI(
1057 $with_notification ?
1058 \
ILIAS\Calendar\ConsultationHours\BookingCancellationGUI::TYPE_CANCEL :
1059 \
ILIAS\Calendar\ConsultationHours\BookingCancellationGUI::TYPE_DELETE
1061 $data = $cancel->renderModal()->withRequest($this->
http->request())->getData();
1062 foreach ((array)
$data[
'bookings'] as $user => $checked) {
1071 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'cal_ch_canceled_bookings'),
true);
1072 $this->
ctrl->redirect($this,
'appointments');
1077 $appointment_ids = $this->initAppointmentIdsFromTableAction();
1078 if (!count($appointment_ids)) {
1079 $output = $this->ui_factory->messageBox()->failure($this->
lng->txt(
'select_one'));
1082 foreach ($appointment_ids as $appointment) {
1084 $items[] = $this->ui_factory->modal()->interruptiveItem()->standard(
1085 (
string) $appointment,
1090 $output = $this->ui_factory->modal()->interruptive(
1091 $this->
lng->txt(
'confirm'),
1092 $this->lng->txt(
'cal_ch_delete_app_booking_info'),
1093 $this->ctrl->getFormAction($this,
'deleteAppointments')
1094 )->withAffectedItems($items);
1097 $rendered_output = $this->ui_renderer->renderAsync($output);
1098 $this->
http->saveResponse($this->
http->response()->withBody(
1099 Streams::ofString($rendered_output)
1101 $this->
http->sendResponse();
1102 $this->
http->close();
1107 $appointment_ids = $this->
http->wrapper()->post()->retrieve(
1108 'interruptive_items',
1111 $this->refinery->kindlyTo()->listOf($this->refinery->kindlyTo()->int()),
1112 $this->refinery->always([])
1116 if (!count($appointment_ids)) {
1117 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
1118 $this->appointments();
1122 foreach ($appointment_ids as $appointment_id) {
1126 foreach ($booking->getCurrentBookings($appointment_id) as
$user_id) {
1136 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'cal_deleted_app'),
true);
1137 $this->
ctrl->redirect($this,
'appointments');
1142 $add_sequence_button = $this->ui_factory->button()->standard(
1143 $this->
lng->txt(
'cal_ch_add_sequence'),
1144 $this->ctrl->getLinkTarget($this,
'createSequence')
1146 return $add_sequence_button;
1152 $toolbar->addComponent($this->initSequenceCreation());
1153 $toolbar->addSeparator();
1155 $this->
ctrl->setParameter($this,
'vm_period', self::VIEW_MODE_PERIOD_PAST);
1156 $actions[$this->
lng->txt(
'cal_ch_vm_period_' . self::VIEW_MODE_PERIOD_PAST)] = $this->
ctrl->getLinkTarget(
1160 $this->
ctrl->setParameter($this,
'vm_period', self::VIEW_MODE_PERIOD_UPCOMING);
1161 $actions[$this->
lng->txt(
'cal_ch_vm_period_' . self::VIEW_MODE_PERIOD_UPCOMING)] = $this->
ctrl->getLinkTarget(
1165 $this->
ctrl->setParameter($this,
'vm_period', self::VIEW_MODE_PERIOD_ALL);
1166 $actions[$this->
lng->txt(
'cal_ch_vm_period_' . self::VIEW_MODE_PERIOD_ALL)] = $this->
ctrl->getLinkTarget(
1170 $this->
ctrl->setParameter($this,
'vm_period',
'');
1172 $view_control_period = $this->ui_factory->viewControl()->mode(
1174 $this->
lng->txt(
'meta_aria_language_selection')
1175 )->withActive($this->
lng->txt(
'cal_ch_vm_period_' . $this->vm_period));
1177 $toolbar->addComponent($view_control_period);
1180 $this->
ctrl->setParameter($this,
'vm_status', self::VIEW_MODE_STATUS_OPEN);
1181 $actions[$this->
lng->txt(
'cal_ch_vm_status_' . self::VIEW_MODE_STATUS_OPEN)] = $this->
ctrl->getLinkTarget(
1185 $this->
ctrl->setParameter($this,
'vm_status', self::VIEW_MODE_STATUS_BOOKED);
1186 $actions[$this->
lng->txt(
'cal_ch_vm_status_' . self::VIEW_MODE_STATUS_BOOKED)] = $this->
ctrl->getLinkTarget(
1190 $this->
ctrl->setParameter($this,
'vm_status', self::VIEW_MODE_STATUS_ALL);
1191 $actions[$this->
lng->txt(
'cal_ch_vm_status_' . self::VIEW_MODE_STATUS_ALL)] = $this->
ctrl->getLinkTarget(
1195 $this->
ctrl->setParameter($this,
'vm_status',
'');
1197 $view_control_status = $this->ui_factory->viewControl()->mode(
1199 $this->
lng->txt(
'meta_aria_language_selection')
1200 )->withActive($this->
lng->txt(
'cal_ch_vm_status_' . $this->vm_status));
1202 $toolbar->addComponent($view_control_status);
1203 return $toolbar->getHTML();
1210 $user =
$DIC->user();
1211 $vm_period = $this->
http->wrapper()->query()->retrieve(
1215 $this->refinery->kindlyTo()->string(),
1216 $this->refinery->always(
'')
1220 $vm_status = $this->
http->wrapper()->query()->retrieve(
1224 $this->refinery->kindlyTo()->string(),
1225 $this->refinery->always(
'')
1230 if ($vm_period !==
'') {
1231 $user->writePref(
'cal_ch_vm_period', $vm_period);
1233 if ($vm_status !==
'') {
1234 $user->writePref(
'cal_ch_vm_status', $vm_status);
1236 $this->vm_period = $user->getPref(
'cal_ch_vm_period') ? $user->getPref(
'cal_ch_vm_period') : self::VIEW_MODE_PERIOD_ALL;
1237 $this->vm_status = $user->getPref(
'cal_ch_vm_status') ? $user->getPref(
'cal_ch_vm_status') : self::VIEW_MODE_STATUS_ALL;
Builds a Color from either hex- or rgb values.
Stream factory which enables the user to create streams without the knowledge of the concrete class.
GUI class for public user profile presentation.
static getInstanceByCalendarEntryId(int $a_id)
Get instance by calendar entry.
getCurrentNumberOfBookings(int $a_entry_id)
get current number of bookings
static lookupBookingsOfUser(array $a_app_ids, int $a_usr_id, ?ilDateTime $start=null)
Lookup bookings of user.
static removeObsoleteEntries()
Remove unused booking entries.
setDeadlineHours(int $a_hours)
setTargetObjIds(?array $a_obj_id)
setNumberOfBookings(int $a_num)
Booking period Used for calculation of recurring events.
static _deleteByAppointmentId(int $a_app_id)
Delete appointment assignment.
Model for a calendar entry.
Calculates an ilDateList for a given calendar entry and recurrence rule.
const string FREQ_MONTHLY
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.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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.
static getManagedUsers()
Get all managed consultation hours users for current users.
static setManager(string $a_user_name)
Set consultation hour manager for current user.
static getAppointmentIds(int $a_user_id, ?int $a_context_id=null, ?ilDateTime $a_start=null, ?int $a_type=null, bool $a_check_owner=true)
static cancelBooking(int $a_usr_id, int $a_app_id, bool $a_send_notification=true)
Cancel a booking.
static findCalendarAppointmentsForBooking(ilBookingEntry $booking, ilDateTime $start, ilDateTime $end)
static bookAppointment(int $a_usr_id, int $a_app_id, string $comment='')
Book an appointment.
Consultation hours editor.
const MAX_APPOINTMENTS_PER_SEQUENCE
initAppointmentIdsFromQuery()
const VIEW_MODE_STATUS_ALL
const VIEW_MODE_PERIOD_UPCOMING
confirmRejectBooking(bool $a_send_notification=true)
Show delete booking confirmation.
rewriteBookingIdsForAppointments(ilBookingEntry $booking, array $appointments, ilPropertyFormGUI $form)
showProfile()
show public profile of given user
initSearchAssignmentToAppointments($a_default=false)
initAppointmentIdsFromTableAction()
initAppointmentIdsFromPostString()
confirmCancelBooking(bool $with_notification=true)
initBookingUsersFromPost()
cancelBooking(bool $with_notification=true)
bool $search_assignment_to_appointments
sendMailToSelectedUsers()
createSequence()
Create new sequence.
updateSettings()
save settings
initSettingsForm()
build settings form
searchUsersForAppointments()
const VIEW_MODE_STATUS_BOOKED
initFormSequence(int $a_mode)
assignUsersToAppointments(array $users)
Assign users to multiple appointments.
initAppointmentIdsFromPost()
bookingList()
Show list of bookings.
handleBookingTableActions()
updateMulti()
Update multiple sequence items.
settings()
display settings gui
confirmDeleteBooking()
Show delete booking confirmation.
sendInfoAboutUnassignedUsers(array $unassigned)
Send info message about unassigned users.
assignUsersToAppointment(array $users, int $a_app=0, bool $a_redirect=true)
Assign users to an appointment.
initBookingUsersFromQuery()
confirmDeleteAppointments()
ilGlobalTemplateInterface $tpl
const VIEW_MODE_STATUS_OPEN
saveSequence()
Save new sequence.
RefineryFactory $refinery
createNewBookingEntry(ilPropertyFormGUI $validate_form)
__construct()
Constructor.
const VIEW_MODE_PERIOD_ALL
createAppointments(ilBookingEntry $booking)
Create calendar appointments.
const VIEW_MODE_PERIOD_PAST
getProfileBackUrl()
Build context-sensitive profile back url.
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
@classDescription Date and time handling
static _lookupFullname(int $a_user_id)
static _lookupLogin(int $a_user_id)
static _lookupType(int $id, bool $reference=false)
static _getAllReferences(int $id)
get all reference ids for object ID
static _lookupObjId(int $ref_id)
static get(string $a_var)
static set(string $a_var, $a_val)
Set a value.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a text area property in a property form.
This class represents a text property in a property form.
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=null)
Default behaviour is:
static initDomEvent(?ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI DomEvent used in Services/Calendar, Modules/Session, Modules/Test (Jan 2022)
Interface GlobalHttpState.
An entity that renders components to a string output.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static http()
Fetches the global http state from ILIAS.
form( $class_path, string $cmd, string $submit_caption="")
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.