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');
 
   92                                $ret = $ilCtrl->forwardCommand($profile);
 
   96                        case 'ilrepositorysearchgui':
 
   98                                include_once(
'./Services/Search/classes/class.ilRepositorySearchGUI.php');
 
  103                                        $rep_search->setCallback(
 
  105                                                'assignUsersToAppointments',
 
  108                                        $ilCtrl->setParameter($this,
'assignM',1);
 
  109                                        $ilCtrl->setReturn($this,
'appointmentList');
 
  110                                        $ilTabs->activateSubTab(
'cal_ch_app_list');
 
  114                                        $rep_search->setCallback(
 
  116                                                'assignUsersToGroup',
 
  119                                        $ilCtrl->saveParameter($this,
'grp_id');
 
  120                                        $ilCtrl->setReturn($this,
'groupList');
 
  121                                        $ilTabs->activateSubTab(
'cal_ch_app_grp');
 
  125                                        $rep_search->setCallback(
 
  127                                                'assignUsersToAppointment',
 
  130                                        $ilCtrl->saveParameter($this,
'apps');
 
  131                                        $ilCtrl->setReturn($this,
'appointmentList');
 
  132                                        $ilTabs->activateSubTab(
'cal_ch_app_list');
 
  134                                $ilCtrl->forwardCommand($rep_search);
 
  138                                $tpl->setTitle($this->lng->txt(
"cal_ch_form_header")); 
 
  141                                if($ilUser->getId() != $this->user_id)
 
  143                                        $ilCtrl->setParameter($this, 
'user_id', $this->user_id);
 
  146                                $cmd = $this->ctrl->getCmd(
'appointmentList');
 
  172                        $GLOBALS[
'ilCtrl']->redirect($this,
'appointmentList');
 
  175                $ilCtrl->setCmdClass(
'ilrepositorysearchgui');
 
  193                        include_once 
'./Services/User/classes/class.ilObjUser.php';
 
  196                ilUtil::sendInfo($this->lng->txt(
'cal_ch_user_assignment_failed_info').
'<br />'.implode(
'<br />', $users),
true);
 
  208                $unassigned_users = array();
 
  211                        $unassigned_users = array_unique(array_merge($unassigned_users,$this->
assignUsersToAppointment($users,$app,
false)));
 
  215                $ilCtrl->redirect($this,
'appointmentList');
 
  237                include_once 
'./Services/Booking/classes/class.ilBookingEntry.php';
 
  240                $assigned_users = array();
 
  241                foreach($users as $user)
 
  243                        if(
$booking->getCurrentNumberOfBookings($app) >= 
$booking->getNumberOfBookings())
 
  249                                include_once 
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourUtils.php';
 
  251                                $assigned_users[] = $user;
 
  255                $unassigned_users = array_diff($users, $assigned_users);
 
  260                        $ilCtrl->redirect($this,
'appointmentList');
 
  264                        return $unassigned_users;
 
  284                include_once 
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourAppointments.php';
 
  285                include_once 
'./Services/Booking/classes/class.ilBookingEntry.php';
 
  292                $assigned_users = array();
 
  293                foreach($apps as $app)
 
  296                        foreach($users as $user)
 
  298                                if(
$booking->getCurrentNumberOfBookings($app) >= 
$booking->getNumberOfBookings())
 
  304                                        include_once 
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourUtils.php';
 
  306                                        $assigned_users[] = $user;
 
  312                $ilCtrl->redirect($this,
'bookingList');
 
  322                global $ilToolbar, $ilTabs, 
$tpl;
 
  324                $ilToolbar->setFormAction($this->ctrl->getFormAction($this));
 
  325                $ilToolbar->addButton($this->lng->txt(
'cal_ch_add_grp'),$this->ctrl->getLinkTarget($this,
'addGroup'));
 
  328                $ilTabs->activateSubTab(
'cal_ch_app_grp');
 
  330                include_once 
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroupTableGUI.php';
 
  331                include_once 
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroups.php';
 
  335                $tpl->setContent($gtbl->getHTML());
 
  345                global $ilTabs, 
$tpl;
 
  348                $ilTabs->activateSubTab(
'cal_ch_app_grp');
 
  354                $tpl->setContent($form->getHTML());
 
  363                if($form->checkInput())
 
  365                        include_once 
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroup.php';
 
  367                        $group->setTitle($form->getInput(
'title'));
 
  368                        $group->setMaxAssignments($form->getInput(
'multiple'));
 
  373                        $GLOBALS[
'ilCtrl']->redirect($this,
'groupList');
 
  391                $ilTabs->activateSubTab(
'cal_ch_app_grp');
 
  397                $tpl->setContent($form->getHTML());
 
  413                if($form->checkInput())
 
  415                        include_once 
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroup.php';
 
  417                        $group->setTitle($form->getInput(
'title'));
 
  418                        $group->setMaxAssignments($form->getInput(
'multiple'));
 
  423                        $GLOBALS[
'ilCtrl']->redirect($this,
'groupList');
 
  440                $groups = array((
int) 
$_REQUEST[
'grp_id']);
 
  443                $ilTabs->activateSubTab(
'cal_ch_app_grp');
 
  446                include_once 
'./Services/Utilities/classes/class.ilConfirmationGUI.php';
 
  448                $confirm->setFormAction(
$ilCtrl->getFormAction($this));
 
  449                $confirm->setHeaderText(
$GLOBALS[
'lng']->txt(
'cal_ch_grp_delete_sure'));
 
  450                $confirm->setConfirm(
$GLOBALS[
'lng']->txt(
'delete'), 
'deleteGroup');
 
  451                $confirm->setCancel(
$GLOBALS[
'lng']->txt(
'cancel'), 
'groupList');
 
  453                foreach($groups as $grp_id)
 
  455                        include_once 
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroup.php';
 
  458                        $confirm->addItem(
'groups[]', $grp_id, $group->getTitle());
 
  460                $tpl->setContent($confirm->getHTML());
 
  470                foreach((array) 
$_REQUEST[
'groups'] as $grp_id)
 
  472                        include_once 
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroup.php';
 
  477                $ilCtrl->redirect($this,
'groupList');
 
  485                include_once 
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroup.php';
 
  488                include_once 
'Services/Form/classes/class.ilPropertyFormGUI.php';
 
  490                $form->setFormAction(
$GLOBALS[
'ilCtrl']->getFormAction($this));
 
  494                        $form->setTitle(
$GLOBALS[
'lng']->txt(
'cal_ch_grp_update_tbl'));
 
  495                        $form->addCommandButton(
'updateGroup', 
$GLOBALS[
'lng']->txt(
'save'));
 
  496                        $form->addCommandButton(
'groupList', 
$GLOBALS[
'lng']->txt(
'cancel'));
 
  500                        $form->setTitle(
$GLOBALS[
'lng']->txt(
'cal_ch_grp_add_tbl'));
 
  501                        $form->addCommandButton(
'saveGroup', 
$GLOBALS[
'lng']->txt(
'save'));
 
  502                        $form->addCommandButton(
'appointmentList', 
$GLOBALS[
'lng']->txt(
'cancel'));
 
  506                $title->setMaxLength(128);
 
  508                $title->setRequired(
true);
 
  509                $title->setValue($group->getTitle());
 
  510                $form->addItem($title);
 
  513                $multiple->setRequired(
true);
 
  514                $multiple->setMinValue(1);
 
  515                $multiple->setSize(1);
 
  516                $multiple->setMaxLength(2);
 
  517                $multiple->setInfo(
$GLOBALS[
'lng']->txt(
'cal_ch_grp_multiple_info'));
 
  518                $multiple->setValue($group->getMaxAssignments());
 
  519                $form->addItem($multiple);
 
  529                global $ilToolbar, $ilTabs, 
$tpl;
 
  532                $ilTabs->activateSubTab(
'cal_ch_app_bookings');
 
  534                include_once 
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourBookingTableGUI.php';
 
  537                $tpl->setContent($btable->getHTML());
 
  553                global $ilTabs, 
$tpl;
 
  556                $ilTabs->activateSubTab(
'cal_ch_app_bookings');
 
  558                include_once(
'./Services/Utilities/classes/class.ilConfirmationGUI.php');
 
  561                $confirm->setFormAction($this->ctrl->getFormAction($this));
 
  563                if($a_send_notification)
 
  566                        $confirm->setHeaderText($this->lng->txt(
'cal_ch_cancel_booking_sure'));
 
  567                        $confirm->setConfirm($this->lng->txt(
'cal_ch_reject_booking'), 
'rejectBooking');
 
  572                        $confirm->setHeaderText($this->lng->txt(
'cal_ch_delete_booking_sure'));
 
  573                        $confirm->setConfirm($this->lng->txt(
'cal_ch_delete_booking'), 
'deleteBooking');
 
  576                $confirm->setCancel($this->lng->txt(
'cancel'),
'bookingList');
 
  578                include_once 
'Services/Calendar/classes/class.ilCalendarEntry.php';
 
  579                foreach((array) 
$_REQUEST[
'bookuser'] as $bookuser)
 
  581                        $ids = explode(
'_',$bookuser);
 
  583                        include_once 
'./Services/Calendar/classes/class.ilCalendarEntry.php';
 
  584                        include_once 
'./Services/User/classes/class.ilUserUtil.php';
 
  599                $tpl->setContent($confirm->getHTML());
 
  618                foreach((array) 
$_REQUEST[
'bookuser'] as $bookuser)
 
  620                        $ids = explode(
'_',$bookuser);
 
  622                        include_once 
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourUtils.php';
 
  625                if($a_send_notification)
 
  633                $ilCtrl->redirect($this,
'bookingList');
 
  643                global $ilToolbar, $ilHelp, $ilTabs;
 
  645                $ilHelp->setScreenId(
"consultation_hours");
 
  647                $ilToolbar->setFormAction($this->ctrl->getFormAction($this));
 
  648                $ilToolbar->addButton($this->lng->txt(
'cal_ch_add_sequence'),$this->ctrl->getLinkTarget($this,
'createSequence'));
 
  651                $ilTabs->activateSubTab(
'cal_ch_app_list');
 
  653                include_once 
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHoursTableGUI.php';
 
  656                $this->tpl->setContent(
$tbl->getHTML());
 
  668                $this->form->getItemByPostVar(
'bo')->setValue($this->booking->getNumberOfBookings());   
 
  669                $this->form->getItemByPostVar(
'ap')->setValue(1);
 
  670                $this->form->getItemByPostVar(
'du')->setMinutes(15);
 
  671                $this->form->getItemByPostVar(
'st')->setDate(
 
  674                $this->tpl->setContent($this->form->getHTML());
 
  684                include_once 
'./Services/Form/classes/class.ilPropertyFormGUI.php';
 
  686                include_once(
'./Services/YUI/classes/class.ilYuiUtil.php');
 
  690                $this->form->setFormAction($this->ctrl->getFormAction($this));
 
  695                                $this->form->setTitle($this->lng->txt(
'cal_ch_add_sequence'));
 
  696                                $this->form->addCommandButton(
'saveSequence', $this->lng->txt(
'save'));
 
  697                                $this->form->addCommandButton(
'appointmentList', $this->lng->txt(
'cancel'));
 
  709                                $this->form->setTitle($this->lng->txt(
'cal_ch_multi_edit_sequence'));
 
  710                                $this->form->addCommandButton(
'updateMulti', $this->lng->txt(
'save'));
 
  711                                $this->form->addCommandButton(
'appointmentList', $this->lng->txt(
'cancel'));
 
  716                include_once 
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroups.php';
 
  719                        $group = 
new ilSelectInputGUI($this->lng->txt(
'cal_ch_grp_selection'),
'grp');
 
  721                        $group->setRequired(
false);
 
  722                        $this->form->addItem($group);
 
  728                $ti->setMaxLength(128);
 
  729                $ti->setRequired(
true);
 
  730                $this->form->addItem($ti);
 
  732                if($a_mode != self::MODE_MULTI)
 
  735                        include_once 
'./Services/Form/classes/class.ilDateTimeInputGUI.php';
 
  737                        $dur->setShowTime(
true);
 
  738                        $dur->setMinuteStepSize(5);
 
  739                        $this->form->addItem($dur);
 
  743                        $du->setShowMinutes(
true);
 
  744                        $du->setShowHours(
true);
 
  745                        $this->form->addItem($du);
 
  748                        $nu = 
new ilNumberInputGUI($this->lng->txt(
'cal_ch_num_appointments'),
'ap');
 
  749                        $nu->setInfo($this->lng->txt(
'cal_ch_num_appointments_info'));
 
  751                        $nu->setMaxLength(2);
 
  752                        $nu->setRequired(
true);
 
  754                        $this->form->addItem($nu);
 
  757                        include_once(
'./Services/Calendar/classes/Form/class.ilRecurrenceInputGUI.php');
 
  759                        $rec->setEnabledSubForms(
 
  766                        $this->form->addItem($rec);
 
  772                $nu->setMaxLength(2);
 
  774                $nu->setRequired(
true);
 
  775                $this->form->addItem($nu);
 
  779                $dead->setInfo($this->lng->txt(
'cal_ch_deadline_info'));
 
  780                $dead->setShowMinutes(
false);
 
  781                $dead->setShowHours(
true);
 
  782                $dead->setShowDays(
true);
 
  783                $this->form->addItem($dead);
 
  788                $lo->setMaxLength(128);
 
  789                $this->form->addItem($lo);
 
  795                $this->form->addItem($de);
 
  798                $tgt = 
new ilTextInputGUI($this->lng->txt(
'cal_ch_target_object'),
'tgt');
 
  799                $tgt->setInfo($this->lng->txt(
'cal_ch_target_object_info'));
 
  801                $tgt->setMaxLength(128);
 
  802                $this->form->addItem($tgt);
 
  811                global $ilObjDataCache;
 
  815                if($this->form->checkInput())
 
  817                        $this->form->setValuesByPost();
 
  821                        $booking->setNumberOfBookings($this->form->getInput(
'bo'));
 
  823                        $deadline = $this->form->getInput(
'dead');
 
  824                        $deadline = $deadline[
'dd'] * 24 + $deadline[
'hh'];
 
  825                        $booking->setDeadlineHours($deadline);
 
  828                        include_once 
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroups.php';
 
  831                                $booking->setBookingGroup((
int) $this->form->getInput(
'grp'));
 
  834                        $tgt = explode(
',',$this->form->getInput(
'tgt'));
 
  836                        foreach((array) $tgt as 
$ref_id)
 
  842                                $obj_id = $ilObjDataCache->lookupObjId(
$ref_id);
 
  844                                $valid_types = array(
'crs',
'grp');
 
  845                                if(!$obj_id or !in_array($type, $valid_types))
 
  848                                        $this->tpl->setContent($this->form->getHTML());
 
  852                                $obj_ids[] = $obj_id;
 
  854                        $booking->setTargetObjIds($obj_ids);
 
  860                        $this->ctrl->redirect($this,
'appointmentList');
 
  864                        $this->form->setValuesByPost();
 
  865                        $this->tpl->setContent($this->form->getHTML());
 
  876                include_once 
'./Services/Calendar/classes/class.ilDateList.php';
 
  878                $start = clone $this->form->getItemByPostVar(
'st')->getDate();
 
  879                for($i = 0; $i < $this->form->getItemByPostVar(
'ap')->getValue(); $i++)
 
  881                        $concurrent_dates->add(clone $start);
 
  883                        $start->increment(
ilDateTime::MINUTE,$this->form->getItemByPostVar(
'du')->getMinutes());
 
  884                        $start->increment(
ilDateTime::HOUR,$this->form->getItemByPostVar(
'du')->getHours());
 
  885                        #$start = new ilDateTime(,IL_CAL_UNIX); 
  888                include_once 
'./Services/Calendar/classes/class.ilCalendarUtil.php';
 
  892                include_once 
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php';
 
  893                include_once 
'./Services/Calendar/classes/class.ilCalendarEntry.php';
 
  894                include_once 
'./Services/Calendar/classes/class.ilCalendarRecurrenceCalculator.php';
 
  895                include_once 
'./Services/Booking/classes/class.ilBookingPeriod.php';
 
  897                $num_appointments = 0;
 
  898                foreach($concurrent_dates as $dt)
 
  900                        if($num_appointments >= self::MAX_APPOINTMENTS_PER_SEQUENCE)
 
  906                        $end->increment(
ilDateTime::MINUTE,$this->form->getItemByPostVar(
'du')->getMinutes());
 
  907                        $end->increment(
ilDateTime::HOUR,$this->form->getItemByPostVar(
'du')->getHours());
 
  911                                $this->form->getItemByPostVar(
'frequence')->getRecurrence()
 
  918                        $date_list = $calc->calculateDateList($dt,$limit);
 
  921                        foreach($date_list as $app_start)
 
  923                                $app_end = clone $app_start;
 
  924                                $app_end->increment(
ilDateTime::MINUTE,$this->form->getItemByPostVar(
'du')->getMinutes());
 
  925                                $app_end->increment(
ilDateTime::HOUR,$this->form->getItemByPostVar(
'du')->getHours());
 
  929                                $entry->setContextId(
$booking->getId());
 
  930                                $entry->setTitle($this->form->getInput(
'ti'));
 
  931                                $entry->setSubtitle(
"#consultationhour#"); 
 
  932                                $entry->setDescription($this->form->getInput(
'de'));
 
  933                                $entry->setLocation($this->form->getInput(
'lo'));
 
  934                                $entry->setStart($app_start);
 
  935                                $entry->setEnd($app_end);
 
  941                                $cat_assign->addAssignment($def_cat->getCategoryID());
 
  956                $ilCtrl->setParameter($this, 
'user_id', 
'');
 
  957                $ilTabs->addTab(
'consultation_hours_'.
$ilUser->getId(), $this->lng->txt(
'cal_ch_ch'), $this->ctrl->getLinkTarget($this,
'appointmentList'));
 
  962                        $ilTabs->addTab(
'consultation_hours_'.
$user_id, $this->lng->txt(
'cal_ch_ch').
': '.$login, $this->ctrl->getLinkTarget($this,
'appointmentList'));                 
 
  964                $ilCtrl->setParameter($this, 
'user_id', 
'');
 
  966                $ilTabs->addTab(
'ch_settings', $this->lng->txt(
'settings'), $this->ctrl->getLinkTarget($this,
'settings'));
 
  968                $ilTabs->activateTab(
'consultation_hours_'.$this->
getUserId());
 
  981                $ilTabs->addSubTab(
'cal_ch_app_list',$this->lng->txt(
'cal_ch_app_list'),
$ilCtrl->getLinkTarget($this,
'appointmentList'));
 
  982                $ilTabs->addSubTab(
'cal_ch_app_grp',$this->lng->txt(
'cal_ch_app_grp'),
$ilCtrl->getLinkTarget($this,
'groupList'));
 
  983                $ilTabs->addSubTab(
'cal_ch_app_bookings',$this->lng->txt(
'cal_ch_app_bookings'),
$ilCtrl->getLinkTarget($this,
'bookingList'));
 
 1007                $hidden->setValue(implode(
';', 
$_REQUEST[
'apps']));
 
 1008                $this->form->addItem($hidden);
 
 1010                include_once 
'Services/Calendar/classes/class.ilCalendarEntry.php';
 
 1012                $first = array_shift(
$_REQUEST[
'apps']);
 
 1015                $this->form->getItemByPostVar(
'ti')->setValue($entry->getTitle());
 
 1016                $this->form->getItemByPostVar(
'lo')->setValue($entry->getLocation());
 
 1017                $this->form->getItemByPostVar(
'de')->setValue($entry->getDescription());
 
 1019                include_once 
'Services/Booking/classes/class.ilBookingEntry.php';
 
 1022                $this->form->getItemByPostVar(
'bo')->setValue(
$booking->getNumberOfBookings());
 
 1025                foreach(
$booking->getTargetObjIds() as $obj_id)
 
 1028                        $ref_ids[] = end($refs);
 
 1030                $this->form->getItemByPostVar(
'tgt')->setValue(implode(
',',$ref_ids));
 
 1032                $deadline = 
$booking->getDeadlineHours();
 
 1033                $this->form->getItemByPostVar(
'dead')->setDays(floor($deadline/24));
 
 1034                $this->form->getItemByPostVar(
'dead')->setHours($deadline%24);
 
 1038                        $this->form->getItemByPostVar(
'grp')->setValue(
$booking->getBookingGroup());
 
 1041                $this->tpl->setContent($this->form->getHTML());
 
 1050                global $ilObjDataCache;
 
 1054                if($this->form->checkInput())
 
 1056                        $this->form->setValuesByPost();
 
 1057                        $apps = explode(
';', 
$_POST[
'apps']);
 
 1059                        include_once 
'Services/Booking/classes/class.ilBookingEntry.php';
 
 1060                        include_once 
'Services/Calendar/classes/class.ilCalendarEntry.php';
 
 1065                        $first = array_shift($first);
 
 1067                        #if($this->form->getInput('bo') < $entry->getNumberOfBookings()) 
 1077                        $booking->setNumberOfBookings($this->form->getInput(
'bo'));
 
 1079                        $deadline = $this->form->getInput(
'dead');
 
 1080                        $deadline = $deadline[
'dd']*24+$deadline[
'hh'];
 
 1081                        $booking->setDeadlineHours($deadline);
 
 1083                        $tgt = explode(
',',$this->form->getInput(
'tgt'));
 
 1085                        foreach((array) $tgt as 
$ref_id)
 
 1091                                $obj_id = $ilObjDataCache->lookupObjId(
$ref_id);
 
 1093                                $valid_types = array(
'crs',
'grp');
 
 1094                                if(!$obj_id or !in_array($type, $valid_types))
 
 1100                                $obj_ids[] = $obj_id;
 
 1102                        $booking->setTargetObjIds($obj_ids);
 
 1104                        include_once 
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroups.php';
 
 1107                                $booking->setBookingGroup($this->form->getInput(
'grp'));
 
 1113                        $title = $this->form->getInput(
'ti');
 
 1114                        $location = $this->form->getInput(
'lo');
 
 1115                        $description = $this->form->getInput(
'de');
 
 1117                        foreach($apps as $item_id)
 
 1120                                $entry->setContextId(
$booking->getId());
 
 1121                                $entry->setTitle($title);
 
 1123                                $entry->setDescription($description);
 
 1130                        $this->ctrl->redirect($this,
'appointmentList');
 
 1132                $this->tpl->setContent($this->form->getHTML());
 
 1148                include_once(
'./Services/Utilities/classes/class.ilConfirmationGUI.php');
 
 1151                $this->ctrl->saveParameter($this,array(
'seed',
'app_id',
'dt'));
 
 1154                $confirm->setFormAction($this->ctrl->getFormAction($this));
 
 1155                $confirm->setHeaderText($this->lng->txt(
'cal_delete_app_sure'));
 
 1156                $confirm->setCancel($this->lng->txt(
'cancel'),
'cancel');
 
 1158                include_once 
'Services/Calendar/classes/class.ilCalendarEntry.php';
 
 1160                $bookings_available = array();
 
 1161                foreach((array) 
$_REQUEST[
'apps'] as $entry_id)
 
 1166                        include_once 
'./Services/Booking/classes/class.ilBookingEntry.php';
 
 1173                if($bookings_available)
 
 1175                        ilUtil::sendInfo($this->lng->txt(
'cal_ch_delete_app_booking_info').
'<br />'.implode(
'<br />',$bookings_available));
 
 1178                $confirm->setConfirm($this->lng->txt(
'delete'),
'delete');
 
 1179                $confirm->setCancel($this->lng->txt(
'cancel'),
'appointmentList');
 
 1181                $tpl->setContent($confirm->getHTML());
 
 1187        public function delete()
 
 1189                if(!isset(
$_POST[
'apps']))
 
 1195                include_once 
'Services/Calendar/classes/class.ilCalendarEntry.php';
 
 1196                include_once 
'Services/Calendar/classes/class.ilCalendarCategoryAssignments.php';
 
 1197                foreach(
$_POST[
'apps'] as $entry_id)
 
 1205                                        include_once 
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourUtils.php';
 
 1210                        include_once 
'./Services/Calendar/classes/class.ilCalendarEntry.php';
 
 1220                $this->ctrl->redirect($this, 
'appointmentList');
 
 1230                $ilTabs->clearTargets();
 
 1234                include_once 
'Services/User/classes/class.ilPublicUserProfileGUI.php';
 
 1237                $tpl->setContent(
$ilCtrl->getHTML($profile));
 
 1250                        $url = $this->ctrl->getLinkTargetByClass(
'ilCalendarMonthGUI');
 
 1253                else if(isset(
$_GET[
'panel']))
 
 1255                        $url = $this->ctrl->getLinkTargetByClass(
'ilCalendarPresentationGUI');
 
 1260                        $url = $this->ctrl->getLinkTarget($this, 
'appointmentList');
 
 1270                global 
$tpl, $ilTabs, $ilHelp;
 
 1272                $ilHelp->setScreenId(
"consultation_hours_settings");
 
 1273                $ilTabs->activateTab(
'ch_settings');
 
 1276                $tpl->setContent($form->getHTML());
 
 1287                include_once 
'./Services/Form/classes/class.ilPropertyFormGUI.php';
 
 1290                $form->setFormAction($this->ctrl->getFormAction($this));
 
 1292                $mng = 
new ilTextInputGUI($this->lng->txt(
'cal_ch_manager'), 
'mng');
 
 1293                $mng->setInfo($this->lng->txt(
'cal_ch_manager_info'));
 
 1294                $form->addItem($mng);
 
 1298                $form->setTitle($this->lng->txt(
'settings'));
 
 1299                $form->addCommandButton(
'updateSettings', $this->lng->txt(
'save'));
 
 1312                if($form->checkInput())
 
 1314                        $mng = $form->getInput(
'mng');
 
 1318                                $ilCtrl->redirect($this, 
'settings');
 
 1322                                $ilTabs->activateTab(
'ch_settings');
 
 1325                                $field = $form->getItemByPostVar(
'mng');
 
 1326                                $field->setValue($mng);
 
 1327                                $tpl->setContent($form->getHTML());
 
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
_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.
const IL_CAL_FREQ_DAILY
Model of calendar entry recurrcences.
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
if(!is_array($argv)) $options