84        $this->user_id = $a_user_id;
 
   86        $this->lng = 
$DIC->language();
 
   87        $this->lng->loadLanguageModule(
'dateplaner');
 
   88        $this->ctrl = 
$DIC->ctrl();
 
   89        $this->ref_id = $a_ref_id;
 
   91        $this->tabs = 
$DIC->tabs();
 
   92        $this->tpl = 
$DIC->ui()->mainTemplate();
 
   94        $this->lng->loadLanguageModule(
"dateplaner");
 
   96        if (in_array($this->ctrl->getNextClass(), array(
"", 
"ilcalendarcategorygui")) && $this->ctrl->getCmd() == 
"manage") {
 
   98                $this->ctrl->returnToParent($this);
 
  100            if ((
int) 
$_GET[
'category_id'] > 0) {
 
  102                $this->ctrl->setParameter($this, 
"category_id", 
"");
 
  103                $this->ctrl->setParameterByClass(
"ilcalendarpresentationgui", 
"category_id", 
"");
 
  104                $this->ctrl->redirect($this, 
"manage");
 
  108        $this->category_id = (int) 
$_GET[
'category_id'];
 
  110        include_once(
"./Services/Calendar/classes/class.ilCalendarActions.php");
 
  125        $next_class = $this->ctrl->getNextClass($this);
 
  126        $this->ctrl->saveParameter($this, 
'category_id');
 
  127        $this->ctrl->setParameter($this, 
'seed', $this->seed->get(
IL_CAL_DATE));
 
  128        switch ($next_class) {
 
  129            case 'ilcalendarappointmentgui':
 
  130                $this->ctrl->setReturn($this, 
'details');
 
  132                include_once(
'./Services/Calendar/classes/class.ilCalendarAppointmentGUI.php');
 
  134                $this->ctrl->forwardCommand($app);
 
  138                $cmd = $this->ctrl->getCmd(
"show");
 
  140                if (!in_array($cmd, array(
"details", 
"askDeleteAppointments", 
"deleteAppointments"))) {
 
  155        $this->ctrl->returnToParent($this);
 
  167        global 
$tpl, $ilTabs;
 
  169        $ilTabs->clearTargets();
 
  171        if ($_REQUEST[
'backv'] == self::VIEW_MANAGE) {
 
  177        $ilTabs->setBackTarget($this->lng->txt(
"cal_back_to_list"), $this->ctrl->getLinkTarget($this, $back));
 
  179        $ed_tpl = 
new ilTemplate(
'tpl.edit_category.html', 
true, 
true, 
'Services/Calendar');
 
  184        $ed_tpl->setVariable(
'EDIT_CAT', 
$form->getHTML());
 
  185        $tpl->setContent($ed_tpl->get());
 
  196        if (
$form->checkInput()) {
 
  198            $category->setTitle(
$form->getInput(
'title'));
 
  199            $category->setColor(
'#' . 
$form->getInput(
'color'));
 
  200            $category->setLocationType(
$form->getInput(
'type_rl'));
 
  201            $category->setRemoteUrl(
$form->getInput(
'remote_url'));
 
  202            $category->setRemoteUser(
$form->getInput(
'remote_user'));
 
  203            $category->setRemotePass(
$form->getInput(
'remote_pass'));
 
  205                $category->setType((
int) 
$form->getInput(
'type'));
 
  206                $category->setObjId(0);
 
  214            $form->setValuesByPost();
 
  224        } 
catch (Exception $e) {
 
  228            $form->setValuesByPost();
 
  234        $GLOBALS[
'DIC']->ctrl()->redirect($this, 
'manage');
 
  248        $tabs->activateTab(
"edit");
 
  252        if (!$this->category_id) {
 
  254            $this->ctrl->returnToParent($this);
 
  257        if (!$this->actions->checkSettingsCal($this->category_id)) {
 
  259            $this->ctrl->returnToParent($this);
 
  277        if (!$this->category_id) {
 
  279            $this->ctrl->returnToParent($this);
 
  286        include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
 
  288        $info->setFormAction($this->ctrl->getFormAction($this));
 
  290        $info->addSection($this->lng->txt(
'cal_cal_details'));
 
  292        $tpl->setContent(
$info->getHTML() . $this->showAssignedAppointments());
 
  297        if (!$this->category_id) {
 
  299            $this->ctrl->returnToParent($this);
 
  306        } 
catch (Exception $e) {
 
  308            $this->ctrl->redirect($this, 
'manage');
 
  311        $this->ctrl->redirect($this, 
'manage');
 
  320        include_once 
'./Services/Calendar/classes/class.ilCalendarRemoteReader.php';
 
  325        $remote->import($category);
 
  336        if (!$this->category_id) {
 
  338            $this->ctrl->returnToParent($this);
 
  348        if (
$form->checkInput()) {
 
  351                $category->setTitle(
$form->getInput(
'title'));
 
  353            $category->setColor(
'#' . 
$form->getInput(
'color'));
 
  356            if ($this->ref_id > 0) {
 
  357                $this->ctrl->returnToParent($this);
 
  359                $this->ctrl->redirect($this, 
"manage");
 
  362            $form->setValuesByPost();
 
  378        $cat_ids = (is_array(
$_POST[
'selected_cat_ids']) && count(
$_POST[
'selected_cat_ids']) > 0)
 
  379            ? 
$_POST[
'selected_cat_ids']
 
  380            : (
$_GET[
"category_id"] > 0 ? array(
$_GET[
"category_id"]) : 
null);
 
  382        if (!is_array($cat_ids)) {
 
  397        include_once(
'./Services/Utilities/classes/class.ilConfirmationGUI.php');
 
  400        $confirmation_gui->setFormAction($this->ctrl->getFormAction($this));
 
  401        $confirmation_gui->setHeaderText($this->lng->txt(
'cal_del_cal_sure'));
 
  402        $confirmation_gui->setConfirm($this->lng->txt(
'delete'), 
'delete');
 
  403        $confirmation_gui->setCancel($this->lng->txt(
'cancel'), 
'manage');
 
  405        include_once(
'./Services/Calendar/classes/class.ilCalendarCategory.php');
 
  406        foreach ($cat_ids as $cat_id) {
 
  408            $confirmation_gui->addItem(
'category_id[]', $cat_id, $category->getTitle());
 
  411        $tpl->setContent($confirmation_gui->getHTML());
 
  421    protected function delete()
 
  425        if (!
$_POST[
'category_id']) {
 
  440        include_once(
'./Services/Calendar/classes/class.ilCalendarCategory.php');
 
  441        foreach (
$_POST[
'category_id'] as $cat_id) {
 
  447        $ilCtrl->redirect($this, 
'manage');
 
  463        include_once(
'./Services/Calendar/classes/class.ilCalendarCategories.php');
 
  464        include_once(
'./Services/Calendar/classes/class.ilCalendarVisibility.php');
 
  466        $selected_cat_ids = 
$_POST[
'selected_cat_ids'] ? 
$_POST[
'selected_cat_ids'] : array();
 
  467        $shown_cat_ids = 
$_POST[
'shown_cat_ids'] ? 
$_POST[
'shown_cat_ids'] : array();
 
  470        $cat_ids = $cats->getCategories();
 
  476        if ($this->obj_id > 0) {
 
  477            $old_selection = $cat_visibility->getVisible();
 
  479            $old_selection = $cat_visibility->getHidden();
 
  483        $new_selection = array();
 
  487        foreach ($old_selection as $cat_id) {
 
  488            if (!in_array($cat_id, $shown_cat_ids)) {
 
  489                $new_selection[] = $cat_id;
 
  493        foreach ($shown_cat_ids as $shown_cat_id) {
 
  494            $shown_cat_id = (int) $shown_cat_id;
 
  495            if ($this->obj_id > 0) {
 
  496                if (in_array($shown_cat_id, $selected_cat_ids)) {
 
  497                    $new_selection[] = $shown_cat_id;
 
  500                if (!in_array($shown_cat_id, $selected_cat_ids)) {
 
  501                    $new_selection[] = $shown_cat_id;
 
  506        if ($this->obj_id > 0) {
 
  507            $cat_visibility->showSelected($new_selection);
 
  509            $cat_visibility->hideSelected($new_selection);
 
  512        $cat_visibility->save();
 
  515        $this->ctrl->returnToParent($this);
 
  530        $tabs->activateTab(
"share");
 
  532        if (!$this->category_id) {
 
  534            $this->ctrl->returnToParent($this);
 
  547        $this->ctrl->saveParameter($this, 
'category_id');
 
  549        include_once(
'./Services/Calendar/classes/class.ilCalendarSharedListTableGUI.php');
 
  551        $table->setTitle($this->lng->txt(
'cal_cal_shared_with'));
 
  552        $table->setCalendarId($this->category_id);
 
  556        $tpl->setContent(
$table->getHTML());
 
  570        $tabs->activateTab(
"share");
 
  572        $this->lng->loadLanguageModule(
'search');
 
  574        if (!$this->category_id) {
 
  576            $this->ctrl->returnToParent($this);
 
  578        $this->ctrl->saveParameter($this, 
'category_id');
 
  581        if (!isset(
$_POST[
'query'])) {
 
  584        } elseif (
$_POST[
'query']) {
 
  597        include_once 
'Services/Search/classes/class.ilQueryParser.php';
 
  598        include_once 
'Services/Search/classes/class.ilObjectSearchFactory.php';
 
  599        include_once 
'Services/Search/classes/class.ilSearchResult.php';
 
  605        $query_parser->setMinWordLength(3);
 
  606        $query_parser->parse();
 
  612                $search->enableActiveCheck(
true);
 
  614                $search->setFields(array(
'login'));
 
  615                $res = $search->performSearch();
 
  616                $res_sum->mergeEntries(
$res);
 
  618                $search->setFields(array(
'firstname'));
 
  619                $res = $search->performSearch();
 
  620                $res_sum->mergeEntries(
$res);
 
  622                $search->setFields(array(
'lastname'));
 
  623                $res = $search->performSearch();
 
  624                $res_sum->mergeEntries(
$res);
 
  631                include_once 
'Services/Search/classes/Like/class.ilLikeObjectSearch.php';
 
  633                $search->setFilter(array(
'role'));
 
  635                $res = $search->performSearch();
 
  636                $res_sum->mergeEntries(
$res);
 
  642        if (!count($res_sum->getResults())) {
 
  678        if (!$this->category_id) {
 
  680            $this->ctrl->returnToParent($this);
 
  682        if (!count(
$_POST[
'user_ids'])) {
 
  696        include_once(
'./Services/Calendar/classes/class.ilCalendarShared.php');
 
  727        if (!$this->category_id) {
 
  729            $this->ctrl->returnToParent($this);
 
  731        if (!count(
$_POST[
'role_ids'])) {
 
  744        include_once(
'./Services/Calendar/classes/class.ilCalendarShared.php');
 
  747        foreach (
$_POST[
'role_ids'] as $role_id) {
 
  763        if (!$this->category_id) {
 
  765            $this->ctrl->returnToParent($this);
 
  767        if (!count(
$_POST[
'obj_ids'])) {
 
  781        include_once(
'./Services/Calendar/classes/class.ilCalendarShared.php');
 
  784        foreach (
$_POST[
'obj_ids'] as $obj_id) {
 
  785            $shared->stopSharing($obj_id);
 
  804        include_once(
'./Services/Calendar/classes/class.ilCalendarSharedUserListTableGUI.php');
 
  807        $table->setTitle($this->lng->txt(
'cal_share_search_usr_header'));
 
  808        $table->setFormAction($this->ctrl->getFormAction($this));
 
  829        include_once(
'./Services/Calendar/classes/class.ilCalendarSharedRoleListTableGUI.php');
 
  832        $table->setTitle($this->lng->txt(
'cal_share_search_role_header'));
 
  833        $table->setFormAction($this->ctrl->getFormAction($this));
 
  852        $tb = 
$DIC->toolbar();
 
  855        $lng->loadLanguageModule(
'search');
 
  857        $tb->setFormAction($this->ctrl->getFormAction($this));
 
  860        $search = 
new ilTextInputGUI($this->lng->txt(
'cal_search'), 
'query');
 
  861        $search->setValue(
$_POST[
'query']);
 
  862        $search->setSize(16);
 
  863        $search->setMaxLength(128);
 
  865        $tb->addInputItem($search, 
true);
 
  868        include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
 
  870            self::SEARCH_USER => $this->lng->txt(
'obj_user'),
 
  871            self::SEARCH_ROLE => $this->lng->txt(
'obj_role'),
 
  876        $si->setInfo($this->lng->txt(
""));
 
  877        $tb->addInputItem(
$si);
 
  880        $tb->addFormButton($this->lng->txt(
'search'), 
"sharePerformSearch");
 
  892        global $rbacsystem,
$ilUser, $ilHelp;
 
  894        $ilHelp->setScreenIdComponent(
"cal");
 
  895        $ilHelp->setScreenId(
"cal");
 
  896        if ($a_mode == 
"edit") {
 
  897            $ilHelp->setSubScreenId(
"edit");
 
  899            $ilHelp->setSubScreenId(
"create");
 
  902        include_once(
'./Services/Calendar/classes/class.ilCalendarCategories.php');
 
  906        #$this->form->setTableWidth('40%'); 
  910                $this->form->setTitle($this->lng->txt(
'cal_edit_category'));
 
  911                $this->ctrl->saveParameter($this, array(
'seed',
'category_id'));
 
  912                $this->form->setFormAction($this->ctrl->getFormAction($this));
 
  914                    $this->form->addCommandButton(
'update', $this->lng->txt(
'save'));
 
  926                $this->editable = 
true;
 
  928                $this->ctrl->saveParameter($this, array(
'category_id'));
 
  929                $this->form->setFormAction($this->ctrl->getFormAction($this));
 
  930                $this->form->setTitle($this->lng->txt(
'cal_add_category'));
 
  931                $this->form->addCommandButton(
'save', $this->lng->txt(
'save'));
 
  935        if ($_REQUEST[
'backv'] == self::VIEW_MANAGE) {
 
  936            $this->form->addCommandButton(
'manage', $this->lng->txt(
'cancel'));
 
  938            $this->form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
 
  943        if ($a_mode == 
'edit') {
 
  945                $title->setDisabled(
true);
 
  948        $title->setRequired(
true);
 
  951        $title->setValue($category->getTitle());
 
  952        $this->form->addItem(
$title);
 
  955        include_once(
'./Services/Calendar/classes/class.ilCalendarSettings.php');
 
  958            $type->setValue($category->getType());
 
  959            $type->setRequired(
true);
 
  962            $type->addOption($opt);
 
  965            $type->addOption($opt);
 
  966            $type->setInfo($this->lng->txt(
'cal_type_info'));
 
  967            $this->form->addItem(
$type);
 
  972        $color->setValue($category->getColor());
 
  974            $color->setDisabled(
true);
 
  976        $color->setRequired(
true);
 
  977        $this->form->addItem($color);
 
  980        $location->setDisabled($a_mode == 
'edit');
 
  985        $location->setValue($category->getLocationType());
 
  989        $url->setDisabled($a_mode == 
'edit');
 
  990        $url->setValue($category->getRemoteUrl());
 
  991        $url->setMaxLength(500);
 
  993        $url->setRequired(
true);
 
  994        $location_remote->addSubItem(
$url);
 
  996        $user = 
new ilTextInputGUI($this->lng->txt(
'username'), 
'remote_user');
 
  997        $user->setDisabled($a_mode == 
'edit');
 
  998        $user->setValue($category->getRemoteUser());
 
  999        $user->setMaxLength(50);
 
 1001        $user->setRequired(
false);
 
 1002        $location_remote->addSubItem($user);
 
 1005        $pass->setDisabled($a_mode == 
'edit');
 
 1006        $pass->setValue($category->getRemotePass());
 
 1007        $pass->setMaxLength(50);
 
 1009        $pass->setRetype(
false);
 
 1010        $pass->setInfo($this->lng->txt(
'remote_pass_info'));
 
 1011        $location_remote->addSubItem(
$pass);
 
 1017            $this->form->addItem($ne);
 
 1024            $this->form->addItem($ne);
 
 1038        if (!$this->category_id) {
 
 1040            $this->ctrl->returnToParent($this);
 
 1046        include_once(
'./Services/Calendar/classes/class.ilCalendarSharedStatus.php');
 
 1049        include_once(
'./Services/Calendar/classes/class.ilCalendarShared.php');
 
 1055        $status->decline($this->category_id);
 
 1058        $this->ctrl->redirect($this, 
'manage');
 
 1069        include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryTableGUI.php');
 
 1070        include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
 
 1071        include_once(
'./Services/Calendar/classes/class.ilCalendarAppointmentsTableGUI.php');
 
 1074        $table_gui->setTitle($this->lng->txt(
'cal_assigned_appointments'));
 
 1075        $table_gui->setAppointments(
 
 1080        return $table_gui->getHTML();
 
 1093        if (!count(
$_POST[
'appointments'])) {
 
 1099        include_once(
'./Services/Utilities/classes/class.ilConfirmationGUI.php');
 
 1102        $this->ctrl->setParameter($this, 
'category_id', $this->category_id);
 
 1103        $confirmation_gui->setFormAction($this->ctrl->getFormAction($this));
 
 1104        $confirmation_gui->setHeaderText($this->lng->txt(
'cal_del_app_sure'));
 
 1105        $confirmation_gui->setConfirm($this->lng->txt(
'delete'), 
'deleteAppointments');
 
 1106        $confirmation_gui->setCancel($this->lng->txt(
'cancel'), 
'details');
 
 1108        include_once(
'./Services/Calendar/classes/class.ilCalendarEntry.php');
 
 1109        foreach (
$_POST[
'appointments'] as $app_id) {
 
 1111            $confirmation_gui->addItem(
'appointments[]', (
int) $app_id, $app->getTitle());
 
 1114        $tpl->setContent($confirmation_gui->getHTML());
 
 1125        if (!count(
$_POST[
'appointments'])) {
 
 1130        include_once(
'./Services/Calendar/classes/class.ilCalendarEntry.php');
 
 1131        foreach (
$_POST[
'appointments'] as $app_id) {
 
 1135            include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
 
 1148        include_once(
"./Services/Calendar/classes/class.ilCalendarSelectionBlockGUI.php");
 
 1164        $this->lng->loadLanguageModule(
'pd');
 
 1166        $tpl = 
new ilTemplate(
'tpl.calendar_selection.html', 
true, 
true, 
'Services/Calendar');
 
 1167        include_once(
'./Services/Calendar/classes/class.ilCalendarUserSettings.php');
 
 1170                $tpl->setVariable(
'HTEXT', $this->lng->txt(
'pd_my_memberships'));
 
 1171                $tpl->touchBlock(
'head_item');
 
 1172                $tpl->touchBlock(
'head_delim');
 
 1173                $tpl->touchBlock(
'head_item');
 
 1176                $this->ctrl->setParameter($this, 
'seed', $this->seed->get(
IL_CAL_DATE));
 
 1177                $tpl->setVariable(
'HHREF', $this->ctrl->getLinkTarget($this, 
'switchCalendarMode'));
 
 1178                $tpl->setVariable(
'HLINK', $this->lng->txt(
'pd_my_offers'));
 
 1179                $tpl->touchBlock(
'head_item');
 
 1184                $this->ctrl->setParameter($this, 
'seed', $this->seed->get(
IL_CAL_DATE));
 
 1185                $tpl->setVariable(
'HHREF', $this->ctrl->getLinkTarget($this, 
'switchCalendarMode'));
 
 1186                $tpl->setVariable(
'HLINK', $this->lng->txt(
'pd_my_memberships'));
 
 1187                $tpl->touchBlock(
'head_item');
 
 1188                $tpl->touchBlock(
'head_delim');
 
 1189                $tpl->touchBlock(
'head_item');
 
 1191                $tpl->setVariable(
'HTEXT', $this->lng->txt(
'pd_my_offers'));
 
 1192                $tpl->touchBlock(
'head_item');
 
 1206        include_once(
'./Services/Calendar/classes/class.ilCalendarUserSettings.php');
 
 1210        $this->ctrl->returnToParent($this);
 
 1223        global 
$ilUser,$rbacsystem,$ilAccess;
 
 1225        $this->editable = 
false;
 
 1227        $this->visible = 
false;
 
 1228        $this->importable = 
false;
 
 1230        include_once(
'./Services/Calendar/classes/class.ilCalendarShared.php');
 
 1235        switch ($cat->getType()) {
 
 1238                if ($cat->getObjId() == 
$ilUser->getId()) {
 
 1239                    $this->visible = 
true;
 
 1240                    $this->editable = 
true;
 
 1241                    $this->importable = 
true;
 
 1242                } elseif (isset($shared[$cat->getCategoryID()])) {
 
 1243                    $this->visible = 
true;
 
 1249                $this->visible = 
true;
 
 1253                $this->editable = 
false;
 
 1256                foreach ($refs as $ref) {
 
 1257                    if ($ilAccess->checkAccess(
'read', 
'', $ref)) {
 
 1258                        $this->visible = 
true;
 
 1260                    if ($ilAccess->checkAccess(
'edit_event', 
'', $ref)) {
 
 1261                        $this->importable = 
true;
 
 1263                    if ($ilAccess->checkAccess(
'write', 
'', $ref)) {
 
 1264                        $this->editable = 
true;
 
 1271                $this->editable = 
$ilUser->getId() == $cat->getCategoryID();
 
 1272                $this->visible = 
true;
 
 1273                $this->importable = 
false;
 
 1287        if (!$this->visible) {
 
 1288            $ilErr->raiseError($this->lng->txt(
'permission_denied'), 
$ilErr->FATAL);
 
 1304        return $this->importable;
 
 1317        $tpl = 
new ilTemplate(
'tpl.cal_reference_links.html', 
true, 
true, 
'Services/Calendar');
 
 1320            include_once(
'./Services/Link/classes/class.ilLink.php');
 
 1322            $parent_ref_id = $tree->getParentId($ref_id);
 
 1330            $tpl->setCurrentBlock(
'reference');
 
 1333            $tpl->setVariable(
'PARENT_TITLE', $parent_title);
 
 1340            $tpl->parseCurrentBlock();
 
 1351    protected function manage($a_reset_offsets = 
false)
 
 1357        include_once(
'./Services/Calendar/classes/class.ilCalendarManageTableGUI.php');
 
 1360        if ($a_reset_offsets) {
 
 1361            $table_gui->resetToDefaults();
 
 1364        $table_gui->parse();
 
 1366        include_once 
"./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php";
 
 1367        $toolbar = 
new ilToolbarGui();
 
 1368        $ilCtrl->setParameter($this, 
'backv', self::VIEW_MANAGE);
 
 1369        $toolbar->addButton(
$lng->txt(
"cal_add_calendar"), 
$ilCtrl->getLinkTarget($this, 
"add"));
 
 1371        $tpl->setContent($toolbar->getHTML() . $table_gui->getHTML());
 
 1379        global $ilTabs, 
$tpl;
 
 1381        if (!$this->category_id) {
 
 1383            $this->ctrl->returnToParent($this);
 
 1385        if (array_key_exists(
'backv', $_REQUEST)) {
 
 1386            $this->ctrl->setParameter($this, 
'backv', (
int) $_REQUEST[
'backv']);
 
 1389        $this->ctrl->setParameter($this, 
'category_id', $this->category_id);
 
 1397            $this->ctrl->returnToParent($this);
 
 1400        $ilTabs->clearTargets();
 
 1401        $ilTabs->setBackTarget($this->lng->txt(
"back"), $this->ctrl->getLinkTarget($this, 
"cancel"));
 
 1407        $tpl->setContent(
$form->getHTML());
 
 1415        include_once 
'./Services/Form/classes/class.ilPropertyFormGUI.php';
 
 1417        $form->setTitle($this->lng->txt(
'cal_import_tbl'));
 
 1418        $form->setFormAction($this->ctrl->getFormAction($this));
 
 1420        $form->addCommandButton(
'uploadAppointments', $this->lng->txt(
'import'));
 
 1422        $ics = 
new ilFileInputGUI($this->lng->txt(
'cal_import_file'), 
'file');
 
 1423        $ics->setALlowDeletion(
false);
 
 1424        $ics->setSuffixes(array(
'ics'));
 
 1425        $ics->setInfo($this->lng->txt(
'cal_import_file_info'));
 
 1426        $form->addItem($ics);
 
 1436        if ($_REQUEST[
'backv'] == self::VIEW_MANAGE) {
 
 1442        if (
$form->checkInput()) {
 
 1446            ilUtil::moveUploadedFile(
$file[
'tmp_name'], 
$file[
'name'], $tmp);
 
 1448            $num = $this->
doImportFile($tmp, (
int) $_REQUEST[
'category_id']);
 
 1451            $this->ctrl->redirect($this, $back);
 
 1465        include_once 
'./Services/Calendar/classes/../classes/iCal/class.ilICalParser.php';
 
 1466        include_once 
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php';
 
 1468        $GLOBALS[
'ilLog']->write(__METHOD__ . 
': Starting ical import...');
 
 1478        return $assigned_after - $assigned_before;
 
 1495            $lng->txt(
"calendar"),
 
 1496            $ilCtrl->getLinkTarget($this, 
"manage")
 
 1500        $calendars = $status->getOpenInvitations();
 
 1506                $lng->txt(
"cal_shared_calendars"),
 
 1507                $ilCtrl->getLinkTarget($this, 
"invitations")
 
 1511        $ilTabs->activateSubTab($a_active);
 
 1525        include_once(
'./Services/Calendar/classes/class.ilCalendarInboxSharedTableGUI.php');
 
 1526        include_once(
'./Services/Calendar/classes/class.ilCalendarShared.php');
 
 1533        $this->tpl->setContent(
$table->getHTML());
 
 1547        if (!
$_POST[
'cal_ids'] or !is_array(
$_POST[
'cal_ids'])) {
 
 1553        include_once(
'./Services/Calendar/classes/class.ilCalendarSharedStatus.php');
 
 1556        include_once(
'./Services/Calendar/classes/class.ilCalendarShared.php');
 
 1557        foreach (
$_POST[
'cal_ids'] as $calendar_id) {
 
 1563            $status->accept($calendar_id);
 
 1568        $this->ctrl->redirect($this, 
'invitations');
 
 1581        if (!
$_POST[
'cal_ids'] or !is_array(
$_POST[
'cal_ids'])) {
 
 1587        include_once(
'./Services/Calendar/classes/class.ilCalendarSharedStatus.php');
 
 1590        include_once(
'./Services/Calendar/classes/class.ilCalendarShared.php');
 
 1591        foreach (
$_POST[
'cal_ids'] as $calendar_id) {
 
 1597            $status->decline($calendar_id);
 
 1602        $this->ctrl->redirect($this, 
'invitations');
 
sprintf('%.4f', $callTime)
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
An exception for terminatinating execution or to throw for unit testing.
static getInstance()
Get instance.
Administrate calendar appointments.
static _getInstance($a_usr_id=0)
get singleton instance
static _getAssignedAppointments($a_cat_id)
Get assigned apointments.
static lookupNumberOfAssignedAppointments($a_cat_ids)
Get number of assigned appoitments.
static _deleteByAppointmentId($a_app_id)
Delete appointment assignment.
Administration, Side-Block presentation of calendar categories.
showAssignedAppointments()
show assigned aapointments
addSubTabs($a_active)
Add subtabs.
shareSearch()
share calendar
initFormCategory($a_mode)
init edit/create category form
appendCalendarSelection()
readPermissions()
read permissions
details()
show calendar details
invitations()
Invitations.
sharePerformSearch()
share perform search
initImportForm()
Create import form.
deleteAppointments()
delete appointments
switchCalendarMode()
Switch calendar selection nmode.
__construct($a_user_id, $seed, $a_ref_id=0)
Constructor.
declineShared()
accept shared calendar
saveSelection()
save selection of categories
doImportFile($file, $category_id)
Import ics.
isEditable()
check if calendar is editable @access private
shareAssignRolesEditable()
Share editable.
uploadAppointments()
Upload appointments.
shareAssignRoles($a_editable=false)
share assign roles
add(ilPropertyFormGUI $form=null)
add new calendar
unshare()
Stop calendar sharing.
manage($a_reset_offsets=false)
Manage calendars @global type $lng @global type $ilCtrl @global type $tpl.
confirmDelete()
confirm delete
showUserList($a_ids=array())
show user list
edit(ilPropertyFormGUI $form=null)
edit category
shareDeassign()
desassign users/roles from calendar
addReferenceLinks($a_obj_id)
Show links to references.
shareAssignEditable()
Share with write access.
askDeleteAppointments()
ask delete appointments
doSynchronisation(ilCalendarCategory $category)
Sync calendar.
executeCommand()
Execute command.
acceptShared()
accept shared calendar
importAppointments(ilPropertyFormGUI $form=null)
import appointments
shareAssign($a_editable=false)
share assign
getSearchToolbar()
Get search toolbar.
showRoleList($a_ids=array())
show role list
Stores calendar categories.
Model for a calendar entry.
Show shared calendars for a specific user.
show list of alle calendars to manage
Reader for remote ical calendars.
BlockGUI class calendar selection.
static _getInstance()
get singleton instance
Stores status (accepted/declined) of shared calendars.
Handles shared calendars.
static isSharedWithUser($a_usr_id, $a_calendar_id)
is shared with user
static getSharedCalendarsForUser($a_usr_id=0)
get shared calendars of user
const CAL_SELECTION_ITEMS
static _getInstance()
get instance for logged in user
const CAL_SELECTION_MEMBERSHIP
static _getInstanceByUserId($a_user_id, $a_ref_id=0)
get instance by user id
Confirmation screen class.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
This class represents a non editable value in a property form.
static _getUserSearchInstance($query_parser)
get reference of ilLikeUserSearch
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static _getAllReferences($a_id)
get all reference ids of object
static _lookupType($a_id, $a_reference=false)
lookup object type
This class represents an option in a radio group.
special template class to simplify handling of ITX/PEAR
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 ilTempnam($a_temp_path=null)
Create a temporary file in an ILIAS writable directory.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
if(empty($password)) $table
if(isset($_POST['submit'])) $form
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file
foreach($_POST as $key=> $value) $res