3declare(strict_types=1);
61 $this->
http = $DIC->http();
65 if ($this->
http->wrapper()->query()->has(
'user_id')) {
66 $user_id = $this->
http->wrapper()->query()->retrieve(
79 $this->user_id =
$DIC->user()->getId();
82 $this->
ctrl = $DIC->ctrl();
83 $this->
lng = $DIC->language();
84 $this->tpl =
$DIC->ui()->mainTemplate();
85 $this->
help = $DIC->help();
86 $this->
tabs = $DIC->tabs();
87 $this->
toolbar = $DIC->toolbar();
88 $this->global_user =
$DIC->user();
93 $this->search_assignment_to_appointments = $a_default;
94 if ($this->
http->wrapper()->query()->has(
'assignM')) {
95 $this->search_assignment_to_appointments = $this->
http->wrapper()->query()->retrieve(
105 if ($this->
http->wrapper()->query()->has(
'grp_id')) {
106 return $this->
http->wrapper()->query()->retrieve(
116 if ($this->
http->wrapper()->query()->has(
'apps')) {
117 return [$this->
http->wrapper()->query()->retrieve(
'apps', $this->
refinery->kindlyTo()->int())];
124 if ($this->
http->wrapper()->post()->has(
'apps')) {
125 return $this->
http->wrapper()->post()->retrieve(
127 $this->
refinery->kindlyTo()->dictOf(
128 $this->refinery->kindlyTo()->int()
137 if ($this->
http->wrapper()->post()->has(
'apps_string')) {
138 $app_string = $this->
http->wrapper()->post()->retrieve(
140 $this->
refinery->kindlyTo()->string()
142 return array_map(
'intval', explode(
';', $app_string));
149 if ($this->
http->wrapper()->post()->has(
'groups')) {
150 return $this->
http->wrapper()->post()->retrieve(
152 $this->
refinery->kindlyTo()->listOf(
153 $this->refinery->kindlyTo()->int()
165 if ($this->
http->wrapper()->post()->has(
'bookuser')) {
166 return $this->
http->wrapper()->post()->retrieve(
168 $this->
refinery->kindlyTo()->dictOf(
169 $this->refinery->kindlyTo()->string()
181 if ($this->
http->wrapper()->query()->has(
'bookuser')) {
183 $this->
http->wrapper()->query()->retrieve(
185 $this->
refinery->kindlyTo()->string()
194 $this->
help->setScreenIdComponent(
"cal");
195 switch ($this->
ctrl->getNextClass($this)) {
196 case "ilpublicuserprofilegui":
197 #22168 don't send the current user if no GET user_id
201 $ret = $this->
ctrl->forwardCommand($profile);
202 $this->tpl->setContent($ret);
205 case 'ilrepositorysearchgui':
208 $rep_search->setCallback(
210 'assignUsersToAppointments',
213 $this->
ctrl->setParameter($this,
'assignM', 1);
214 $this->
ctrl->setReturn($this,
'appointmentList');
215 $this->
tabs->activateSubTab(
'cal_ch_app_list');
217 $rep_search->setCallback(
219 'assignUsersToGroup',
222 $this->
ctrl->saveParameter($this,
'grp_id');
223 $this->
ctrl->setReturn($this,
'groupList');
224 $this->
tabs->activateSubTab(
'cal_ch_app_grp');
226 $rep_search->setCallback(
228 'assignUsersToAppointment',
231 $this->
ctrl->saveParameter($this,
'apps');
232 $this->
ctrl->setReturn($this,
'appointmentList');
233 $this->
tabs->activateSubTab(
'cal_ch_app_list');
235 $rep_search->setCallback(
237 'assignUsersToAppointment',
240 $this->
ctrl->saveParameter($this,
'apps');
241 $this->
ctrl->setReturn($this,
'appointmentList');
242 $this->
tabs->activateSubTab(
'cal_ch_app_list');
244 $this->
ctrl->forwardCommand($rep_search);
248 $this->tpl->setTitle($this->
lng->txt(
"cal_ch_form_header"));
251 if ($this->global_user->getId() != $this->user_id) {
252 $this->
ctrl->setParameter($this,
'user_id', $this->user_id);
254 $cmd = $this->
ctrl->getCmd(
'appointmentList');
274 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'),
true);
275 $this->
ctrl->redirect($this,
'appointmentList');
278 $this->
ctrl->setParameterByClass(ilConsultationHoursGUI::class,
'assignM', 1);
279 $this->
ctrl->redirectByClass(ilRepositorySearchGUI::class,
'');
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,
'appointmentList');
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,
'appointmentList');
357 return $unassigned_users;
379 $assigned_users = array();
380 foreach ($apps as
$app) {
382 foreach ($users as $user) {
388 $assigned_users[] = $user;
394 $this->
ctrl->redirect($this,
'bookingList');
402 $this->
help->setScreenId(
"consultation_hours");
404 $this->
toolbar->setFormAction($this->
ctrl->getFormAction($this));
405 $this->
toolbar->addButton($this->
lng->txt(
'cal_ch_add_grp'), $this->ctrl->getLinkTarget($this,
'addGroup'));
408 $this->
tabs->activateSubTab(
'cal_ch_app_grp');
413 $this->tpl->setContent($gtbl->getHTML());
422 $this->
tabs->activateSubTab(
'cal_ch_app_grp');
439 $group->setMaxAssignments((
int)
$form->
getInput(
'multiple'));
443 $this->tpl->setOnScreenMessage(
'success',
$GLOBALS[
'DIC'][
'lng']->txt(
'settings_saved'),
true);
444 $GLOBALS[
'DIC'][
'ilCtrl']->redirect($this,
'groupList');
447 $this->tpl->setOnScreenMessage(
'failure',
$GLOBALS[
'DIC'][
'lng']->txt(
'err_check_input'),
true);
458 $this->
tabs->activateSubTab(
'cal_ch_app_grp');
472 $this->
ctrl->setParameter($this,
'grp_id', $group_id);
478 $group->setMaxAssignments((
int)
$form->
getInput(
'multiple'));
482 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'),
true);
483 $this->
ctrl->redirect($this,
'groupList');
486 $this->tpl->setOnScreenMessage(
'failure',
$GLOBALS[
'DIC'][
'lng']->txt(
'err_check_input'),
true);
496 $this->
ctrl->setParameter($this,
'grp_id', $group_id);
497 $groups = array($group_id);
500 $this->
tabs->activateSubTab(
'cal_ch_app_grp');
502 $confirm->setFormAction($this->
ctrl->getFormAction($this));
503 $confirm->setHeaderText(
$GLOBALS[
'DIC'][
'lng']->txt(
'cal_ch_grp_delete_sure'));
504 $confirm->setConfirm(
$GLOBALS[
'DIC'][
'lng']->txt(
'delete'),
'deleteGroup');
505 $confirm->setCancel(
$GLOBALS[
'DIC'][
'lng']->txt(
'cancel'),
'groupList');
507 foreach ($groups as $grp_id) {
510 $confirm->addItem(
'groups[]', (
string) $grp_id, $group->getTitle());
512 $this->tpl->setContent($confirm->getHTML());
524 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'cal_ch_grp_deleted'));
525 $this->
ctrl->redirect($this,
'groupList');
546 $title->setMaxLength(128);
548 $title->setRequired(
true);
549 $title->setValue($group->getTitle());
553 $multiple->setRequired(
true);
554 $multiple->setMinValue(1);
555 $multiple->setSize(1);
556 $multiple->setMaxLength(2);
557 $multiple->setInfo(
$GLOBALS[
'DIC'][
'lng']->txt(
'cal_ch_grp_multiple_info'));
558 $multiple->setValue((
string) $group->getMaxAssignments());
569 $this->
help->setScreenId(
"consultation_hours");
572 $this->
tabs->activateSubTab(
'cal_ch_app_bookings');
576 $this->tpl->setContent($btable->getHTML());
599 if ($bookusers === []) {
600 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
605 $this->
tabs->activateSubTab(
'cal_ch_app_bookings');
608 $confirm->setFormAction($this->
ctrl->getFormAction($this));
610 if ($a_send_notification) {
611 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'cal_ch_cancel_booking_info'));
612 $confirm->setHeaderText($this->
lng->txt(
'cal_ch_cancel_booking_sure'));
613 $confirm->setConfirm($this->
lng->txt(
'cal_ch_reject_booking'),
'rejectBooking');
615 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'cal_ch_delete_booking_info'));
616 $confirm->setHeaderText($this->
lng->txt(
'cal_ch_delete_booking_sure'));
617 $confirm->setConfirm($this->
lng->txt(
'cal_ch_delete_booking'),
'deleteBooking');
620 $confirm->setCancel($this->
lng->txt(
'cancel'),
'bookingList');
622 foreach ($bookusers as $bookuser) {
623 $ids = explode(
'_', $bookuser);
639 $this->tpl->setContent($confirm->getHTML());
653 $ids = explode(
'_', $bookuser);
656 if ($a_send_notification) {
657 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'cal_ch_canceled_bookings'),
true);
659 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'cal_ch_deleted_bookings'),
true);
661 $this->
ctrl->redirect($this,
'bookingList');
670 $this->
help->setScreenId(
"consultation_hours");
672 $this->
toolbar->setFormAction($this->
ctrl->getFormAction($this));
674 $this->
lng->txt(
'cal_ch_add_sequence'),
675 $this->ctrl->getLinkTarget($this,
'createSequence')
679 $this->
tabs->activateSubTab(
'cal_ch_app_list');
683 $this->tpl->setContent($tbl->getHTML());
694 $this->
form->getItemByPostVar(
'bo')->setValue((
string) $this->booking->getNumberOfBookings());
695 $this->
form->getItemByPostVar(
'ap')->setValue(
"1");
696 $this->
form->getItemByPostVar(
'du')->setMinutes(15);
697 $this->
form->getItemByPostVar(
'st')->setDate(
698 new ilDateTime(mktime(8, 0, 0, (
int) date(
'n', time()), (
int) date(
'd', time()), (
int) date(
'Y', time())),
IL_CAL_UNIX)
700 $this->tpl->setContent($this->
form->getHTML());
711 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
715 $this->
form->setTitle($this->
lng->txt(
'cal_ch_add_sequence'));
716 $this->
form->addCommandButton(
'saveSequence', $this->
lng->txt(
'save'));
717 $this->
form->addCommandButton(
'appointmentList', $this->
lng->txt(
'cancel'));
721 $this->
form->setTitle($this->
lng->txt(
'cal_ch_multi_edit_sequence'));
722 $this->
form->addCommandButton(
'updateMulti', $this->
lng->txt(
'save'));
723 $this->
form->addCommandButton(
'appointmentList', $this->
lng->txt(
'cancel'));
730 $group->setOptions($options);
731 $group->setRequired(
false);
732 $this->
form->addItem($group);
738 $ti->setMaxLength(128);
739 $ti->setRequired(
true);
740 $this->
form->addItem($ti);
742 if ($a_mode != self::MODE_MULTI) {
745 $dur->setShowTime(
true);
746 $dur->setRequired(
true);
747 $this->
form->addItem($dur);
751 $du->setShowMinutes(
true);
752 $du->setShowHours(
true);
753 $this->
form->addItem($du);
757 $nu->setInfo($this->
lng->txt(
'cal_ch_num_appointments_info'));
759 $nu->setMaxLength(2);
760 $nu->setRequired(
true);
762 $this->
form->addItem($nu);
766 $rec->setEnabledSubForms(
773 $this->
form->addItem($rec);
779 $nu->setMaxLength(2);
781 $nu->setRequired(
true);
782 $this->
form->addItem($nu);
786 $dead->setInfo($this->
lng->txt(
'cal_ch_deadline_info'));
787 $dead->setShowMinutes(
false);
788 $dead->setShowHours(
true);
789 $dead->setShowDays(
true);
790 $this->
form->addItem($dead);
795 $lo->setMaxLength(128);
796 $this->
form->addItem($lo);
802 $this->
form->addItem($de);
806 $tgt->setInfo($this->
lng->txt(
'cal_ch_target_object_info'));
808 $tgt->setMaxLength(128);
809 $this->
form->addItem($tgt);
820 if ($this->
form->checkInput()) {
821 $this->
form->setValuesByPost();
827 $deadline = $this->
form->getInput(
'dead');
828 $deadline = $deadline[
'dd'] * 24 + $deadline[
'hh'];
836 $tgt = array_map(
'intval', explode(
',', $this->
form->getInput(
'tgt')));
844 $valid_types = array(
'crs',
'grp');
845 if (!$obj_id or !in_array(
$type, $valid_types)) {
846 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'cal_ch_unknown_repository_object'));
847 $this->tpl->setContent($this->
form->getHTML());
851 $obj_ids[] = $obj_id;
856 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'),
true);
857 $this->
ctrl->redirect($this,
'appointmentList');
859 $this->
form->setValuesByPost();
860 $this->tpl->setContent($this->
form->getHTML());
870 $start = clone $this->
form->getItemByPostVar(
'st')->getDate();
872 $concurrent_dates->add(clone $start);
876 #$start = new ilDateTime(,IL_CAL_UNIX);
882 $this->
lng->txt(
'cal_ch_personal_ch'),
888 $num_appointments = 0;
889 foreach ($concurrent_dates as $dt) {
890 if ($num_appointments >= self::MAX_APPOINTMENTS_PER_SEQUENCE) {
900 $this->
form->getItemByPostVar(
'frequence')->getRecurrence()
907 $date_list = $calc->calculateDateList($dt, $limit);
910 foreach ($date_list as $app_start) {
911 $app_end = clone $app_start;
917 $entry->setTitle($this->
form->getInput(
'ti'));
918 $entry->setSubtitle(
"#consultationhour#");
919 $entry->setDescription($this->
form->getInput(
'de'));
920 $entry->setLocation($this->
form->getInput(
'lo'));
921 $entry->setStart($app_start);
922 $entry->setEnd($app_end);
928 $cat_assign->addAssignment($def_cat->getCategoryID());
937 $this->
ctrl->setParameter($this,
'user_id',
'');
939 'consultation_hours_' . $this->user_id,
940 $this->
lng->txt(
'cal_ch_ch'),
941 $this->ctrl->getLinkTarget($this,
'appointmentList')
947 'consultation_hours_' . $user_id,
948 $this->
lng->txt(
'cal_ch_ch') .
': ' . $login,
949 $this->ctrl->getLinkTarget($this,
'appointmentList')
952 $this->
ctrl->setParameter($this,
'user_id',
'');
953 $this->
tabs->addTab(
'ch_settings', $this->
lng->txt(
'settings'), $this->ctrl->getLinkTarget($this,
'settings'));
954 $this->
tabs->activateTab(
'consultation_hours_' . $this->
getUserId());
959 $this->
ctrl->setParameter($this,
'user_id', $this->
getUserId());
960 $this->
tabs->addSubTab(
962 $this->
lng->txt(
'cal_ch_app_list'),
963 $this->ctrl->getLinkTarget($this,
'appointmentList')
965 $this->
tabs->addSubTab(
967 $this->
lng->txt(
'cal_ch_app_grp'),
968 $this->ctrl->getLinkTarget($this,
'groupList')
970 $this->
tabs->addSubTab(
971 'cal_ch_app_bookings',
972 $this->
lng->txt(
'cal_ch_app_bookings'),
973 $this->ctrl->getLinkTarget($this,
'bookingList')
992 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
999 $hidden->setValue(implode(
';', $apps));
1000 $this->
form->addItem($hidden);
1003 $first = array_shift($apps);
1006 $this->
form->getItemByPostVar(
'ti')->setValue($entry->getTitle());
1007 $this->
form->getItemByPostVar(
'lo')->setValue($entry->getLocation());
1008 $this->
form->getItemByPostVar(
'de')->setValue($entry->getDescription());
1017 $ref_ids[] = end($refs);
1019 $this->
form->getItemByPostVar(
'tgt')->setValue(implode(
',', $ref_ids));
1022 $this->
form->getItemByPostVar(
'dead')->setDays((
int) floor($deadline / 24));
1023 $this->
form->getItemByPostVar(
'dead')->setHours($deadline % 24);
1028 $this->tpl->setContent($this->
form->getHTML());
1037 $deadline = $this->
form->getInput(
'dead');
1038 $deadline = $deadline[
'dd'] * 24 + $deadline[
'hh'];
1041 $tgt = array_map(
'intval', explode(
',', (
string) $this->
form->getInput(
'tgt')));
1049 $valid_types = [
'crs',
'grp'];
1050 if (!$obj_id or !in_array(
$type, $valid_types)) {
1051 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'cal_ch_unknown_repository_object'));
1054 $obj_ids[] = $obj_id;
1067 array $appointments,
1070 foreach ($appointments as $appointment_id) {
1071 $booking_appointment = new \ilCalendarEntry($appointment_id);
1072 $booking_start = $booking_appointment->getStart();
1073 $booking_end = $booking_appointment->getEnd();
1086 foreach ($relevant_appointments as $relevant_appointment_id) {
1087 $entry = new \ilCalendarEntry($relevant_appointment_id);
1102 $this->initFormSequence(self::MODE_MULTI);
1103 if (!$this->
form->checkInput()) {
1104 $this->
form->setValuesByPost();
1105 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'err_check_input'));
1110 $this->
form->setValuesByPost();
1111 $apps = $this->initAppointmentIdsFromPostString();
1114 $booking = $this->createNewBookingEntry($this->
form);
1119 $this->rewriteBookingIdsForAppointments($booking, $apps, $this->
form);
1122 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'),
true);
1123 $this->
ctrl->redirect($this,
'appointmentList');
1124 $this->tpl->setContent($this->
form->getHTML());
1133 if ($this->initAppointmentIdsFromPost() !== []) {
1134 $apps = $this->initAppointmentIdsFromPost();
1135 } elseif ($this->initAppointmentIdsFromQuery() !== []) {
1136 $apps = $this->initAppointmentIdsFromQuery();
1139 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
1140 $this->appointmentList();
1144 $this->
ctrl->saveParameter($this, array(
'seed',
'app_id',
'dt'));
1146 $confirm->setFormAction($this->
ctrl->getFormAction($this));
1147 $confirm->setHeaderText($this->
lng->txt(
'cal_delete_app_sure'));
1148 $confirm->setCancel($this->
lng->txt(
'cancel'),
'cancel');
1150 $bookings_available = array();
1151 foreach ($apps as $entry_id) {
1163 if ($bookings_available) {
1164 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'cal_ch_delete_app_booking_info') .
'<br />' . implode(
1169 $confirm->setConfirm($this->
lng->txt(
'delete'),
'delete');
1170 $confirm->setCancel($this->
lng->txt(
'cancel'),
'appointmentList');
1171 $this->tpl->setContent($confirm->getHTML());
1177 public function delete():
void
1179 if (!count($this->initAppointmentIdsFromPost())) {
1180 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
1181 $this->appointmentList();
1184 foreach ($this->initAppointmentIdsFromPost() as $entry_id) {
1188 foreach ($booking->getCurrentBookings($entry_id) as $user_id) {
1198 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'cal_deleted_app'),
true);
1199 $this->
ctrl->redirect($this,
'appointmentList');
1207 $this->
tabs->clearTargets();
1210 if ($this->
http->wrapper()->query()->has(
'user')) {
1211 $user_id = $this->
http->wrapper()->query()->retrieve(
1217 $profile->setBackUrl($this->getProfileBackUrl());
1218 $this->tpl->setContent($this->
ctrl->getHTML($profile));
1227 if ($this->
http->wrapper()->query()->has(
'ref_id')) {
1228 $url = $this->
ctrl->getLinkTargetByClass(
'ilCalendarMonthGUI');
1230 elseif ($this->
http->wrapper()->query()->has(
'panel')) {
1231 $url = $this->
ctrl->getLinkTargetByClass(
'ilCalendarPresentationGUI');
1234 $url = $this->
ctrl->getLinkTarget($this,
'appointmentList');
1244 $this->
help->setScreenId(
"consultation_hours_settings");
1245 $this->
tabs->activateTab(
'ch_settings');
1247 $form = $this->initSettingsForm();
1248 $this->tpl->setContent($form->getHTML());
1257 $form->setFormAction($this->
ctrl->getFormAction($this));
1260 $mng->setInfo($this->
lng->txt(
'cal_ch_manager_info'));
1261 $form->addItem($mng);
1265 $form->setTitle($this->
lng->txt(
'settings'));
1266 $form->addCommandButton(
'updateSettings', $this->
lng->txt(
'save'));
1275 $form = $this->initSettingsForm();
1276 if ($form->checkInput()) {
1277 $mng = $form->getInput(
'mng');
1279 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'),
true);
1280 $this->
ctrl->redirect($this,
'settings');
1282 $this->
tabs->activateTab(
'ch_settings');
1284 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'cal_ch_unknown_user'));
1285 $field = $form->getItemByPostVar(
'mng');
1286 $field->setValue($mng);
1287 $this->tpl->setContent($form->getHTML());
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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.
setBookingGroup(int $a_id)
static removeObsoleteEntries()
Remove unused booking entries.
setDeadlineHours(int $a_hours)
static lookupBookingsForAppointment(int $a_app_id)
Lookup booked users for appointment.
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.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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 getAppointmentIdsByGroup(int $a_user_id, int $a_ch_group_id, ?ilDateTime $start=null)
Get appointment ids by consultation hour group.
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 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 getAppointmentIds(int $a_user_id, int $a_context_id=null, ?ilDateTime $a_start=null, ?int $a_type=null, bool $a_check_owner=true)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getGroupSelectOptions(int $a_user_id)
Get group selection options.
static getCountGroupsOfUser(int $a_user_id)
Get number of consultation hour groups.
static getGroupsOfUser(int $a_user_id)
Get a all groups of an user.
static cancelBooking(int $a_usr_id, int $a_app_id, bool $a_send_notification=true)
Cancel a booking.
static bookAppointment(int $a_usr_id, int $a_app_id)
Book an appointment.
static findCalendarAppointmentsForBooking(ilBookingEntry $booking, ilDateTime $start, ilDateTime $end)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const MAX_APPOINTMENTS_PER_SEQUENCE
addGroup(?ilPropertyFormGUI $form=null)
Show add group form.
initAppointmentIdsFromQuery()
editGroup(?ilPropertyFormGUI $form=null)
Edit group.
deleteGroup()
Delete groups.
confirmDelete()
confirm delete for multiple entries
updateGroup()
Update group.
appointmentList()
Show settings of consultation hours.
groupList()
Show consultation hour group.
edit()
Edit multiple sequence items.
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)
initAppointmentIdsFromPostString()
initBookingUsersFromPost()
bool $search_assignment_to_appointments
createSequence()
Create new sequence.
updateSettings()
save settings
deleteBooking()
Delete booking.
initSettingsForm()
build settings form
searchUsersForAppointments()
initFormSequence(int $a_mode)
assignUsersToAppointments(array $users)
Assign users to multiple appointments.
initAppointmentIdsFromPost()
bookingList()
Show list of bookings.
assignUsersToGroup(array $usr_ids)
initGroupForm(int $a_group_id=0)
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()
ilGlobalTemplateInterface $tpl
saveSequence()
Save new sequence.
RefineryFactory $refinery
createNewBookingEntry(ilPropertyFormGUI $validate_form)
saveGroup()
Save new group.
__construct()
Constructor.
createAppointments(ilBookingEntry $booking)
Create calendar appointments.
rejectBooking(bool $a_send_notification=true)
confirmDeleteGroup()
Confirm delete.
getProfileBackUrl()
Build context-sensitive profile back url.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
@classDescription Date and time handling
static _lookupFullname(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)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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="ilpublicuserprofilegui")
Default behaviour is:
static initDomEvent(?ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI DomEvent used in Services/Calendar, Modules/Session, Modules/Test (Jan 2022)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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)