24 include_once
'./Services/Calendar/classes/class.ilCalendarSettings.php';
58 $this->lng->loadLanguageModule(
'dateplaner');
61 $this->tabs_gui = $ilTabs;
64 include_once(
'./Services/Calendar/classes/class.ilCalendarCategories.php');
67 include_once
'./Services/Calendar/classes/class.ilCalendarUserSettings.php';
90 include_once(
'./Services/Calendar/classes/class.ilCalendarSettings.php');
103 case 'ilcalendarinboxgui':
104 $this->tabs_gui->activateTab(
'cal_upcoming_events_header');
108 case 'ilconsultationhoursgui':
109 $this->tabs_gui->activateTab(
'app_consultation_hours');
110 $this->tabs_gui->clearTargets();
113 $this->tabs_gui->setBackTarget(
114 $this->lng->txt(
'cal_back_to_cal'),
118 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHoursGUI.php';
120 $this->ctrl->forwardCommand($gui);
123 case 'ilcalendarmonthgui':
124 $this->tabs_gui->activateTab(
'app_month');
128 case 'ilcalendarweekgui':
129 $this->tabs_gui->activateTab(
'app_week');
133 case 'ilcalendardaygui':
134 $this->tabs_gui->activateTab(
'app_day');
138 case 'ilcalendarusersettingsgui':
139 $this->ctrl->setReturn($this,
'');
140 $this->tabs_gui->activateTab(
'settings');
143 include_once(
'./Services/Calendar/classes/class.ilCalendarUserSettingsGUI.php');
145 $this->ctrl->forwardCommand($user_settings);
149 case 'ilcalendarappointmentgui':
150 $this->ctrl->setReturn($this,
'');
151 $this->tabs_gui->activateTab(
$_SESSION[
'cal_last_tab']);
153 include_once(
'./Services/Calendar/classes/class.ilCalendarAppointmentGUI.php');
155 $this->ctrl->forwardCommand($app);
158 case 'ilcalendarsubscriptiongui':
159 $this->ctrl->setReturn($this,
'');
160 $this->tabs_gui->activateTab(
$_SESSION[
'cal_last_tab']);
161 include_once
'./Services/Calendar/classes/class.ilCalendarSubscriptionGUI.php';
163 $this->ctrl->forwardCommand($sub);
166 case 'ilcalendarcategorygui':
167 $this->ctrl->setReturn($this,
'');
169 include_once(
'Services/Calendar/classes/class.ilCalendarCategoryGUI.php');
171 if($this->ctrl->forwardCommand($category))
173 $this->tabs_gui->activateTab(
"cal_manage");
180 $this->tabs_gui->activateTab(
$_SESSION[
'cal_last_tab']);
185 $cmd = $this->ctrl->getCmd(
"show");
207 if(strlen($next_class = $this->ctrl->getNextClass()))
211 if($this->ctrl->getCmdClass() == strtolower(get_class($this)) or $this->ctrl->getCmdClass() ==
'')
225 return $ilUser->getPref(
'cal_last_class') ? $ilUser->getPref(
'cal_last_class') :
'ilcalendarinboxgui';
234 if($this->ctrl->getCmdClass() == strtolower(get_class($this)))
236 $this->ctrl->setCmdClass(strtolower($a_class));
252 case 'ilcalendarmonthgui':
253 $ilUser->writePref(
'cal_last_class',$a_class);
256 include_once(
'./Services/Calendar/classes/class.ilCalendarMonthGUI.php');
258 $this->ctrl->forwardCommand($month_gui);
261 case 'ilcalendarweekgui':
262 $ilUser->writePref(
'cal_last_class',$a_class);
265 include_once(
'./Services/Calendar/classes/class.ilCalendarWeekGUI.php');
267 $this->ctrl->forwardCommand($week_gui);
270 case 'ilcalendardaygui':
271 $ilUser->writePref(
'cal_last_class',$a_class);
274 include_once(
'./Services/Calendar/classes/class.ilCalendarDayGUI.php');
276 $this->ctrl->forwardCommand($day_gui);
279 case 'ilcalendarinboxgui':
280 $ilUser->writePref(
'cal_last_class',$a_class);
281 $_SESSION[
'cal_last_tab'] =
'cal_upcoming_events_header';
283 include_once(
'./Services/Calendar/classes/class.ilCalendarInboxGUI.php');
284 $inbox_gui =
new ilCalendarinboxGUI($this->seed);
285 $this->ctrl->forwardCommand($inbox_gui);
302 $this->ctrl->setCmd(
'');
303 $history = $ilUser->getPref(
'cal_last_class') ? $ilUser->getPref(
'cal_last_class') :
'ilcalendarmonthgui';
318 $tpl =
new ilTemplate(
'tpl.cal_side_block.html',
true,
true,
'Services/Calendar');
320 include_once(
'./Services/Calendar/classes/class.ilMiniCalendarGUI.php');
323 $tpl->setVariable(
'MINICAL',$mini->getHTML());
325 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryGUI.php');
327 $tpl->setVariable(
'CATEGORIES', $ilCtrl->getHTML($cat));
329 $this->tpl->setLeftContent(
$tpl->get());
353 global $rbacsystem, $ilHelp;
355 $ilHelp->setScreenIdComponent(
"cal");
357 $this->tabs_gui->addTarget(
'cal_upcoming_events_header',$this->ctrl->getLinkTargetByClass(
'ilCalendarInboxGUI',
''));
364 $this->tabs_gui->addTarget(
'app_consultation_hours',$this->ctrl->getLinkTargetByClass(
'ilConsultationHoursGUI',
''));
366 $this->tabs_gui->addTarget(
'app_day',$this->ctrl->getLinkTargetByClass(
'ilCalendarDayGUI',
''));
367 $this->tabs_gui->addTarget(
'app_week',$this->ctrl->getLinkTargetByClass(
'ilCalendarWeekGUI',
''));
368 $this->tabs_gui->addTarget(
'app_month',$this->ctrl->getLinkTargetByClass(
'ilCalendarMonthGUI',
''));
369 $this->tabs_gui->addTarget(
'cal_manage',$this->ctrl->getLinkTargetByClass(
'ilCalendarCategoryGUI',
'manage'));
370 $this->tabs_gui->addTarget(
'settings',$this->ctrl->getLinkTargetByClass(
'ilCalendarUserSettingsGUI',
''));
380 include_once(
'Services/Calendar/classes/class.ilDate.php');
383 $this->ctrl->saveParameter($this,array(
'seed'));
404 foreach($cats->getCategoriesInfo() as $cat_id => $info)
417 include_once
'./Services/Calendar/classes/class.ilCalendarRemoteReader.php';
419 $remote->
setUser($category->getRemoteUser());
420 $remote->setPass($category->getRemotePass());
422 $remote->import($category);