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';
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);
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"));
132 if ($ilUser->getId() != $this->user_id) {
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'];
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');
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));
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'));
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';
696 $dur->setShowTime(
true);
697 $dur->setRequired(
true);
698 $this->form->addItem($dur);
702 $du->setShowMinutes(
true);
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');
718 $rec->setEnabledSubForms(
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()
867 $date_list = $calc->calculateDateList($dt, $limit);
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);
889 $cat_assign->addAssignment($def_cat->getCategoryID());
904 $ilCtrl->setParameter($this,
'user_id',
'');
905 $ilTabs->addTab(
'consultation_hours_' .
$ilUser->getId(), $this->lng->txt(
'cal_ch_ch'), $this->ctrl->getLinkTarget($this,
'appointmentList'));
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());
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);
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
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 getAppointmentIds($a_user_id, $a_context_id=null, $a_start=null, $a_type=null, $a_check_owner=true)
Get all appointment ids.
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, $a_full_name=false, $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($a_user_name)
Set consultation hour manager for current user.
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 findCalendarAppointmentsForBooking(\ilBookingEntry $booking, \ilDateTime $start, \ilDateTime $end)
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)
rewriteBookingIdsForAppointments(\ilBookingEntry $booking, $appointments, \ilPropertyFormGUI $form)
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.
createNewBookingEntry(\ilPropertyFormGUI $validate_form)
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, $a_skip_day=false, $a_include_wd=false)
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, $a_ctrl_path="ilpublicuserprofilegui")
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(isset($_POST['submit'])) $form