24include_once
'./Services/Calendar/classes/class.ilCalendarRecurrence.php';
25include_once
'./Services/Booking/classes/class.ilBookingEntry.php';
26include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourAppointments.php';
68 $this->user_id =
$ilUser->getId();
84 $ilHelp->setScreenIdComponent(
"cal");
86 switch($this->ctrl->getNextClass())
88 case "ilpublicuserprofilegui":
89 include_once(
'./Services/User/classes/class.ilPublicUserProfileGUI.php');
90 #22168 don't send the current user if no GET user_id
94 $ret = $ilCtrl->forwardCommand($profile);
98 case 'ilrepositorysearchgui':
100 include_once(
'./Services/Search/classes/class.ilRepositorySearchGUI.php');
103 if(isset($_REQUEST[
'assignM']))
105 $rep_search->setCallback(
107 'assignUsersToAppointments',
110 $ilCtrl->setParameter($this,
'assignM',1);
111 $ilCtrl->setReturn($this,
'appointmentList');
112 $ilTabs->activateSubTab(
'cal_ch_app_list');
114 elseif(isset($_REQUEST[
'grp_id']))
116 $rep_search->setCallback(
118 'assignUsersToGroup',
121 $ilCtrl->saveParameter($this,
'grp_id');
122 $ilCtrl->setReturn($this,
'groupList');
123 $ilTabs->activateSubTab(
'cal_ch_app_grp');
125 elseif(isset($_REQUEST[
'apps']))
127 $rep_search->setCallback(
129 'assignUsersToAppointment',
132 $ilCtrl->saveParameter($this,
'apps');
133 $ilCtrl->setReturn($this,
'appointmentList');
134 $ilTabs->activateSubTab(
'cal_ch_app_list');
136 $ilCtrl->forwardCommand($rep_search);
140 $tpl->setTitle($this->lng->txt(
"cal_ch_form_header"));
143 if($ilUser->getId() != $this->user_id)
145 $ilCtrl->setParameter($this,
'user_id', $this->user_id);
148 $cmd = $this->ctrl->getCmd(
'appointmentList');
169 $_SESSION[
'ch_apps'] = $_REQUEST[
'apps'];
174 $GLOBALS[
'ilCtrl']->redirect($this,
'appointmentList');
176 $_REQUEST[
'assignM'] = 1;
177 $ilCtrl->setCmdClass(
'ilrepositorysearchgui');
195 include_once
'./Services/User/classes/class.ilObjUser.php';
198 ilUtil::sendInfo($this->lng->txt(
'cal_ch_user_assignment_failed_info').
'<br />'.implode(
'<br />', $users),
true);
210 $unassigned_users = array();
213 $unassigned_users = array_unique(array_merge($unassigned_users,$this->
assignUsersToAppointment($users,$app,
false)));
217 $ilCtrl->redirect($this,
'appointmentList');
236 $app = $_REQUEST[
'apps'];
239 include_once
'./Services/Booking/classes/class.ilBookingEntry.php';
242 $assigned_users = array();
243 foreach($users as $user)
245 if(
$booking->getCurrentNumberOfBookings($app) >=
$booking->getNumberOfBookings())
251 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourUtils.php';
253 $assigned_users[] = $user;
257 $unassigned_users = array_diff($users, $assigned_users);
262 $ilCtrl->redirect($this,
'appointmentList');
266 return $unassigned_users;
280 $group_id = (int) $_REQUEST[
'grp_id'];
286 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourAppointments.php';
287 include_once
'./Services/Booking/classes/class.ilBookingEntry.php';
294 $assigned_users = array();
295 foreach($apps as $app)
298 foreach($users as $user)
300 if(
$booking->getCurrentNumberOfBookings($app) >=
$booking->getNumberOfBookings())
306 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourUtils.php';
308 $assigned_users[] = $user;
314 $ilCtrl->redirect($this,
'bookingList');
324 global $ilToolbar, $ilTabs,
$tpl;
326 $ilToolbar->setFormAction($this->ctrl->getFormAction($this));
327 $ilToolbar->addButton($this->lng->txt(
'cal_ch_add_grp'),$this->ctrl->getLinkTarget($this,
'addGroup'));
330 $ilTabs->activateSubTab(
'cal_ch_app_grp');
332 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroupTableGUI.php';
333 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroups.php';
337 $tpl->setContent($gtbl->getHTML());
347 global $ilTabs,
$tpl;
350 $ilTabs->activateSubTab(
'cal_ch_app_grp');
356 $tpl->setContent($form->getHTML());
365 if($form->checkInput())
367 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroup.php';
369 $group->setTitle($form->getInput(
'title'));
370 $group->setMaxAssignments($form->getInput(
'multiple'));
375 $GLOBALS[
'ilCtrl']->redirect($this,
'groupList');
391 $ilCtrl->setParameter($this,
'grp_id',(
int) $_REQUEST[
'grp_id']);
393 $ilTabs->activateSubTab(
'cal_ch_app_grp');
399 $tpl->setContent($form->getHTML());
412 $ilCtrl->setParameter($this,
'grp_id',(
int) $_REQUEST[
'grp_id']);
415 if($form->checkInput())
417 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroup.php';
419 $group->setTitle($form->getInput(
'title'));
420 $group->setMaxAssignments($form->getInput(
'multiple'));
425 $GLOBALS[
'ilCtrl']->redirect($this,
'groupList');
441 $ilCtrl->setParameter($this,
'grp_id',(
int) $_REQUEST[
'grp_id']);
442 $groups = array((
int) $_REQUEST[
'grp_id']);
445 $ilTabs->activateSubTab(
'cal_ch_app_grp');
448 include_once
'./Services/Utilities/classes/class.ilConfirmationGUI.php';
450 $confirm->setFormAction(
$ilCtrl->getFormAction($this));
451 $confirm->setHeaderText(
$GLOBALS[
'lng']->txt(
'cal_ch_grp_delete_sure'));
452 $confirm->setConfirm(
$GLOBALS[
'lng']->txt(
'delete'),
'deleteGroup');
453 $confirm->setCancel(
$GLOBALS[
'lng']->txt(
'cancel'),
'groupList');
455 foreach($groups as $grp_id)
457 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroup.php';
460 $confirm->addItem(
'groups[]', $grp_id, $group->getTitle());
462 $tpl->setContent($confirm->getHTML());
472 foreach((array) $_REQUEST[
'groups'] as $grp_id)
474 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroup.php';
479 $ilCtrl->redirect($this,
'groupList');
487 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroup.php';
490 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
492 $form->setFormAction(
$GLOBALS[
'ilCtrl']->getFormAction($this));
496 $form->setTitle(
$GLOBALS[
'lng']->txt(
'cal_ch_grp_update_tbl'));
497 $form->addCommandButton(
'updateGroup',
$GLOBALS[
'lng']->txt(
'save'));
498 $form->addCommandButton(
'groupList',
$GLOBALS[
'lng']->txt(
'cancel'));
502 $form->setTitle(
$GLOBALS[
'lng']->txt(
'cal_ch_grp_add_tbl'));
503 $form->addCommandButton(
'saveGroup',
$GLOBALS[
'lng']->txt(
'save'));
504 $form->addCommandButton(
'appointmentList',
$GLOBALS[
'lng']->txt(
'cancel'));
508 $title->setMaxLength(128);
510 $title->setRequired(
true);
511 $title->setValue($group->getTitle());
515 $multiple->setRequired(
true);
516 $multiple->setMinValue(1);
517 $multiple->setSize(1);
518 $multiple->setMaxLength(2);
519 $multiple->setInfo(
$GLOBALS[
'lng']->txt(
'cal_ch_grp_multiple_info'));
520 $multiple->setValue($group->getMaxAssignments());
521 $form->addItem($multiple);
531 global $ilToolbar, $ilTabs,
$tpl;
534 $ilTabs->activateSubTab(
'cal_ch_app_bookings');
536 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourBookingTableGUI.php';
539 $tpl->setContent($btable->getHTML());
555 global $ilTabs,
$tpl;
558 $ilTabs->activateSubTab(
'cal_ch_app_bookings');
560 include_once(
'./Services/Utilities/classes/class.ilConfirmationGUI.php');
563 $confirm->setFormAction($this->ctrl->getFormAction($this));
565 if($a_send_notification)
568 $confirm->setHeaderText($this->lng->txt(
'cal_ch_cancel_booking_sure'));
569 $confirm->setConfirm($this->lng->txt(
'cal_ch_reject_booking'),
'rejectBooking');
574 $confirm->setHeaderText($this->lng->txt(
'cal_ch_delete_booking_sure'));
575 $confirm->setConfirm($this->lng->txt(
'cal_ch_delete_booking'),
'deleteBooking');
578 $confirm->setCancel($this->lng->txt(
'cancel'),
'bookingList');
580 include_once
'Services/Calendar/classes/class.ilCalendarEntry.php';
581 foreach((array) $_REQUEST[
'bookuser'] as $bookuser)
583 $ids = explode(
'_',$bookuser);
585 include_once
'./Services/Calendar/classes/class.ilCalendarEntry.php';
586 include_once
'./Services/User/classes/class.ilUserUtil.php';
601 $tpl->setContent($confirm->getHTML());
620 foreach((array) $_REQUEST[
'bookuser'] as $bookuser)
622 $ids = explode(
'_',$bookuser);
624 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourUtils.php';
627 if($a_send_notification)
635 $ilCtrl->redirect($this,
'bookingList');
645 global $ilToolbar, $ilHelp, $ilTabs;
647 $ilHelp->setScreenId(
"consultation_hours");
649 $ilToolbar->setFormAction($this->ctrl->getFormAction($this));
650 $ilToolbar->addButton($this->lng->txt(
'cal_ch_add_sequence'),$this->ctrl->getLinkTarget($this,
'createSequence'));
653 $ilTabs->activateSubTab(
'cal_ch_app_list');
655 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHoursTableGUI.php';
658 $this->tpl->setContent(
$tbl->getHTML());
670 $this->form->getItemByPostVar(
'bo')->setValue($this->booking->getNumberOfBookings());
671 $this->form->getItemByPostVar(
'ap')->setValue(1);
672 $this->form->getItemByPostVar(
'du')->setMinutes(15);
673 $this->form->getItemByPostVar(
'st')->setDate(
676 $this->tpl->setContent($this->form->getHTML());
686 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
688 include_once(
'./Services/YUI/classes/class.ilYuiUtil.php');
692 $this->form->setFormAction($this->ctrl->getFormAction($this));
697 $this->form->setTitle($this->lng->txt(
'cal_ch_add_sequence'));
698 $this->form->addCommandButton(
'saveSequence', $this->lng->txt(
'save'));
699 $this->form->addCommandButton(
'appointmentList', $this->lng->txt(
'cancel'));
711 $this->form->setTitle($this->lng->txt(
'cal_ch_multi_edit_sequence'));
712 $this->form->addCommandButton(
'updateMulti', $this->lng->txt(
'save'));
713 $this->form->addCommandButton(
'appointmentList', $this->lng->txt(
'cancel'));
718 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroups.php';
721 $group =
new ilSelectInputGUI($this->lng->txt(
'cal_ch_grp_selection'),
'grp');
723 $group->setRequired(
false);
724 $this->form->addItem($group);
730 $ti->setMaxLength(128);
731 $ti->setRequired(
true);
732 $this->form->addItem($ti);
734 if($a_mode != self::MODE_MULTI)
737 include_once
'./Services/Form/classes/class.ilDateTimeInputGUI.php';
739 $dur->setShowTime(
true);
740 $dur->setRequired(
true);
741 $this->form->addItem($dur);
745 $du->setShowMinutes(
true);
746 $du->setShowHours(
true);
747 $this->form->addItem($du);
750 $nu =
new ilNumberInputGUI($this->lng->txt(
'cal_ch_num_appointments'),
'ap');
751 $nu->setInfo($this->lng->txt(
'cal_ch_num_appointments_info'));
753 $nu->setMaxLength(2);
754 $nu->setRequired(
true);
756 $this->form->addItem($nu);
759 include_once(
'./Services/Calendar/classes/Form/class.ilRecurrenceInputGUI.php');
761 $rec->setEnabledSubForms(
768 $this->form->addItem($rec);
774 $nu->setMaxLength(2);
776 $nu->setRequired(
true);
777 $this->form->addItem($nu);
781 $dead->setInfo($this->lng->txt(
'cal_ch_deadline_info'));
782 $dead->setShowMinutes(
false);
783 $dead->setShowHours(
true);
784 $dead->setShowDays(
true);
785 $this->form->addItem($dead);
790 $lo->setMaxLength(128);
791 $this->form->addItem($lo);
797 $this->form->addItem($de);
800 $tgt =
new ilTextInputGUI($this->lng->txt(
'cal_ch_target_object'),
'tgt');
801 $tgt->setInfo($this->lng->txt(
'cal_ch_target_object_info'));
803 $tgt->setMaxLength(128);
804 $this->form->addItem($tgt);
813 global $ilObjDataCache;
817 if($this->form->checkInput())
819 $this->form->setValuesByPost();
823 $booking->setNumberOfBookings($this->form->getInput(
'bo'));
825 $deadline = $this->form->getInput(
'dead');
826 $deadline = $deadline[
'dd'] * 24 + $deadline[
'hh'];
827 $booking->setDeadlineHours($deadline);
830 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroups.php';
833 $booking->setBookingGroup((
int) $this->form->getInput(
'grp'));
836 $tgt = explode(
',',$this->form->getInput(
'tgt'));
838 foreach((array) $tgt as
$ref_id)
844 $obj_id = $ilObjDataCache->lookupObjId(
$ref_id);
846 $valid_types = array(
'crs',
'grp');
847 if(!$obj_id or !in_array($type, $valid_types))
850 $this->tpl->setContent($this->form->getHTML());
854 $obj_ids[] = $obj_id;
856 $booking->setTargetObjIds($obj_ids);
862 $this->ctrl->redirect($this,
'appointmentList');
866 $this->form->setValuesByPost();
867 $this->tpl->setContent($this->form->getHTML());
878 include_once
'./Services/Calendar/classes/class.ilDateList.php';
880 $start = clone $this->form->getItemByPostVar(
'st')->getDate();
881 for($i = 0; $i < $this->form->getItemByPostVar(
'ap')->getValue(); $i++)
883 $concurrent_dates->add(clone
$start);
887 #$start = new ilDateTime(,IL_CAL_UNIX);
890 include_once
'./Services/Calendar/classes/class.ilCalendarUtil.php';
894 include_once
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php';
895 include_once
'./Services/Calendar/classes/class.ilCalendarEntry.php';
896 include_once
'./Services/Calendar/classes/class.ilCalendarRecurrenceCalculator.php';
897 include_once
'./Services/Booking/classes/class.ilBookingPeriod.php';
899 $num_appointments = 0;
900 foreach($concurrent_dates as $dt)
902 if($num_appointments >= self::MAX_APPOINTMENTS_PER_SEQUENCE)
908 $end->increment(
ilDateTime::MINUTE,$this->form->getItemByPostVar(
'du')->getMinutes());
909 $end->increment(
ilDateTime::HOUR,$this->form->getItemByPostVar(
'du')->getHours());
913 $this->form->getItemByPostVar(
'frequence')->getRecurrence()
920 $date_list = $calc->calculateDateList($dt,$limit);
923 foreach($date_list as $app_start)
925 $app_end = clone $app_start;
926 $app_end->increment(
ilDateTime::MINUTE,$this->form->getItemByPostVar(
'du')->getMinutes());
927 $app_end->increment(
ilDateTime::HOUR,$this->form->getItemByPostVar(
'du')->getHours());
931 $entry->setContextId(
$booking->getId());
932 $entry->setTitle($this->form->getInput(
'ti'));
933 $entry->setSubtitle(
"#consultationhour#");
934 $entry->setDescription($this->form->getInput(
'de'));
935 $entry->setLocation($this->form->getInput(
'lo'));
936 $entry->setStart($app_start);
937 $entry->setEnd($app_end);
943 $cat_assign->addAssignment($def_cat->getCategoryID());
958 $ilCtrl->setParameter($this,
'user_id',
'');
959 $ilTabs->addTab(
'consultation_hours_'.
$ilUser->getId(), $this->lng->txt(
'cal_ch_ch'), $this->ctrl->getLinkTarget($this,
'appointmentList'));
964 $ilTabs->addTab(
'consultation_hours_'.
$user_id, $this->lng->txt(
'cal_ch_ch').
': '.$login, $this->ctrl->getLinkTarget($this,
'appointmentList'));
966 $ilCtrl->setParameter($this,
'user_id',
'');
968 $ilTabs->addTab(
'ch_settings', $this->lng->txt(
'settings'), $this->ctrl->getLinkTarget($this,
'settings'));
970 $ilTabs->activateTab(
'consultation_hours_'.$this->
getUserId());
983 $ilTabs->addSubTab(
'cal_ch_app_list',$this->lng->txt(
'cal_ch_app_list'),
$ilCtrl->getLinkTarget($this,
'appointmentList'));
984 $ilTabs->addSubTab(
'cal_ch_app_grp',$this->lng->txt(
'cal_ch_app_grp'),
$ilCtrl->getLinkTarget($this,
'groupList'));
985 $ilTabs->addSubTab(
'cal_ch_app_bookings',$this->lng->txt(
'cal_ch_app_bookings'),
$ilCtrl->getLinkTarget($this,
'bookingList'));
995 if(!isset($_REQUEST[
'apps']))
1003 if($_REQUEST[
'apps'] && !is_array($_REQUEST[
'apps']))
1005 $_REQUEST[
'apps'] = explode(
';', $_REQUEST[
'apps']);
1009 $hidden->setValue(implode(
';', $_REQUEST[
'apps']));
1010 $this->form->addItem($hidden);
1012 include_once
'Services/Calendar/classes/class.ilCalendarEntry.php';
1013 $first = $_REQUEST[
'apps'];
1014 $first = array_shift($_REQUEST[
'apps']);
1017 $this->form->getItemByPostVar(
'ti')->setValue($entry->getTitle());
1018 $this->form->getItemByPostVar(
'lo')->setValue($entry->getLocation());
1019 $this->form->getItemByPostVar(
'de')->setValue($entry->getDescription());
1021 include_once
'Services/Booking/classes/class.ilBookingEntry.php';
1024 $this->form->getItemByPostVar(
'bo')->setValue(
$booking->getNumberOfBookings());
1027 foreach(
$booking->getTargetObjIds() as $obj_id)
1030 $ref_ids[] = end($refs);
1032 $this->form->getItemByPostVar(
'tgt')->setValue(implode(
',',$ref_ids));
1034 $deadline =
$booking->getDeadlineHours();
1035 $this->form->getItemByPostVar(
'dead')->setDays(floor($deadline/24));
1036 $this->form->getItemByPostVar(
'dead')->setHours($deadline%24);
1040 $this->form->getItemByPostVar(
'grp')->setValue(
$booking->getBookingGroup());
1043 $this->tpl->setContent($this->form->getHTML());
1052 global $ilObjDataCache;
1056 if($this->form->checkInput())
1058 $this->form->setValuesByPost();
1059 $apps = explode(
';',
$_POST[
'apps']);
1061 include_once
'Services/Booking/classes/class.ilBookingEntry.php';
1062 include_once
'Services/Calendar/classes/class.ilCalendarEntry.php';
1067 $first = array_shift($first);
1069 #if($this->form->getInput('bo') < $entry->getNumberOfBookings())
1079 $booking->setNumberOfBookings($this->form->getInput(
'bo'));
1081 $deadline = $this->form->getInput(
'dead');
1082 $deadline = $deadline[
'dd']*24+$deadline[
'hh'];
1083 $booking->setDeadlineHours($deadline);
1085 $tgt = explode(
',',$this->form->getInput(
'tgt'));
1087 foreach((array) $tgt as
$ref_id)
1093 $obj_id = $ilObjDataCache->lookupObjId(
$ref_id);
1095 $valid_types = array(
'crs',
'grp');
1096 if(!$obj_id or !in_array($type, $valid_types))
1102 $obj_ids[] = $obj_id;
1104 $booking->setTargetObjIds($obj_ids);
1106 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroups.php';
1109 $booking->setBookingGroup($this->form->getInput(
'grp'));
1115 $title = $this->form->getInput(
'ti');
1116 $location = $this->form->getInput(
'lo');
1117 $description = $this->form->getInput(
'de');
1119 foreach($apps as $item_id)
1122 $entry->setContextId(
$booking->getId());
1123 $entry->setTitle(
$title);
1125 $entry->setDescription($description);
1132 $this->ctrl->redirect($this,
'appointmentList');
1134 $this->tpl->setContent($this->form->getHTML());
1144 if(!isset($_REQUEST[
'apps']))
1150 include_once(
'./Services/Utilities/classes/class.ilConfirmationGUI.php');
1153 $this->ctrl->saveParameter($this,array(
'seed',
'app_id',
'dt'));
1156 $confirm->setFormAction($this->ctrl->getFormAction($this));
1157 $confirm->setHeaderText($this->lng->txt(
'cal_delete_app_sure'));
1158 $confirm->setCancel($this->lng->txt(
'cancel'),
'cancel');
1160 include_once
'Services/Calendar/classes/class.ilCalendarEntry.php';
1162 $bookings_available = array();
1163 foreach((array) $_REQUEST[
'apps'] as $entry_id)
1168 include_once
'./Services/Booking/classes/class.ilBookingEntry.php';
1175 if($bookings_available)
1177 ilUtil::sendInfo($this->lng->txt(
'cal_ch_delete_app_booking_info').
'<br />'.implode(
'<br />',$bookings_available));
1180 $confirm->setConfirm($this->lng->txt(
'delete'),
'delete');
1181 $confirm->setCancel($this->lng->txt(
'cancel'),
'appointmentList');
1183 $tpl->setContent($confirm->getHTML());
1189 public function delete()
1191 if(!isset(
$_POST[
'apps']))
1197 include_once
'Services/Calendar/classes/class.ilCalendarEntry.php';
1198 include_once
'Services/Calendar/classes/class.ilCalendarCategoryAssignments.php';
1199 foreach(
$_POST[
'apps'] as $entry_id)
1207 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourUtils.php';
1212 include_once
'./Services/Calendar/classes/class.ilCalendarEntry.php';
1222 $this->ctrl->redirect($this,
'appointmentList');
1232 $ilTabs->clearTargets();
1236 include_once
'Services/User/classes/class.ilPublicUserProfileGUI.php';
1239 $tpl->setContent(
$ilCtrl->getHTML($profile));
1250 if(isset($_REQUEST[
"ref_id"]))
1252 $url = $this->ctrl->getLinkTargetByClass(
'ilCalendarMonthGUI');
1255 else if(isset(
$_GET[
'panel']))
1257 $url = $this->ctrl->getLinkTargetByClass(
'ilCalendarPresentationGUI');
1262 $url = $this->ctrl->getLinkTarget($this,
'appointmentList');
1272 global
$tpl, $ilTabs, $ilHelp;
1274 $ilHelp->setScreenId(
"consultation_hours_settings");
1275 $ilTabs->activateTab(
'ch_settings');
1278 $tpl->setContent($form->getHTML());
1289 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
1292 $form->setFormAction($this->ctrl->getFormAction($this));
1294 $mng =
new ilTextInputGUI($this->lng->txt(
'cal_ch_manager'),
'mng');
1295 $mng->setInfo($this->lng->txt(
'cal_ch_manager_info'));
1296 $form->addItem($mng);
1300 $form->setTitle($this->lng->txt(
'settings'));
1301 $form->addCommandButton(
'updateSettings', $this->lng->txt(
'save'));
1314 if($form->checkInput())
1316 $mng = $form->getInput(
'mng');
1320 $ilCtrl->redirect($this,
'settings');
1324 $ilTabs->activateTab(
'ch_settings');
1327 $field = $form->getItemByPostVar(
'mng');
1328 $field->setValue($mng);
1329 $tpl->setContent($form->getHTML());
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
An exception for terminatinating execution or to throw for unit testing.
const IL_CAL_TRANSLATION_SYSTEM
const IL_CAL_FREQ_MONTHLY
static lookupBookingsOfUser($a_app_ids, $a_usr_id, ilDateTime $start=null)
Lookup bookings if user.
static getInstanceByCalendarEntryId($a_id)
Get instance by calendar entry.
static removeObsoleteEntries()
Remove unused booking entries.
static lookupBookingsForAppointment($a_app_id)
Lookup booked users for appointment @global type $ilDB.
Booking period Used for calculation of recurring events.
static _deleteByAppointmentId($a_app_id)
Delete appointment assignment.
Model for a calendar entry.
Calculates an ilDateList for a given calendar entry and recurrence rule.
static initDefaultCalendarByType($a_type_id, $a_usr_id, $a_title, $a_create=false)
Init the default calendar for given type and user.
Confirmation screen class.
static getAppointmentIdsByGroup($a_user_id, $a_ch_group_id, ilDateTime $start=null)
Get appointment ids by consultation hour group.
static getManager($a_as_name=false)
Get consultation hour manager for current user.
static getManagedUsers()
Get all managed consultation hours users for current users.
static setManager($a_user_name)
Set consultation hour manager for current user.
static getAppointmentIds($a_user_id, $a_context_id=NULL, $a_start=NULL, $a_type=NULL, $a_check_owner=true)
Get all appointment ids.
static getGroupsOfUser($a_user_id)
Get a all groups of an user.
static getCountGroupsOfUser($a_user_id)
Get number of consultation hour groups @global type $ilDB.
static getGroupSelectOptions($a_user_id)
Get group selection options.
static cancelBooking($a_usr_id, $a_app_id, $a_send_notification=true)
Cancel a booking.
static bookAppointment($a_usr_id, $a_app_id)
Book an appointment.
Consultation hours editor.
const MAX_APPOINTMENTS_PER_SEQUENCE
editGroup(ilPropertyFormGUI $form=null)
Edit group @global type $ilCtrl.
deleteGroup()
Delete groups.
confirmDelete()
confirm delete for multiple entries
updateGroup()
Update group @global type $ilCtrl @global type $tpl @global type $ilTabs.
rejectBooking($a_send_notification=true)
appointmentList()
Show settings of consultation hours.
groupList()
Show consultation hour group @global type $ilToolbar.
edit()
Edit multiple sequence items.
initFormSequence($a_mode)
Init form.
confirmRejectBooking($a_send_notification=true)
Show delete booking confirmation.
addGroup(ilPropertyFormGUI $form=null)
Show add group form @global type $ilToolbar @global type $ilTabs.
showProfile()
show public profile of given user
sendInfoAboutUnassignedUsers($unassigned)
Send info message about unassigned users.
createSequence()
Create new sequence.
updateSettings()
save settings
deleteBooking()
Delete booking.
initSettingsForm()
build settings form
searchUsersForAppointments()
start searching for users
assignUsersToAppointments(array $users)
Assign users to multiple appointments.
bookingList()
Show list of bookings.
assignUsersToGroup(array $usr_ids)
updateMulti()
Update multiple sequence items.
settings()
display settings gui
confirmDeleteBooking()
Show delete booking confirmation.
assignUsersToAppointment(array $users, $a_app=0, $a_redirect=true)
Assign users to an appointment.
initGroupForm($a_group_id=0)
Init new/update group form.
saveSequence()
Save new sequence.
setSubTabs()
Set sub tabs @global type $ilTabs @global type $ilCtrl.
saveGroup()
Save new group.
executeCommand()
Execute command.
__construct()
Constructor.
createAppointments(ilBookingEntry $booking)
Create calendar appointments.
confirmDeleteGroup()
Confirm delete @global type $ilCtrl @global type $ilTabs.
getProfileBackUrl()
Build context-sensitive profile back url.
Consultation hours administration.
static formatDate(ilDateTime $date)
Format a date @access public.
@classDescription Date and time handling
static _lookupFullname($a_user_id)
Lookup Full Name.
static _getAllReferences($a_id)
get all reference ids of object
static _lookupType($a_id, $a_reference=false)
lookup object type
GUI class for public user profile presentation.
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, $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)
Default behaviour is:
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static initDomEvent()
Init YUI DomEvent.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
const IL_CAL_FREQ_DAILY
Model of calendar entry recurrcences.
if(!is_array($argv)) $options