6include_once 
'./Services/Calendar/classes/class.ilCalendarSettings.php';
 
   84        $this->ctrl = 
$DIC->ctrl();
 
   85        $this->lng = 
$DIC->language();
 
   86        $this->lng->loadLanguageModule(
'dateplaner');
 
   88        $this->tpl = 
$DIC[
"tpl"];
 
   89        $this->tabs_gui = 
$DIC->tabs();
 
   90        $this->
user = $DIC->user();
 
   91        $this->rbacsystem = 
$DIC->rbac()->system();
 
   92        $this->help = 
$DIC[
"ilHelp"];
 
   93        $this->ui = 
$DIC->ui();
 
   94        $this->toolbar = 
$DIC->toolbar();
 
   95        $this->ref_id = $a_ref_id;
 
   96        $this->category_id = 
$_GET[
"category_id"];
 
   97        $this->ctrl->saveParameter($this, 
"category_id");
 
  100        include_once(
'./Services/Calendar/classes/class.ilCalendarCategories.php');
 
  103        include_once 
'./Services/Calendar/classes/class.ilCalendarUserSettings.php';
 
  105            $this->repository_mode = 
true;
 
  107        if ($this->category_id > 0) {           
 
  109            include_once(
"./Services/Calendar/classes/class.ilCalendarVisibility.php");
 
  111            $vis->forceVisibility($this->category_id);
 
  126        include_once(
"./Services/Calendar/classes/class.ilCalendarActions.php");
 
  148        foreach ($this->cats->getCategoriesInfo() as 
$info) {
 
  153                $v = $visibility->getVisible();
 
  154                if (!in_array(
$info[
"cat_id"], $v)) {
 
  155                    $v[] = 
$info[
"cat_id"];
 
  157                $visibility->showSelected($v);
 
  159                $this->ctrl->redirect($this, 
"");
 
  175        $cmd = $this->ctrl->getCmd();
 
  179        include_once(
'./Services/Calendar/classes/class.ilCalendarSettings.php');
 
  189            case 'selectCHCalendarOfUser':
 
  194        switch ($next_class) {
 
  195            case 'ilcalendarinboxgui':
 
  196                $this->tabs_gui->activateTab(
'cal_agenda');
 
  201                    $inbox_gui->addToolbarActions();
 
  206            case 'ilconsultationhoursgui':
 
  207                $this->tabs_gui->activateTab(
'app_consultation_hours');
 
  208                $this->tabs_gui->clearTargets();
 
  211                $this->tabs_gui->setBackTarget(
 
  212                    $this->lng->txt(
'cal_back_to_cal'),
 
  213                    $this->ctrl->getLinkTargetByClass($this->readLastClass())
 
  216                include_once 
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHoursGUI.php';
 
  218                $this->ctrl->forwardCommand($gui);
 
  224            case 'ilcalendarmonthgui':
 
  225                $this->tabs_gui->activateTab(
'cal_agenda');
 
  231                    $month_gui->addToolbarActions();
 
  235            case 'ilcalendarweekgui':
 
  236                $this->tabs_gui->activateTab(
'cal_agenda');
 
  241                    $week_gui->addToolbarActions();
 
  246            case 'ilcalendardaygui':
 
  247                $this->tabs_gui->activateTab(
'cal_agenda');
 
  252                    $day_gui->addToolbarActions();
 
  256            case 'ilcalendarusersettingsgui':
 
  257                $this->ctrl->setReturn($this, 
'');
 
  258                $this->tabs_gui->activateTab(
'settings');
 
  261                include_once(
'./Services/Calendar/classes/class.ilCalendarUserSettingsGUI.php');
 
  263                $this->ctrl->forwardCommand($user_settings);
 
  267            case 'ilcalendarappointmentgui':
 
  268                $this->ctrl->setReturn($this, 
'');
 
  269                $this->tabs_gui->activateTab(
$_SESSION[
'cal_last_tab']);
 
  271                include_once(
'./Services/Calendar/classes/class.ilCalendarAppointmentGUI.php');
 
  273                $this->ctrl->forwardCommand($app);
 
  276            case 'ilcalendarsubscriptiongui':
 
  277                $this->ctrl->setReturn($this, 
'');
 
  279                $this->tabs_gui->activateTab(
"cal_agenda");
 
  280                include_once 
'./Services/Calendar/classes/class.ilCalendarSubscriptionGUI.php';
 
  282                $this->ctrl->forwardCommand($sub);
 
  288            case 'ilcalendarcategorygui':
 
  289                $this->ctrl->setReturn($this, 
'');
 
  290                $this->tabs_gui->activateTab(
"cal_manage");
 
  291                include_once(
'Services/Calendar/classes/class.ilCalendarCategoryGUI.php');
 
  293                if ($this->ctrl->forwardCommand($category)) {
 
  300                        $this->tabs_gui->setBackTarget($this->lng->txt(
"back"), $this->ctrl->getLinkTarget($this, 
""));
 
  308            case 'ilcalendarblockgui':
 
  310                $side_cal->setAvailableDetailLevels(2, 2);
 
  312                $side_cal->setForceMonthView(
true);
 
  313                $this->ctrl->forwardCommand($side_cal);
 
  317            case 'ilpdcalendarblockgui':
 
  319                $side_cal->setAvailableDetailLevels(2, 2);
 
  321                $side_cal->setForceMonthView(
true);
 
  322                $this->ctrl->forwardCommand($side_cal);
 
  326            case 'ilpublicuserprofilegui':
 
  327                include_once(
"./Services/User/classes/class.ilPublicUserProfileGUI.php");
 
  329                $html = $this->ctrl->forwardCommand($user_profile);
 
  330                $this->tpl->setContent(
$html);
 
  334                $cmd = $this->ctrl->getCmd(
"show");
 
  361            $lng->txt(
"app_day") => 
$ctrl->getLinkTargetByClass(
'ilCalendarDayGUI', 
''),
 
  362            $lng->txt(
"app_week") => 
$ctrl->getLinkTargetByClass(
'ilCalendarWeekGUI', 
''),
 
  363            $lng->txt(
"app_month") => 
$ctrl->getLinkTargetByClass(
'ilCalendarMonthGUI', 
''),
 
  364            $lng->txt(
"cal_list") => 
$ctrl->getLinkTargetByClass(
'ilCalendarInboxGUI', 
'')
 
  367        $aria_label = 
$lng->txt(
"cal_change_calendar_view");
 
  368        $view_control = $f->viewControl()->mode($actions, $aria_label)->withActive(
$lng->txt($a_active));
 
  370        $toolbar->addComponent($view_control);
 
  372        $ctrl->setParameterByClass(
"ilcalendarappointmentgui", 
"seed", $this->seed->get(
IL_CAL_DATE, 
''));
 
  373        $ctrl->setParameterByClass(
"ilcalendarappointmentgui", 
"app_id", 
"");
 
  374        $ctrl->setParameterByClass(
"ilcalendarappointmentgui", 
"dt", 
"");
 
  376        $extra_button_added = 
false;
 
  378        if ($this->category_id == 0 || $this->actions->checkAddEvent($this->category_id)) {
 
  380            $extra_button_added = 
true;
 
  381            $add_button = $f->button()->standard(
 
  382                $lng->txt(
"cal_add_appointment"),
 
  383                $ctrl->getLinkTargetByClass(
"ilcalendarappointmentgui", 
"add")
 
  385            $toolbar->addComponent($add_button);
 
  389        if ($this->category_id > 0 && $this->actions->checkAddEvent($this->category_id)) {
 
  390            if (!$extra_button_added) {
 
  393            $add_button = $f->button()->standard(
 
  394                $lng->txt(
"cal_import_appointments"),
 
  395                $ctrl->getLinkTargetByClass(
"ilcalendarcategorygui", 
"importAppointments")
 
  397            $toolbar->addComponent($add_button);
 
  409        if (strlen($next_class = $this->ctrl->getNextClass())) {
 
  412        if ($this->ctrl->getCmdClass() == strtolower(get_class($this)) or $this->ctrl->getCmdClass() == 
'') {
 
  425        return $ilUser->getPref(
'cal_last_class') ? 
$ilUser->getPref(
'cal_last_class') : 
'ilcalendarinboxgui';
 
  433        if ($this->ctrl->getCmdClass() == strtolower(get_class($this))) {
 
  434            $this->ctrl->setCmdClass(strtolower($a_class));
 
  449            case 'ilcalendarmonthgui':
 
  450                $ilUser->writePref(
'cal_last_class', $a_class);
 
  453                include_once(
'./Services/Calendar/classes/class.ilCalendarMonthGUI.php');
 
  455                $this->ctrl->forwardCommand($month_gui);
 
  459            case 'ilcalendarweekgui':
 
  460                $ilUser->writePref(
'cal_last_class', $a_class);
 
  463                include_once(
'./Services/Calendar/classes/class.ilCalendarWeekGUI.php');
 
  465                $this->ctrl->forwardCommand($week_gui);
 
  469            case 'ilcalendardaygui':
 
  470                $ilUser->writePref(
'cal_last_class', $a_class);
 
  473                include_once(
'./Services/Calendar/classes/class.ilCalendarDayGUI.php');
 
  475                $this->ctrl->forwardCommand($day_gui);
 
  479            case 'ilcalendarinboxgui':
 
  481                if ($view_option = 
$_GET[
'cal_agenda_per']) {
 
  486                $ilUser->writePref(
'cal_last_class', $a_class);
 
  487                $_SESSION[
'cal_last_tab'] = 
'cal_upcoming_events_header';
 
  489                include_once(
'./Services/Calendar/classes/class.ilCalendarInboxGUI.php');
 
  490                $inbox_gui = 
new ilCalendarinboxGUI($this->seed);
 
  491                $this->ctrl->forwardCommand($inbox_gui);
 
  508        $this->ctrl->setCmd(
'');
 
  509        $history = 
$ilUser->getPref(
'cal_last_class') ? 
$ilUser->getPref(
'cal_last_class') : 
'ilcalendarmonthgui';
 
  525        $tpl =  
new ilTemplate(
'tpl.cal_side_block.html', 
true, 
true, 
'Services/Calendar');
 
  538            include_once(
"./Services/Calendar/classes/class.ilCalendarBlockGUI.php");
 
  541            include_once(
"./Services/Calendar/classes/class.ilPDCalendarBlockGUI.php");
 
  544        $side_cal->setAvailableDetailLevels(2, 2);
 
  545        $side_cal->setParentGUI(
"ilCalendarPresentationGUI");
 
  546        $side_cal->setForceMonthView(
true);
 
  548        $tpl->setVariable(
'MINICAL', 
$ilCtrl->getHTML($side_cal));
 
  550        if ($this->category_id == 0) {
 
  551            include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryGUI.php');
 
  553            $tpl->setVariable(
'CATEGORIES', 
$ilCtrl->getHTML($cat));
 
  556        $this->tpl->setRightContent(
$tpl->get());
 
  588        $ilHelp->setScreenIdComponent(
"cal");
 
  591            $this->tabs_gui->clearTargets();
 
  592            $this->tabs_gui->setBackTarget($this->lng->txt(
"back"), $this->ctrl->getParentReturn($this));
 
  594            $this->tabs_gui->addTab(
 
  596                $this->lng->txt(
"cal_agenda"),
 
  597                $this->ctrl->getLinkTarget($this, 
'')
 
  605                $this->tabs_gui->addTarget(
'app_consultation_hours', $this->ctrl->getLinkTargetByClass(
'ilConsultationHoursGUI', 
''));
 
  607            $this->tabs_gui->addTarget(
'cal_manage', $this->ctrl->getLinkTargetByClass(
'ilCalendarCategoryGUI', 
'manage'));
 
  608            $this->tabs_gui->addTarget(
'settings', $this->ctrl->getLinkTargetByClass(
'ilCalendarUserSettingsGUI', 
''));
 
  612        if ($this->category_id > 0) {
 
  624            switch ($category->getType()) {
 
  626                    $header = $this->lng->txt(
'cal_type_personal') . 
": " . $category->getTitle();
 
  630                    $header = $this->lng->txt(
'cal_type_system') . 
": " . $category->getTitle();
 
  634                    $header = $this->lng->txt(
'cal_type_' . $category->getObjType()) . 
": " . $category->getTitle();
 
  642                    $header = $category->getTitle();
 
  649            $this->action_menu->setAsynch(
false);
 
  650            $this->action_menu->setAsynchUrl(
'');
 
  651            $this->action_menu->setListTitle(
$lng->txt(
'actions'));
 
  652            $this->action_menu->setId(
'act_cal');
 
  653            $this->action_menu->setSelectionHeaderClass(
'small');
 
  654            $this->action_menu->setItemLinkClass(
'xsmall');
 
  655            $this->action_menu->setLinksMode(
'il_ContainerItemCommand2');
 
  657            $this->action_menu->setUseImages(
false);
 
  660            $ctrl->setParameterByClass(
"ilcalendarsubscriptiongui", 
"category_id", $this->category_id);
 
  661            $this->action_menu->addItem(
$lng->txt(
"cal_ical_url"), 
"", 
$ctrl->getLinkTargetByClass(
"ilcalendarsubscriptiongui", 
""));
 
  664            if ($this->actions->checkDeleteCal($this->category_id)) {
 
  665                $ctrl->setParameterByClass(
"ilcalendarcategorygui", 
"category_id", $this->category_id);
 
  666                $ctrl->setParameterByClass(
"ilcalendarcategorygui", 
"backv", 
"1");
 
  667                $this->action_menu->addItem(
$lng->txt(
"cal_delete_cal"), 
"", 
$ctrl->getLinkTargetByClass(
"ilcalendarcategorygui", 
"confirmDelete"));
 
  668                $ctrl->clearParameterByClass(
'ilcalendarcategorygui', 
'backv');
 
  671            $tpl->setHeaderActionMenu($this->action_menu->getHTML());
 
  674            $tabs->clearTargets();
 
  675            $ctrl->setParameterByClass(
"ilcalendarcategorygui", 
"category_id", 
"");
 
  676            $ctrl->setParameterByClass(
"ilcalendarpresentationgui", 
"category_id", 
"");
 
  678            if ($this->ref_id > 0) {
 
  679                $tabs->setBackTarget(
$lng->txt(
"back"), 
$ctrl->getLinkTargetByClass(
"ilcalendarpresentationgui", 
""));
 
  681                $tabs->setBackTarget(
$lng->txt(
"back"), 
$ctrl->getLinkTargetByClass(
"ilcalendarcategorygui", 
"manage"));
 
  683            $ctrl->setParameterByClass(
"ilcalendarcategorygui", 
"category_id", 
$_GET[
"category_id"]);
 
  684            $ctrl->setParameterByClass(
"ilcalendarpresentationgui", 
"category_id", 
$_GET[
"category_id"]);
 
  687            $tabs->addTab(
"cal_agenda", 
$lng->txt(
"cal_agenda"), 
$ctrl->getLinkTargetByClass(
"ilcalendarpresentationgui", 
""));
 
  690            if ($this->actions->checkShareCal($this->category_id)) {
 
  691                $tabs->addTab(
"share", 
$lng->txt(
"cal_share"), 
$ctrl->getLinkTargetByClass(
"ilcalendarcategorygui", 
"shareSearch"));
 
  695            if ($this->actions->checkSettingsCal($this->category_id)) {
 
  696                $tabs->addTab(
"edit", 
$lng->txt(
"settings"), 
$ctrl->getLinkTargetByClass(
"ilcalendarcategorygui", 
"edit"));
 
  698            $tabs->activateTab(
"cal_agenda");
 
  709        include_once(
'Services/Calendar/classes/class.ilDate.php');
 
  712        $this->ctrl->saveParameter($this, array(
'seed'));
 
  731        foreach ($cats->getCategoriesInfo() as $cat_id => 
$info) {
 
  732            if (
$info[
'remote']) {
 
  741                    include_once 
'./Services/Calendar/classes/class.ilCalendarRemoteReader.php';
 
  743                    $remote->setUser($category->getRemoteUser());
 
  744                    $remote->setPass($category->getRemotePass());
 
  746                    $remote->import($category);
 
  757        if ($this->ctrl->getCmdClass() == 
"ilcalendarappointmentgui" || $this->ctrl->getCmdClass() == 
'ilconsultationhoursgui') {
 
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
An exception for terminatinating execution or to throw for unit testing.
User interface class for advanced drop-down selection lists.
static getInstance()
Get instance.
Administrate calendar appointments.
Calendar blocks, displayed in different contexts, e.g.
const MODE_PERSONAL_DESKTOP_MEMBERSHIP
const MODE_PERSONAL_DESKTOP_ITEMS
const MODE_SINGLE_CALENDAR
static _getInstance($a_usr_id=0)
get singleton instance
Administration, Side-Block presentation of calendar categories.
Stores calendar categories.
showSideBlocks()
show side blocks
loadHistory()
forward to last presentation class
__construct($a_ref_id=0)
Constructor.
initSeed()
init the seed date for presentations (month view, minicalendar)
executeCommand()
Execute command.
getRepositoryMode()
Get RepositoryMode.
forwardToClass($a_class)
forward to class
readLastClass()
Read last class from history.
initAndRedirectToConsultationHours()
Init and redirect to consultation hours.
showViewSelection($a_active="cal_list")
Show view selection.
getNextClass()
get next class
synchroniseExternalCalendars()
Sync external calendars.
Reader for remote ical calendars.
static _getInstance()
get singleton instance
Show calendar subscription info.
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
Consultation hours editor.
@classDescription Date and time handling
static _before(ilDateTime $start, ilDateTime $end, $a_compare_field='', $a_tz='')
compare two dates and check start is before end This method does not consider tz offsets.
static _lookupFullname($a_user_id)
Lookup Full Name.
Calendar blocks, displayed on personal desktop.
GUI class for public user profile presentation.
static set($a_var, $a_val)
Set a value.
static get($a_var)
Get a value.
special template class to simplify handling of ITX/PEAR
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static redirect($a_script)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
if(!empty($this->data['faventry'])) $tabs