24 include_once
'./Services/Calendar/classes/class.ilCalendarRecurrence.php';
25 include_once
'./Services/Booking/classes/class.ilBookingEntry.php';
26 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourAppointments.php';
63 $this->user_id = $ilUser->getId();
79 $ilHelp->setScreenIdComponent(
"cal");
81 switch ($this->ctrl->getNextClass()) {
82 case "ilpublicuserprofilegui":
83 include_once(
'./Services/User/classes/class.ilPublicUserProfileGUI.php');
84 #22168 don't send the current user if no GET user_id 88 $ret = $ilCtrl->forwardCommand($profile);
89 $tpl->setContent(
$ret);
92 case 'ilrepositorysearchgui':
94 include_once(
'./Services/Search/classes/class.ilRepositorySearchGUI.php');
97 if (isset($_REQUEST[
'assignM'])) {
98 $rep_search->setCallback(
100 'assignUsersToAppointments',
103 $ilCtrl->setParameter($this,
'assignM', 1);
104 $ilCtrl->setReturn($this,
'appointmentList');
105 $ilTabs->activateSubTab(
'cal_ch_app_list');
106 } elseif (isset($_REQUEST[
'grp_id'])) {
107 $rep_search->setCallback(
109 'assignUsersToGroup',
112 $ilCtrl->saveParameter($this,
'grp_id');
113 $ilCtrl->setReturn($this,
'groupList');
114 $ilTabs->activateSubTab(
'cal_ch_app_grp');
115 } elseif (isset($_REQUEST[
'apps'])) {
116 $rep_search->setCallback(
118 'assignUsersToAppointment',
121 $ilCtrl->saveParameter($this,
'apps');
122 $ilCtrl->setReturn($this,
'appointmentList');
123 $ilTabs->activateSubTab(
'cal_ch_app_list');
125 $ilCtrl->forwardCommand($rep_search);
129 $tpl->setTitle($this->lng->txt(
"cal_ch_form_header"));
133 $ilCtrl->setParameter($this,
'user_id', $this->user_id);
136 $cmd = $this->ctrl->getCmd(
'appointmentList');
157 $_SESSION[
'ch_apps'] = $_REQUEST[
'apps'];
161 $GLOBALS[
'ilCtrl']->redirect($this,
'appointmentList');
163 $_REQUEST[
'assignM'] = 1;
164 $ilCtrl->setCmdClass(
'ilrepositorysearchgui');
180 include_once
'./Services/User/classes/class.ilObjUser.php';
183 ilUtil::sendInfo($this->lng->txt(
'cal_ch_user_assignment_failed_info') .
'<br />' . implode(
'<br />',
$users),
true);
195 $unassigned_users =
array();
197 $unassigned_users = array_unique(array_merge($unassigned_users, $this->
assignUsersToAppointment($users, $app,
false)));
201 $ilCtrl->redirect($this,
'appointmentList');
217 $app = $_REQUEST[
'apps'];
220 if (!count($users)) {
226 include_once
'./Services/Booking/classes/class.ilBookingEntry.php';
229 $assigned_users =
array();
230 foreach ($users as $user) {
231 if (
$booking->getCurrentNumberOfBookings($app) >=
$booking->getNumberOfBookings()) {
235 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourUtils.php';
237 $assigned_users[] = $user;
241 $unassigned_users = array_diff($users, $assigned_users);
245 $ilCtrl->redirect($this,
'appointmentList');
247 return $unassigned_users;
260 $group_id = (int) $_REQUEST[
'grp_id'];
266 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourAppointments.php';
267 include_once
'./Services/Booking/classes/class.ilBookingEntry.php';
274 $assigned_users =
array();
275 foreach ($apps as $app) {
277 foreach (
$users as $user) {
278 if (
$booking->getCurrentNumberOfBookings($app) >=
$booking->getNumberOfBookings()) {
282 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourUtils.php';
284 $assigned_users[] = $user;
290 $ilCtrl->redirect($this,
'bookingList');
300 global $ilToolbar, $ilTabs,
$tpl;
302 $ilToolbar->setFormAction($this->ctrl->getFormAction($this));
303 $ilToolbar->addButton($this->lng->txt(
'cal_ch_add_grp'), $this->ctrl->getLinkTarget($this,
'addGroup'));
306 $ilTabs->activateSubTab(
'cal_ch_app_grp');
308 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroupTableGUI.php';
309 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroups.php';
313 $tpl->setContent($gtbl->getHTML());
323 global $ilTabs,
$tpl;
326 $ilTabs->activateSubTab(
'cal_ch_app_grp');
331 $tpl->setContent(
$form->getHTML());
340 if (
$form->checkInput()) {
341 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroup.php';
343 $group->setTitle(
$form->getInput(
'title'));
344 $group->setMaxAssignments(
$form->getInput(
'multiple'));
349 $GLOBALS[
'ilCtrl']->redirect($this,
'groupList');
365 $ilCtrl->setParameter($this,
'grp_id', (
int) $_REQUEST[
'grp_id']);
367 $ilTabs->activateSubTab(
'cal_ch_app_grp');
372 $tpl->setContent(
$form->getHTML());
385 $ilCtrl->setParameter($this,
'grp_id', (
int) $_REQUEST[
'grp_id']);
388 if (
$form->checkInput()) {
389 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroup.php';
391 $group->setTitle(
$form->getInput(
'title'));
392 $group->setMaxAssignments(
$form->getInput(
'multiple'));
397 $GLOBALS[
'ilCtrl']->redirect($this,
'groupList');
413 $ilCtrl->setParameter($this,
'grp_id', (
int) $_REQUEST[
'grp_id']);
414 $groups =
array((
int) $_REQUEST[
'grp_id']);
417 $ilTabs->activateSubTab(
'cal_ch_app_grp');
420 include_once
'./Services/Utilities/classes/class.ilConfirmationGUI.php';
422 $confirm->setFormAction($ilCtrl->getFormAction($this));
423 $confirm->setHeaderText(
$GLOBALS[
'lng']->txt(
'cal_ch_grp_delete_sure'));
424 $confirm->setConfirm(
$GLOBALS[
'lng']->txt(
'delete'),
'deleteGroup');
425 $confirm->setCancel(
$GLOBALS[
'lng']->txt(
'cancel'),
'groupList');
427 foreach ($groups as $grp_id) {
428 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroup.php';
431 $confirm->addItem(
'groups[]', $grp_id, $group->getTitle());
433 $tpl->setContent($confirm->getHTML());
443 foreach ((
array) $_REQUEST[
'groups'] as $grp_id) {
444 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroup.php';
449 $ilCtrl->redirect($this,
'groupList');
457 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroup.php';
460 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
462 $form->setFormAction(
$GLOBALS[
'ilCtrl']->getFormAction($this));
465 $form->setTitle(
$GLOBALS[
'lng']->txt(
'cal_ch_grp_update_tbl'));
466 $form->addCommandButton(
'updateGroup',
$GLOBALS[
'lng']->txt(
'save'));
467 $form->addCommandButton(
'groupList',
$GLOBALS[
'lng']->txt(
'cancel'));
470 $form->addCommandButton(
'saveGroup',
$GLOBALS[
'lng']->txt(
'save'));
471 $form->addCommandButton(
'appointmentList',
$GLOBALS[
'lng']->txt(
'cancel'));
475 $title->setMaxLength(128);
477 $title->setRequired(
true);
478 $title->setValue($group->getTitle());
482 $multiple->setRequired(
true);
483 $multiple->setMinValue(1);
484 $multiple->setSize(1);
485 $multiple->setMaxLength(2);
486 $multiple->setInfo(
$GLOBALS[
'lng']->txt(
'cal_ch_grp_multiple_info'));
487 $multiple->setValue($group->getMaxAssignments());
488 $form->addItem($multiple);
498 global $ilToolbar, $ilTabs,
$tpl;
501 $ilTabs->activateSubTab(
'cal_ch_app_bookings');
503 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourBookingTableGUI.php';
506 $tpl->setContent($btable->getHTML());
522 global $ilTabs,
$tpl;
525 $ilTabs->activateSubTab(
'cal_ch_app_bookings');
527 include_once(
'./Services/Utilities/classes/class.ilConfirmationGUI.php');
530 $confirm->setFormAction($this->ctrl->getFormAction($this));
532 if ($a_send_notification) {
534 $confirm->setHeaderText($this->lng->txt(
'cal_ch_cancel_booking_sure'));
535 $confirm->setConfirm($this->lng->txt(
'cal_ch_reject_booking'),
'rejectBooking');
538 $confirm->setHeaderText($this->lng->txt(
'cal_ch_delete_booking_sure'));
539 $confirm->setConfirm($this->lng->txt(
'cal_ch_delete_booking'),
'deleteBooking');
542 $confirm->setCancel($this->lng->txt(
'cancel'),
'bookingList');
544 include_once
'Services/Calendar/classes/class.ilCalendarEntry.php';
545 foreach ((
array) $_REQUEST[
'bookuser'] as $bookuser) {
546 $ids = explode(
'_', $bookuser);
548 include_once
'./Services/Calendar/classes/class.ilCalendarEntry.php';
549 include_once
'./Services/User/classes/class.ilUserUtil.php';
564 $tpl->setContent($confirm->getHTML());
583 foreach ((
array) $_REQUEST[
'bookuser'] as $bookuser) {
584 $ids = explode(
'_', $bookuser);
586 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourUtils.php';
589 if ($a_send_notification) {
594 $ilCtrl->redirect($this,
'bookingList');
604 global $ilToolbar, $ilHelp, $ilTabs;
606 $ilHelp->setScreenId(
"consultation_hours");
608 $ilToolbar->setFormAction($this->ctrl->getFormAction($this));
609 $ilToolbar->addButton($this->lng->txt(
'cal_ch_add_sequence'), $this->ctrl->getLinkTarget($this,
'createSequence'));
612 $ilTabs->activateSubTab(
'cal_ch_app_list');
614 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHoursTableGUI.php';
617 $this->tpl->setContent(
$tbl->getHTML());
629 $this->form->getItemByPostVar(
'bo')->setValue($this->booking->getNumberOfBookings());
630 $this->form->getItemByPostVar(
'ap')->setValue(1);
631 $this->form->getItemByPostVar(
'du')->setMinutes(15);
632 $this->form->getItemByPostVar(
'st')->setDate(
636 $this->tpl->setContent($this->form->getHTML());
646 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
648 include_once(
'./Services/YUI/classes/class.ilYuiUtil.php');
652 $this->form->setFormAction($this->ctrl->getFormAction($this));
655 case self::MODE_CREATE:
656 $this->form->setTitle($this->lng->txt(
'cal_ch_add_sequence'));
657 $this->form->addCommandButton(
'saveSequence', $this->lng->txt(
'save'));
658 $this->form->addCommandButton(
'appointmentList', $this->lng->txt(
'cancel'));
669 case self::MODE_MULTI:
670 $this->form->setTitle($this->lng->txt(
'cal_ch_multi_edit_sequence'));
671 $this->form->addCommandButton(
'updateMulti', $this->lng->txt(
'save'));
672 $this->form->addCommandButton(
'appointmentList', $this->lng->txt(
'cancel'));
677 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroups.php';
679 $group =
new ilSelectInputGUI($this->lng->txt(
'cal_ch_grp_selection'),
'grp');
681 $group->setRequired(
false);
682 $this->form->addItem($group);
688 $ti->setMaxLength(128);
689 $ti->setRequired(
true);
690 $this->form->addItem($ti);
692 if ($a_mode != self::MODE_MULTI) {
694 include_once
'./Services/Form/classes/class.ilDateTimeInputGUI.php';
697 $dur->setRequired(
true);
698 $this->form->addItem($dur);
703 $du->setShowHours(
true);
704 $this->form->addItem($du);
707 $nu =
new ilNumberInputGUI($this->lng->txt(
'cal_ch_num_appointments'),
'ap');
708 $nu->
setInfo($this->lng->txt(
'cal_ch_num_appointments_info'));
710 $nu->setMaxLength(2);
711 $nu->setRequired(
true);
713 $this->form->addItem($nu);
716 include_once(
'./Services/Calendar/classes/Form/class.ilRecurrenceInputGUI.php');
725 $this->form->addItem($rec);
731 $nu->setMaxLength(2);
733 $nu->setRequired(
true);
734 $this->form->addItem($nu);
738 $dead->
setInfo($this->lng->txt(
'cal_ch_deadline_info'));
739 $dead->setShowMinutes(
false);
740 $dead->setShowHours(
true);
741 $dead->setShowDays(
true);
742 $this->form->addItem($dead);
747 $lo->setMaxLength(128);
748 $this->form->addItem($lo);
754 $this->form->addItem($de);
757 $tgt =
new ilTextInputGUI($this->lng->txt(
'cal_ch_target_object'),
'tgt');
758 $tgt->
setInfo($this->lng->txt(
'cal_ch_target_object_info'));
760 $tgt->setMaxLength(128);
761 $this->form->addItem($tgt);
770 global $ilObjDataCache;
774 if ($this->form->checkInput()) {
775 $this->form->setValuesByPost();
779 $booking->setNumberOfBookings($this->form->getInput(
'bo'));
781 $deadline = $this->form->getInput(
'dead');
782 $deadline = $deadline[
'dd'] * 24 + $deadline[
'hh'];
783 $booking->setDeadlineHours($deadline);
786 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroups.php';
788 $booking->setBookingGroup((
int) $this->form->getInput(
'grp'));
791 $tgt = explode(
',', $this->form->getInput(
'tgt'));
793 foreach ((
array) $tgt as $ref_id) {
794 if (!trim($ref_id)) {
797 $obj_id = $ilObjDataCache->lookupObjId($ref_id);
799 $valid_types =
array(
'crs',
'grp');
800 if (!$obj_id or !in_array(
$type, $valid_types)) {
802 $this->tpl->setContent($this->form->getHTML());
806 $obj_ids[] = $obj_id;
808 $booking->setTargetObjIds($obj_ids);
814 $this->ctrl->redirect($this,
'appointmentList');
816 $this->form->setValuesByPost();
817 $this->tpl->setContent($this->form->getHTML());
828 include_once
'./Services/Calendar/classes/class.ilDateList.php';
830 $start = clone $this->form->getItemByPostVar(
'st')->getDate();
831 for (
$i = 0;
$i < $this->form->getItemByPostVar(
'ap')->getValue();
$i++) {
832 $concurrent_dates->add(clone $start);
834 $start->increment(
ilDateTime::MINUTE, $this->form->getItemByPostVar(
'du')->getMinutes());
835 $start->increment(
ilDateTime::HOUR, $this->form->getItemByPostVar(
'du')->getHours());
836 #$start = new ilDateTime(,IL_CAL_UNIX); 839 include_once
'./Services/Calendar/classes/class.ilCalendarUtil.php';
843 include_once
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php';
844 include_once
'./Services/Calendar/classes/class.ilCalendarEntry.php';
845 include_once
'./Services/Calendar/classes/class.ilCalendarRecurrenceCalculator.php';
846 include_once
'./Services/Booking/classes/class.ilBookingPeriod.php';
848 $num_appointments = 0;
849 foreach ($concurrent_dates as $dt) {
850 if ($num_appointments >= self::MAX_APPOINTMENTS_PER_SEQUENCE) {
860 $this->form->getItemByPostVar(
'frequence')->getRecurrence()
870 foreach ($date_list as $app_start) {
871 $app_end = clone $app_start;
872 $app_end->increment(
ilDateTime::MINUTE, $this->form->getItemByPostVar(
'du')->getMinutes());
873 $app_end->increment(
ilDateTime::HOUR, $this->form->getItemByPostVar(
'du')->getHours());
877 $entry->setContextId($booking->
getId());
878 $entry->setTitle($this->form->getInput(
'ti'));
879 $entry->setSubtitle(
"#consultationhour#");
880 $entry->setDescription($this->form->getInput(
'de'));
881 $entry->setLocation($this->form->getInput(
'lo'));
882 $entry->setStart($app_start);
883 $entry->setEnd($app_end);
904 $ilCtrl->setParameter($this,
'user_id',
'');
905 $ilTabs->addTab(
'consultation_hours_' . $ilUser->getId(), $this->lng->txt(
'cal_ch_ch'), $this->ctrl->getLinkTarget($this,
'appointmentList'));
908 $ilCtrl->setParameter($this,
'user_id', $user_id);
909 $ilTabs->addTab(
'consultation_hours_' . $user_id, $this->lng->txt(
'cal_ch_ch') .
': ' . $login, $this->ctrl->getLinkTarget($this,
'appointmentList'));
911 $ilCtrl->setParameter($this,
'user_id',
'');
913 $ilTabs->addTab(
'ch_settings', $this->lng->txt(
'settings'), $this->ctrl->getLinkTarget($this,
'settings'));
915 $ilTabs->activateTab(
'consultation_hours_' . $this->
getUserId());
927 $ilCtrl->setParameter($this,
'user_id', $this->
getUserId());
928 $ilTabs->addSubTab(
'cal_ch_app_list', $this->lng->txt(
'cal_ch_app_list'), $ilCtrl->getLinkTarget($this,
'appointmentList'));
929 $ilTabs->addSubTab(
'cal_ch_app_grp', $this->lng->txt(
'cal_ch_app_grp'), $ilCtrl->getLinkTarget($this,
'groupList'));
930 $ilTabs->addSubTab(
'cal_ch_app_bookings', $this->lng->txt(
'cal_ch_app_bookings'), $ilCtrl->getLinkTarget($this,
'bookingList'));
940 if (!isset($_REQUEST[
'apps'])) {
947 if ($_REQUEST[
'apps'] && !is_array($_REQUEST[
'apps'])) {
948 $_REQUEST[
'apps'] = explode(
';', $_REQUEST[
'apps']);
952 $hidden->setValue(implode(
';', $_REQUEST[
'apps']));
953 $this->form->addItem($hidden);
955 include_once
'Services/Calendar/classes/class.ilCalendarEntry.php';
956 $first = $_REQUEST[
'apps'];
957 $first = array_shift($_REQUEST[
'apps']);
960 $this->form->getItemByPostVar(
'ti')->setValue($entry->getTitle());
961 $this->form->getItemByPostVar(
'lo')->setValue($entry->getLocation());
962 $this->form->getItemByPostVar(
'de')->setValue($entry->getDescription());
964 include_once
'Services/Booking/classes/class.ilBookingEntry.php';
967 $this->form->getItemByPostVar(
'bo')->setValue(
$booking->getNumberOfBookings());
970 foreach (
$booking->getTargetObjIds() as $obj_id) {
972 $ref_ids[] = end($refs);
974 $this->form->getItemByPostVar(
'tgt')->setValue(implode(
',', $ref_ids));
976 $deadline =
$booking->getDeadlineHours();
977 $this->form->getItemByPostVar(
'dead')->setDays(floor($deadline/24));
978 $this->form->getItemByPostVar(
'dead')->setHours($deadline%24);
981 $this->form->getItemByPostVar(
'grp')->setValue(
$booking->getBookingGroup());
984 $this->tpl->setContent($this->form->getHTML());
995 $obj_cache = $DIC[
'ilObjDataCache'];
999 $booking->setNumberOfBookings((
int) $this->form->getInput(
'bo'));
1001 $deadline = $this->form->getInput(
'dead');
1002 $deadline = $deadline[
'dd'] * 24 + $deadline[
'hh'];
1003 $booking->setDeadlineHours($deadline);
1005 $tgt = explode(
',', (
string) $this->form->getInput(
'tgt'));
1007 foreach ((
array) $tgt as $ref_id) {
1008 if (!trim($ref_id)) {
1011 $obj_id = $obj_cache->lookupObjId($ref_id);
1013 $valid_types = [
'crs',
'grp'];
1014 if (!$obj_id or !in_array(
$type, $valid_types)) {
1018 $obj_ids[] = $obj_id;
1020 $booking->setTargetObjIds($obj_ids);
1023 $booking->setBookingGroup($this->form->getInput(
'grp'));
1035 foreach ($appointments as $appointment_id) {
1037 $booking_appointment = new \ilCalendarEntry($appointment_id);
1038 $booking_start = $booking_appointment->getStart();
1039 $booking_end = $booking_appointment->getEnd();
1052 foreach ($relevant_appointments as $relevant_appointment_id) {
1054 $entry = new \ilCalendarEntry($relevant_appointment_id);
1055 $entry->setContextId($booking->
getId());
1056 $entry->setTitle($form->
getInput(
'ti'));
1057 $entry->setLocation($form->
getInput(
'lo'));
1058 $entry->setDescription($form->
getInput(
'de'));
1072 $ilObjDataCache = $DIC[
'ilObjDataCache'];
1076 if ($this->form->checkInput()) {
1078 $this->form->setValuesByPost();
1079 $apps = explode(
';', (
string)
$_POST[
'apps']);
1091 $this->ctrl->redirect($this,
'appointmentList');
1093 $this->tpl->setContent($this->form->getHTML());
1105 if (!isset($_REQUEST[
'apps'])) {
1110 include_once(
'./Services/Utilities/classes/class.ilConfirmationGUI.php');
1113 $this->ctrl->saveParameter($this,
array(
'seed',
'app_id',
'dt'));
1116 $confirm->setFormAction($this->ctrl->getFormAction($this));
1117 $confirm->setHeaderText($this->lng->txt(
'cal_delete_app_sure'));
1118 $confirm->setCancel($this->lng->txt(
'cancel'),
'cancel');
1120 include_once
'Services/Calendar/classes/class.ilCalendarEntry.php';
1122 $bookings_available =
array();
1123 foreach ((
array) $_REQUEST[
'apps'] as $entry_id) {
1127 include_once
'./Services/Booking/classes/class.ilBookingEntry.php';
1133 if ($bookings_available) {
1134 ilUtil::sendInfo($this->lng->txt(
'cal_ch_delete_app_booking_info') .
'<br />' . implode(
'<br />', $bookings_available));
1137 $confirm->setConfirm($this->lng->txt(
'delete'),
'delete');
1138 $confirm->setCancel($this->lng->txt(
'cancel'),
'appointmentList');
1140 $tpl->setContent($confirm->getHTML());
1146 public function delete()
1148 if (!isset(
$_POST[
'apps'])) {
1153 include_once
'Services/Calendar/classes/class.ilCalendarEntry.php';
1154 include_once
'Services/Calendar/classes/class.ilCalendarCategoryAssignments.php';
1155 foreach (
$_POST[
'apps'] as $entry_id) {
1160 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourUtils.php';
1165 include_once
'./Services/Calendar/classes/class.ilCalendarEntry.php';
1175 $this->ctrl->redirect($this,
'appointmentList');
1185 $ilTabs->clearTargets();
1189 include_once
'Services/User/classes/class.ilPublicUserProfileGUI.php';
1192 $tpl->setContent($ilCtrl->getHTML($profile));
1203 if (isset($_REQUEST[
"ref_id"])) {
1204 $url = $this->ctrl->getLinkTargetByClass(
'ilCalendarMonthGUI');
1207 elseif (isset(
$_GET[
'panel'])) {
1208 $url = $this->ctrl->getLinkTargetByClass(
'ilCalendarPresentationGUI');
1212 $url = $this->ctrl->getLinkTarget($this,
'appointmentList');
1222 global
$tpl, $ilTabs, $ilHelp;
1224 $ilHelp->setScreenId(
"consultation_hours_settings");
1225 $ilTabs->activateTab(
'ch_settings');
1228 $tpl->setContent(
$form->getHTML());
1239 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
1242 $form->setFormAction($this->ctrl->getFormAction($this));
1244 $mng =
new ilTextInputGUI($this->lng->txt(
'cal_ch_manager'),
'mng');
1245 $mng->
setInfo($this->lng->txt(
'cal_ch_manager_info'));
1246 $form->addItem($mng);
1250 $form->setTitle($this->lng->txt(
'settings'));
1251 $form->addCommandButton(
'updateSettings', $this->lng->txt(
'save'));
1264 if (
$form->checkInput()) {
1265 $mng =
$form->getInput(
'mng');
1268 $ilCtrl->redirect($this,
'settings');
1270 $ilTabs->activateTab(
'ch_settings');
1273 $field =
$form->getItemByPostVar(
'mng');
1274 $field->setValue($mng);
1275 $tpl->setContent(
$form->getHTML());
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
confirmRejectBooking($a_send_notification=true)
Show delete booking confirmation.
Consultation hours editor.
showProfile()
show public profile of given user
bookingList()
Show list of bookings.
const IL_CAL_FREQ_MONTHLY
Model for a calendar entry.
initFormSequence($a_mode)
Init form.
const IL_CAL_TRANSLATION_SYSTEM
static _lookupFullname($a_user_id)
Lookup Full Name.
assignUsersToAppointments(array $users)
Assign users to multiple appointments.
initGroupForm($a_group_id=0)
Init new/update group form.
confirmDeleteGroup()
Confirm delete type $ilCtrl type $ilTabs.
static findCalendarAppointmentsForBooking(\ilBookingEntry $booking, \ilDateTime $start, \ilDateTime $end)
edit()
Edit multiple sequence items.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date public.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
static removeObsoleteEntries()
Remove unused booking entries.
static getAppointmentIds($a_user_id, $a_context_id=null, $a_start=null, $a_type=null, $a_check_owner=true)
Get all appointment ids.
confirmDeleteBooking()
Show delete booking confirmation.
static getInstanceByCalendarEntryId($a_id)
Get instance by calendar entry.
rewriteBookingIdsForAppointments(\ilBookingEntry $booking, $appointments, \ilPropertyFormGUI $form)
settings()
display settings gui
updateSettings()
save settings
saveGroup()
Save new group.
const MAX_APPOINTMENTS_PER_SEQUENCE
static _getAllReferences($a_id)
get all reference ids of object
static setManager($a_user_name)
Set consultation hour manager for current user.
confirmDelete()
confirm delete for multiple entries
assignUsersToGroup(array $usr_ids)
static getGroupSelectOptions($a_user_id)
Get group selection options.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
calculateDateList(ilDateTime $a_start, ilDateTime $a_end, $a_limit=-1)
calculate date list
groupList()
Show consultation hour group type $ilToolbar.
createAppointments(ilBookingEntry $booking)
Create calendar appointments.
searchUsersForAppointments()
start searching for users
static getGroupsOfUser($a_user_id)
Get a all groups of an user.
GUI class for public user profile presentation.
deleteBooking()
Delete booking.
static lookupBookingsForAppointment($a_app_id)
Lookup booked users for appointment type $ilDB.
if(isset($_POST['submit'])) $form
static getManagedUsers()
Get all managed consultation hours users for current users.
Calculates an ilDateList for a given calendar entry and recurrence rule.
const IL_CAL_FREQ_DAILY
Model of calendar entry recurrcences.
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
setSubTabs()
Set sub tabs type $ilTabs type $ilCtrl.
__construct()
Constructor.
setSize($a_size)
Set Size.
This class represents a text property in a property form.
static initDomEvent()
Init YUI DomEvent.
addGroup(ilPropertyFormGUI $form=null)
Show add group form type $ilToolbar type $ilTabs.
createNewBookingEntry(\ilPropertyFormGUI $validate_form)
Consultation hours administration.
sendInfoAboutUnassignedUsers($unassigned)
Send info message about unassigned users.
deleteGroup()
Delete groups.
static getNamePresentation( $a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
static getAppointmentIdsByGroup($a_user_id, $a_ch_group_id, ilDateTime $start=null)
Get appointment ids by consultation hour group.
static _deleteByAppointmentId($a_app_id)
Delete appointment assignment.
static lookupBookingsOfUser($a_app_ids, $a_usr_id, ilDateTime $start=null)
Lookup bookings if user.
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
addAssignment($a_cal_cat_id)
add assignment
static cancelBooking($a_usr_id, $a_app_id, $a_send_notification=true)
Cancel a booking.
appointmentList()
Show settings of consultation hours.
setRows($a_rows)
Set Rows.
editGroup(ilPropertyFormGUI $form=null)
Edit group type $ilCtrl.
This class represents a text area property in a property form.
rejectBooking($a_send_notification=true)
static initDefaultCalendarByType($a_type_id, $a_usr_id, $a_title, $a_create=false)
Init the default calendar for given type and user.
static getManager($a_as_name=false, $a_full_name=false, $a_user_id=null)
Get consultation hour manager for current user or specific user.
saveSequence()
Save new sequence.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
static getCountGroupsOfUser($a_user_id)
Get number of consultation hour groups type $ilDB.
createSequence()
Create new sequence.
executeCommand()
Execute command.
assignUsersToAppointment(array $users, $a_app=0, $a_redirect=true)
Assign users to an appointment.
Booking period Used for calculation of recurring events.
updateMulti()
Update multiple sequence items.
updateGroup()
Update group type $ilCtrl type $tpl type $ilTabs.
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Confirmation screen class.
static bookAppointment($a_usr_id, $a_app_id)
Book an appointment.
getProfileBackUrl()
Build context-sensitive profile back url.
initSettingsForm()
build settings form