84 $this->user_id = $a_user_id;
86 $this->lng = $DIC->language();
87 $this->lng->loadLanguageModule(
'dateplaner');
88 $this->lng->loadLanguageModule(
'dash');
89 $this->ctrl = $DIC->ctrl();
90 $this->ref_id = $a_ref_id;
92 $this->tabs = $DIC->tabs();
93 $this->tpl = $DIC->ui()->mainTemplate();
95 $this->lng->loadLanguageModule(
"dateplaner");
97 if (in_array($this->ctrl->getNextClass(), array(
"",
"ilcalendarcategorygui")) && $this->ctrl->getCmd() ==
"manage") {
99 $this->ctrl->returnToParent($this);
101 if ((
int)
$_GET[
'category_id'] > 0) {
103 $this->ctrl->setParameter($this,
"category_id",
"");
104 $this->ctrl->setParameterByClass(
"ilcalendarpresentationgui",
"category_id",
"");
105 $this->ctrl->redirect($this,
"manage");
109 $this->category_id = (int)
$_GET[
'category_id'];
111 include_once(
"./Services/Calendar/classes/class.ilCalendarActions.php");
130 $next_class = $this->ctrl->getNextClass($this);
131 $this->ctrl->saveParameter($this,
'category_id');
132 $this->ctrl->setParameter($this,
'seed', $this->seed->get(
IL_CAL_DATE));
134 if (array_key_exists(
'backvm', $_REQUEST)) {
135 $this->ctrl->setParameter($this,
'backvm', 1);
137 switch ($next_class) {
138 case 'ilcalendarappointmentgui':
139 $this->ctrl->setReturn($this,
'details');
141 include_once(
'./Services/Calendar/classes/class.ilCalendarAppointmentGUI.php');
143 $this->ctrl->forwardCommand(
$app);
147 $cmd = $this->ctrl->getCmd(
"show");
149 if (!in_array($cmd, array(
"details",
"askDeleteAppointments",
"deleteAppointments"))) {
164 if (array_key_exists(
'backvm', $_REQUEST)) {
165 $this->ctrl->redirect($this,
'manage');
169 $this->ctrl->returnToParent($this);
185 $ilTabs = $DIC[
'ilTabs'];
187 $ilTabs->clearTargets();
188 $ilTabs->setBackTarget($this->lng->txt(
"cal_back_to_list"), $this->ctrl->getLinkTarget($this,
'cancel'));
190 $ed_tpl =
new ilTemplate(
'tpl.edit_category.html',
true,
true,
'Services/Calendar');
195 $ed_tpl->setVariable(
'EDIT_CAT', $form->getHTML());
196 $tpl->setContent($ed_tpl->get());
207 if ($form->checkInput()) {
209 $category->setTitle($form->getInput(
'title'));
210 $category->setColor(
'#' . $form->getInput(
'color'));
211 $category->setLocationType($form->getInput(
'type_rl'));
212 $category->setRemoteUrl($form->getInput(
'remote_url'));
213 $category->setRemoteUser($form->getInput(
'remote_user'));
214 $category->setRemotePass($form->getInput(
'remote_pass'));
216 $category->setType((
int) $form->getInput(
'type'));
217 $category->setObjId(0);
225 $form->setValuesByPost();
239 $form->setValuesByPost();
244 ilUtil::sendSuccess($this->lng->txt(
'settings_saved'),
true);
245 $GLOBALS[
'DIC']->ctrl()->redirect($this,
'manage');
258 $tabs = $DIC->tabs();
259 $tabs->activateTab(
"edit");
263 if (!$this->category_id) {
265 $this->ctrl->returnToParent($this);
268 if (!$this->actions->checkSettingsCal($this->category_id)) {
270 $this->ctrl->returnToParent($this);
276 $tpl->setContent($form->getHTML());
290 if (!$this->category_id) {
292 $this->ctrl->returnToParent($this);
299 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
301 $info->setFormAction($this->ctrl->getFormAction($this));
303 $info->addSection($this->lng->txt(
'cal_cal_details'));
310 if (!$this->category_id) {
312 $this->ctrl->returnToParent($this);
321 $this->ctrl->redirect($this,
'manage');
323 ilUtil::sendSuccess($this->lng->txt(
'cal_cal_sync_success'),
true);
324 $this->ctrl->redirect($this,
'manage');
333 include_once
'./Services/Calendar/classes/class.ilCalendarRemoteReader.php';
338 $remote->import($category);
349 if (!$this->category_id) {
351 $this->ctrl->returnToParent($this);
361 if ($form->checkInput()) {
364 $category->setTitle($form->getInput(
'title'));
366 $category->setColor(
'#' . $form->getInput(
'color'));
368 ilUtil::sendSuccess($this->lng->txt(
'settings_saved'),
true);
369 if ($this->ref_id > 0) {
370 $this->ctrl->returnToParent($this);
372 $this->ctrl->redirect($this,
"manage");
375 $form->setValuesByPost();
393 $cat_ids = (is_array(
$_POST[
'selected_cat_ids']) && count(
$_POST[
'selected_cat_ids']) > 0)
394 ?
$_POST[
'selected_cat_ids']
395 : (
$_GET[
"category_id"] > 0 ? array(
$_GET[
"category_id"]) : null);
397 if (!is_array($cat_ids)) {
412 include_once(
'./Services/Utilities/classes/class.ilConfirmationGUI.php');
415 $confirmation_gui->setFormAction($this->ctrl->getFormAction($this));
416 $confirmation_gui->setHeaderText($this->lng->txt(
'cal_del_cal_sure'));
417 $confirmation_gui->setConfirm($this->lng->txt(
'delete'),
'delete');
418 $confirmation_gui->setCancel($this->lng->txt(
'cancel'),
'manage');
420 include_once(
'./Services/Calendar/classes/class.ilCalendarCategory.php');
421 foreach ($cat_ids as $cat_id) {
423 $confirmation_gui->addItem(
'category_id[]', $cat_id, $category->getTitle());
426 $tpl->setContent($confirmation_gui->getHTML());
436 protected function delete()
442 if (!
$_POST[
'category_id']) {
457 include_once(
'./Services/Calendar/classes/class.ilCalendarCategory.php');
458 foreach (
$_POST[
'category_id'] as $cat_id) {
463 ilUtil::sendSuccess($this->lng->txt(
'cal_cal_deleted'),
true);
464 $ilCtrl->redirect($this,
'manage');
482 include_once(
'./Services/Calendar/classes/class.ilCalendarCategories.php');
483 include_once(
'./Services/Calendar/classes/class.ilCalendarVisibility.php');
485 $selected_cat_ids =
$_POST[
'selected_cat_ids'] ?
$_POST[
'selected_cat_ids'] : array();
486 $shown_cat_ids =
$_POST[
'shown_cat_ids'] ?
$_POST[
'shown_cat_ids'] : array();
489 $cat_ids = $cats->getCategories();
495 if ($this->obj_id > 0) {
496 $old_selection = $cat_visibility->getVisible();
498 $old_selection = $cat_visibility->getHidden();
502 $new_selection = array();
506 foreach ($old_selection as $cat_id) {
507 if (!in_array($cat_id, $shown_cat_ids)) {
508 $new_selection[] = $cat_id;
512 foreach ($shown_cat_ids as $shown_cat_id) {
513 $shown_cat_id = (int) $shown_cat_id;
514 if ($this->obj_id > 0) {
515 if (in_array($shown_cat_id, $selected_cat_ids)) {
516 $new_selection[] = $shown_cat_id;
519 if (!in_array($shown_cat_id, $selected_cat_ids)) {
520 $new_selection[] = $shown_cat_id;
525 if ($this->obj_id > 0) {
526 $cat_visibility->showSelected($new_selection);
528 $cat_visibility->hideSelected($new_selection);
531 $cat_visibility->save();
533 ilUtil::sendSuccess($this->lng->txt(
'settings_saved'),
true);
534 $this->ctrl->returnToParent($this);
550 $tabs = $DIC->tabs();
551 $tabs->activateTab(
"share");
553 if (!$this->category_id) {
555 $this->ctrl->returnToParent($this);
568 $this->ctrl->saveParameter($this,
'category_id');
570 include_once(
'./Services/Calendar/classes/class.ilCalendarSharedListTableGUI.php');
572 $table->setTitle($this->lng->txt(
'cal_cal_shared_with'));
573 $table->setCalendarId($this->category_id);
577 $tpl->setContent($table->getHTML());
590 $tabs = $DIC->tabs();
591 $tabs->activateTab(
"share");
593 $this->lng->loadLanguageModule(
'search');
595 if (!$this->category_id) {
597 $this->ctrl->returnToParent($this);
599 $this->ctrl->saveParameter($this,
'category_id');
602 if (!isset(
$_POST[
'query'])) {
605 } elseif (
$_POST[
'query']) {
618 include_once
'Services/Search/classes/class.ilQueryParser.php';
619 include_once
'Services/Search/classes/class.ilObjectSearchFactory.php';
620 include_once
'Services/Search/classes/class.ilSearchResult.php';
626 $query_parser->setMinWordLength(3);
627 $query_parser->parse();
631 case self::SEARCH_USER:
633 $search->enableActiveCheck(
true);
635 $search->setFields(array(
'login'));
636 $res = $search->performSearch();
637 $res_sum->mergeEntries(
$res);
639 $search->setFields(array(
'firstname'));
640 $res = $search->performSearch();
641 $res_sum->mergeEntries(
$res);
643 $search->setFields(array(
'lastname'));
644 $res = $search->performSearch();
645 $res_sum->mergeEntries(
$res);
650 case self::SEARCH_ROLE:
652 include_once
'Services/Search/classes/Like/class.ilLikeObjectSearch.php';
654 $search->setFilter(array(
'role'));
656 $res = $search->performSearch();
657 $res_sum->mergeEntries(
$res);
663 if (!count($res_sum->getResults())) {
671 case self::SEARCH_USER:
675 case self::SEARCH_ROLE:
701 if (!$this->category_id) {
703 $this->ctrl->returnToParent($this);
705 if (!count(
$_POST[
'user_ids'])) {
719 include_once(
'./Services/Calendar/classes/class.ilCalendarShared.php');
727 ilUtil::sendSuccess($this->lng->txt(
'cal_shared_selected_usr'));
752 if (!$this->category_id) {
754 $this->ctrl->returnToParent($this);
756 if (!count(
$_POST[
'role_ids'])) {
769 include_once(
'./Services/Calendar/classes/class.ilCalendarShared.php');
772 foreach (
$_POST[
'role_ids'] as $role_id) {
775 ilUtil::sendSuccess($this->lng->txt(
'cal_shared_selected_usr'));
788 if (!$this->category_id) {
790 $this->ctrl->returnToParent($this);
792 if (!count(
$_POST[
'obj_ids'])) {
806 include_once(
'./Services/Calendar/classes/class.ilCalendarShared.php');
809 foreach (
$_POST[
'obj_ids'] as $obj_id) {
810 $shared->stopSharing($obj_id);
812 ilUtil::sendSuccess($this->lng->txt(
'cal_unshared_selected_usr'));
831 include_once(
'./Services/Calendar/classes/class.ilCalendarSharedUserListTableGUI.php');
834 $table->setTitle($this->lng->txt(
'cal_share_search_usr_header'));
835 $table->setFormAction($this->ctrl->getFormAction($this));
836 $table->setUsers($a_ids);
842 $tpl->setContent($table->getHTML());
858 include_once(
'./Services/Calendar/classes/class.ilCalendarSharedRoleListTableGUI.php');
861 $table->setTitle($this->lng->txt(
'cal_share_search_role_header'));
862 $table->setFormAction($this->ctrl->getFormAction($this));
863 $table->setRoles($a_ids);
869 $tpl->setContent($table->getHTML());
881 $tb = $DIC->toolbar();
882 $lng = $DIC->language();
884 $lng->loadLanguageModule(
'search');
886 $tb->setFormAction($this->ctrl->getFormAction($this));
889 $search =
new ilTextInputGUI($this->lng->txt(
'cal_search'),
'query');
890 $search->setValue(
$_POST[
'query']);
891 $search->setSize(16);
892 $search->setMaxLength(128);
894 $tb->addInputItem($search,
true);
897 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
899 self::SEARCH_USER => $this->lng->txt(
'obj_user'),
900 self::SEARCH_ROLE => $this->lng->txt(
'obj_role'),
903 $si->setValue(
$_POST[
'query_type']);
904 $si->setOptions($options);
905 $si->setInfo($this->lng->txt(
""));
906 $tb->addInputItem($si);
909 $tb->addFormButton($this->lng->txt(
'search'),
"sharePerformSearch");
923 $rbacsystem = $DIC[
'rbacsystem'];
925 $ilHelp = $DIC[
'ilHelp'];
927 $ilHelp->setScreenIdComponent(
"cal");
928 $ilHelp->setScreenId(
"cal");
929 if ($a_mode ==
"edit") {
930 $ilHelp->setSubScreenId(
"edit");
932 $ilHelp->setSubScreenId(
"create");
935 include_once(
'./Services/Calendar/classes/class.ilCalendarCategories.php');
939 #$this->form->setTableWidth('40%'); 943 $this->form->setTitle($this->lng->txt(
'cal_edit_category'));
944 $this->ctrl->saveParameter($this, array(
'seed',
'category_id'));
945 $this->form->setFormAction($this->ctrl->getFormAction($this));
947 $this->form->addCommandButton(
'update', $this->lng->txt(
'save'));
959 $this->editable =
true;
961 $this->ctrl->saveParameter($this, array(
'category_id'));
962 $this->form->setFormAction($this->ctrl->getFormAction($this));
963 $this->form->setTitle($this->lng->txt(
'cal_add_category'));
964 $this->form->addCommandButton(
'save', $this->lng->txt(
'save'));
968 $this->form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
971 $title =
new ilTextInputGUI($this->lng->txt(
'cal_calendar_name'),
'title');
972 if ($a_mode ==
'edit') {
974 $title->setDisabled(
true);
977 $title->setRequired(
true);
978 $title->setMaxLength(64);
980 $title->setValue($category->getTitle());
981 $this->form->addItem($title);
984 include_once(
'./Services/Calendar/classes/class.ilCalendarSettings.php');
987 $type->setValue($category->getType());
988 $type->setRequired(
true);
991 $type->addOption($opt);
994 $type->addOption($opt);
995 $type->setInfo($this->lng->txt(
'cal_type_info'));
996 $this->form->addItem(
$type);
1001 $color->
setValue($category->getColor());
1003 $color->setDisabled(
true);
1005 $color->setRequired(
true);
1006 $this->form->addItem($color);
1009 $location->setDisabled($a_mode ==
'edit');
1014 $location->setValue($category->getLocationType());
1018 $url->setDisabled($a_mode ==
'edit');
1019 $url->setValue($category->getRemoteUrl());
1020 $url->setMaxLength(500);
1022 $url->setRequired(
true);
1023 $location_remote->addSubItem(
$url);
1025 $user =
new ilTextInputGUI($this->lng->txt(
'username'),
'remote_user');
1026 $user->setDisabled($a_mode ==
'edit');
1027 $user->setValue($category->getRemoteUser());
1028 $user->setMaxLength(50);
1030 $user->setRequired(
false);
1031 $location_remote->addSubItem($user);
1034 $pass->setDisabled($a_mode ==
'edit');
1035 $pass->setValue($category->getRemotePass());
1036 $pass->setMaxLength(50);
1038 $pass->setRetype(
false);
1039 $pass->setInfo($this->lng->txt(
'remote_pass_info'));
1040 $location_remote->addSubItem(
$pass);
1046 $this->form->addItem($ne);
1053 $this->form->addItem($ne);
1069 if (!$this->category_id) {
1071 $this->ctrl->returnToParent($this);
1077 include_once(
'./Services/Calendar/classes/class.ilCalendarSharedStatus.php');
1080 include_once(
'./Services/Calendar/classes/class.ilCalendarShared.php');
1086 $status->decline($this->category_id);
1088 ilUtil::sendSuccess($this->lng->txt(
'settings_saved'),
true);
1089 $this->ctrl->redirect($this,
'manage');
1100 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryTableGUI.php');
1101 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
1102 include_once(
'./Services/Calendar/classes/class.ilCalendarAppointmentsTableGUI.php');
1105 $table_gui->setTitle($this->lng->txt(
'cal_assigned_appointments'));
1106 $table_gui->setAppointments(
1111 return $table_gui->getHTML();
1126 if (!count(
$_POST[
'appointments'])) {
1132 include_once(
'./Services/Utilities/classes/class.ilConfirmationGUI.php');
1135 $this->ctrl->setParameter($this,
'category_id', $this->category_id);
1136 $confirmation_gui->setFormAction($this->ctrl->getFormAction($this));
1137 $confirmation_gui->setHeaderText($this->lng->txt(
'cal_del_app_sure'));
1138 $confirmation_gui->setConfirm($this->lng->txt(
'delete'),
'deleteAppointments');
1139 $confirmation_gui->setCancel($this->lng->txt(
'cancel'),
'details');
1141 include_once(
'./Services/Calendar/classes/class.ilCalendarEntry.php');
1142 foreach (
$_POST[
'appointments'] as $app_id) {
1144 $confirmation_gui->addItem(
'appointments[]', (
int) $app_id,
$app->getTitle());
1147 $tpl->setContent($confirmation_gui->getHTML());
1158 if (!count(
$_POST[
'appointments'])) {
1163 include_once(
'./Services/Calendar/classes/class.ilCalendarEntry.php');
1164 foreach (
$_POST[
'appointments'] as $app_id) {
1168 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
1172 ilUtil::sendSuccess($this->lng->txt(
'settings_saved'));
1184 include_once(
"./Services/Calendar/classes/class.ilCalendarSelectionBlockGUI.php");
1186 $html =
$ilCtrl->getHTML($block_gui);
1202 $this->lng->loadLanguageModule(
'pd');
1204 $tpl =
new ilTemplate(
'tpl.calendar_selection.html',
true,
true,
'Services/Calendar');
1205 include_once(
'./Services/Calendar/classes/class.ilCalendarUserSettings.php');
1208 $tpl->setVariable(
'HTEXT', $this->lng->txt(
'dash_memberships'));
1209 $tpl->touchBlock(
'head_item');
1210 $tpl->touchBlock(
'head_delim');
1211 $tpl->touchBlock(
'head_item');
1214 $this->ctrl->setParameter($this,
'seed', $this->seed->get(
IL_CAL_DATE));
1215 $tpl->setVariable(
'HHREF', $this->ctrl->getLinkTarget($this,
'switchCalendarMode'));
1216 $tpl->setVariable(
'HLINK', $this->lng->txt(
'dash_favourites'));
1217 $tpl->touchBlock(
'head_item');
1222 $this->ctrl->setParameter($this,
'seed', $this->seed->get(
IL_CAL_DATE));
1223 $tpl->setVariable(
'HHREF', $this->ctrl->getLinkTarget($this,
'switchCalendarMode'));
1224 $tpl->setVariable(
'HLINK', $this->lng->txt(
'dash_memberships'));
1225 $tpl->touchBlock(
'head_item');
1226 $tpl->touchBlock(
'head_delim');
1227 $tpl->touchBlock(
'head_item');
1229 $tpl->setVariable(
'HTEXT', $this->lng->txt(
'dash_favourites'));
1230 $tpl->touchBlock(
'head_item');
1244 include_once(
'./Services/Calendar/classes/class.ilCalendarUserSettings.php');
1248 $this->ctrl->returnToParent($this);
1264 $rbacsystem = $DIC[
'rbacsystem'];
1265 $ilAccess = $DIC[
'ilAccess'];
1267 $this->editable =
false;
1269 $this->visible =
false;
1270 $this->importable =
false;
1272 include_once(
'./Services/Calendar/classes/class.ilCalendarShared.php');
1277 switch ($cat->getType()) {
1280 if ($cat->getObjId() ==
$ilUser->getId()) {
1281 $this->visible =
true;
1282 $this->editable =
true;
1283 $this->importable =
true;
1284 } elseif (isset($shared[$cat->getCategoryID()])) {
1285 $this->visible =
true;
1291 $this->visible =
true;
1295 $this->editable =
false;
1298 foreach ($refs as $ref) {
1299 if ($ilAccess->checkAccess(
'read',
'', $ref)) {
1300 $this->visible =
true;
1302 if ($ilAccess->checkAccess(
'edit_event',
'', $ref)) {
1303 $this->importable =
true;
1305 if ($ilAccess->checkAccess(
'write',
'', $ref)) {
1306 $this->editable =
true;
1313 $this->editable =
$ilUser->getId() == $cat->getCategoryID();
1314 $this->visible =
true;
1315 $this->importable =
false;
1331 if (!$this->visible) {
1332 $ilErr->raiseError($this->lng->txt(
'permission_denied'),
$ilErr->FATAL);
1348 return $this->importable;
1361 $tree = $DIC[
'tree'];
1363 $tpl =
new ilTemplate(
'tpl.cal_reference_links.html',
true,
true,
'Services/Calendar');
1366 include_once(
'./Services/Link/classes/class.ilLink.php');
1368 $parent_ref_id = $tree->getParentId($ref_id);
1376 $tpl->setCurrentBlock(
'reference');
1379 $tpl->setVariable(
'PARENT_TITLE', $parent_title);
1384 $tpl->setVariable(
'TITLE', $title);
1386 $tpl->parseCurrentBlock();
1397 protected function manage($a_reset_offsets =
false)
1407 include_once(
'./Services/Calendar/classes/class.ilCalendarManageTableGUI.php');
1410 if ($a_reset_offsets) {
1411 $table_gui->resetToDefaults();
1414 $table_gui->parse();
1416 include_once
"./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php";
1417 $toolbar =
new ilToolbarGui();
1418 $ilCtrl->setParameter($this,
'backvm', 1);
1419 $toolbar->addButton(
$lng->txt(
"cal_add_calendar"),
$ilCtrl->getLinkTarget($this,
"add"));
1421 $tpl->setContent($toolbar->getHTML() . $table_gui->getHTML());
1431 $ilTabs = $DIC[
'ilTabs'];
1434 if (!$this->category_id) {
1436 $this->ctrl->returnToParent($this);
1438 $this->ctrl->setParameter($this,
'category_id', $this->category_id);
1446 $this->ctrl->returnToParent($this);
1449 $ilTabs->clearTargets();
1450 $ilTabs->setBackTarget($this->lng->txt(
"back"), $this->ctrl->getLinkTarget($this,
"cancel"));
1456 $tpl->setContent($form->getHTML());
1464 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
1466 $form->setTitle($this->lng->txt(
'cal_import_tbl'));
1467 $form->setFormAction($this->ctrl->getFormAction($this));
1469 $form->addCommandButton(
'uploadAppointments', $this->lng->txt(
'import'));
1471 $ics =
new ilFileInputGUI($this->lng->txt(
'cal_import_file'),
'file');
1473 $ics->setSuffixes(array(
'ics'));
1474 $ics->setInfo($this->lng->txt(
'cal_import_file_info'));
1475 $form->addItem($ics);
1486 if ($form->checkInput()) {
1487 $file = $form->getInput(
'file');
1492 $num = $this->
doImportFile($tmp, (
int) $_REQUEST[
'category_id']);
1494 ilUtil::sendSuccess(sprintf($this->lng->txt(
'cal_imported_success'), (int) $num),
true);
1495 $this->ctrl->redirect($this,
'cancel');
1509 include_once
'./Services/Calendar/classes/../classes/iCal/class.ilICalParser.php';
1510 include_once
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php';
1520 return $assigned_after - $assigned_before;
1537 $lng->txt(
"calendar"),
1538 $ilCtrl->getLinkTarget($this,
"manage")
1542 $calendars = $status->getOpenInvitations();
1548 $lng->txt(
"cal_shared_calendars"),
1549 $ilCtrl->getLinkTarget($this,
"invitations")
1553 $ilTabs->activateSubTab($a_active);
1567 include_once(
'./Services/Calendar/classes/class.ilCalendarInboxSharedTableGUI.php');
1568 include_once(
'./Services/Calendar/classes/class.ilCalendarShared.php');
1575 $this->tpl->setContent($table->getHTML());
1591 if (!
$_POST[
'cal_ids'] or !is_array(
$_POST[
'cal_ids'])) {
1597 include_once(
'./Services/Calendar/classes/class.ilCalendarSharedStatus.php');
1600 include_once(
'./Services/Calendar/classes/class.ilCalendarShared.php');
1601 foreach (
$_POST[
'cal_ids'] as $calendar_id) {
1607 $status->accept($calendar_id);
1610 ilUtil::sendSuccess($this->lng->txt(
'settings_saved'),
true);
1612 $this->ctrl->redirect($this,
'invitations');
1627 if (!
$_POST[
'cal_ids'] or !is_array(
$_POST[
'cal_ids'])) {
1633 include_once(
'./Services/Calendar/classes/class.ilCalendarSharedStatus.php');
1636 include_once(
'./Services/Calendar/classes/class.ilCalendarShared.php');
1637 foreach (
$_POST[
'cal_ids'] as $calendar_id) {
1643 $status->decline($calendar_id);
1646 ilUtil::sendSuccess($this->lng->txt(
'settings_saved'),
true);
1648 $this->ctrl->redirect($this,
'invitations');
This class represents an option in a radio group.
initImportForm()
Create import form.
Model for a calendar entry.
static _getInstance()
get singleton instance
readPermissions()
read permissions
initFormCategory($a_mode)
init edit/create category form
setValue($a_value)
Set Value.
sharePerformSearch()
share perform search
appendCalendarSelection()
static getSharedCalendarsForUser($a_usr_id=0)
get shared calendars of user
addReferenceLinks($a_obj_id)
Show links to references.
unshare()
Stop calendar sharing.
Stores status (accepted/declined) of shared calendars.
acceptShared()
accept shared calendar
shareAssignRoles($a_editable=false)
share assign roles
saveSelection()
save selection of categories
static getInstance()
Get instance.
static lookupNumberOfAssignedAppointments($a_cat_ids)
Get number of assigned appoitments.
executeCommand()
Execute command.
show list of alle calendars to manage
const CAL_SELECTION_MEMBERSHIP
static _lookupTitle($a_id)
lookup object title
isEditable()
check if calendar is editable private
declineShared()
accept shared calendar
Stores calendar categories.
Reader for remote ical calendars.
showUserList($a_ids=array())
show user list
BlockGUI class calendar selection.
Handles shared calendars.
switchCalendarMode()
Switch calendar selection nmode.
__construct($a_user_id, $seed, $a_ref_id=0)
Constructor.
static _getAllReferences($a_id)
get all reference ids of object
doSynchronisation(ilCalendarCategory $category)
Sync calendar.
static _getInstanceByUserId($a_user_id, $a_ref_id=0)
get instance by user id
importAppointments(ilPropertyFormGUI $form=null)
import appointments
deleteAppointments()
delete appointments
static _getUserSearchInstance($query_parser)
get reference of ilLikeUserSearch
showAssignedAppointments()
show assigned aapointments
Show shared calendars for a specific user.
foreach($_POST as $key=> $value) $res
const CAL_SELECTION_ITEMS
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
static _getInstance()
get instance for logged in user
static _lookupObjId($a_id)
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
shareAssign($a_editable=false)
share assign
shareAssignRolesEditable()
Share editable.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
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:
getSearchToolbar()
Get search toolbar.
static _deleteByAppointmentId($a_app_id)
Delete appointment assignment.
static _getInstance($a_usr_id=0)
get singleton instance
askDeleteAppointments()
ask delete appointments
static _lookupType($a_id, $a_reference=false)
lookup object type
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
add(ilPropertyFormGUI $form=null)
add new calendar
static _getAssignedAppointments($a_cat_id)
Get assigned apointments.
static ilTempnam($a_temp_path=null)
Returns a unique and non existing Path for e temporary file or directory.
doImportFile($file, $category_id)
Import ics.
shareAssignEditable()
Share with write access.
This class represents a non editable value in a property form.
invitations()
Invitations.
Administrate calendar appointments.
addSubTabs($a_active)
Add subtabs.
showRoleList($a_ids=array())
show role list
confirmDelete()
confirm delete
edit(ilPropertyFormGUI $form=null)
edit category
details()
show calendar details
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
static isSharedWithUser($a_usr_id, $a_calendar_id)
is shared with user
manage($a_reset_offsets=false)
Manage calendars type $lng type $ilCtrl type $tpl.
shareSearch()
share calendar
shareDeassign()
desassign users/roles from calendar
Administration, Side-Block presentation of calendar categories.
Confirmation screen class.
uploadAppointments()
Upload appointments.