ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
ilCalendarCategoryGUI Class Reference

Administration, Side-Block presentation of calendar categories. More...

+ Collaboration diagram for ilCalendarCategoryGUI:

Public Member Functions

 __construct ($a_user_id, $seed)
 Constructor. More...
 
 executeCommand ()
 Execute command. More...
 
 saveSelection ()
 save selection of categories More...
 
 showCategories ()
 public More...
 
 shareSearch ()
 share calendar More...
 
 sharePerformSearch ()
 share perform search More...
 
 shareAssignEditable ()
 Share with write access. More...
 
 shareAssign ($a_editable=false)
 share assign More...
 
 shareAssignRoles ($a_editable=false)
 share assign roles More...
 
 shareDeassign ()
 desassign users/roles from calendar More...
 
 getHTML ()
 

Data Fields

const SEARCH_USER = 1
 
const SEARCH_ROLE = 2
 
const VIEW_MANAGE = 1
 

Protected Member Functions

 cancel ()
 cancel More...
 
 add ()
 add new calendar More...
 
 save ()
 save new calendar More...
 
 edit ()
 edit category More...
 
 details ()
 show calendar details More...
 
 synchroniseCalendar ()
 
 doSynchronisation (ilCalendarCategory $category)
 Sync calendar. More...
 
 update ()
 update More...
 
 confirmDelete ()
 confirm delete More...
 
 delete ()
 Delete. More...
 
 shareAssignRolesEditable ()
 Share editable. More...
 
 showUserList ($a_ids=array())
 show user list More...
 
 showRoleList ($a_ids=array())
 show role list More...
 
 initFormSearch ()
 init form search More...
 
 initFormCategory ($a_mode)
 init edit/create category form More...
 
 unshare ()
 Stop calendar sharing. More...
 
 showAssignedAppointments ()
 show assigned aapointments More...
 
 askDeleteAppointments ()
 ask delete appointments More...
 
 deleteAppointments ()
 delete appointments More...
 
 appendCalendarSelection ()
 
 switchCalendarMode ()
 Switch calendar selection nmode. More...
 
 checkVisible ()
 
 isImportable ()
 
 addReferenceLinks ($a_obj_id)
 Show links to references. More...
 
 manage ($a_reset_offsets=false)
 Manage calendars type $lng type $ilCtrl type $tpl. More...
 
 importAppointments (ilPropertyFormGUI $form=null)
 import appointments More...
 
 initImportForm ()
 Create import form. More...
 
 uploadAppointments ()
 Upload appointments. More...
 
 doImportFile ($file, $category_id)
 Import ics. More...
 

Protected Attributes

 $user_id
 
 $tpl
 
 $ctrl
 
 $lng
 
 $editable = false
 
 $visible = false
 

Private Member Functions

 readPermissions ()
 read permissions More...
 
 isEditable ()
 check if calendar is editable private More...
 

Detailed Description

Administration, Side-Block presentation of calendar categories.

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

ilCalendarCategoryGUI: ilCalendarAppointmentGUI, ilCalendarSelectionBlockGUI

Definition at line 35 of file class.ilCalendarCategoryGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilCalendarCategoryGUI::__construct (   $a_user_id,
  $seed 
)

Constructor.

public

Parameters
intuser id
Returns

Definition at line 57 of file class.ilCalendarCategoryGUI.php.

References $ilCtrl, and $lng.

58  {
59  global $lng,$ilCtrl;
60 
61  $this->user_id = $a_user_id;
62  $this->seed = $seed;
63  $this->lng = $lng;
64  $this->lng->loadLanguageModule('dateplaner');
65  $this->ctrl = $ilCtrl;
66  }
global $ilCtrl
Definition: ilias.php:18

Member Function Documentation

◆ add()

ilCalendarCategoryGUI::add ( )
protected

add new calendar

protected

Returns

Definition at line 120 of file class.ilCalendarCategoryGUI.php.

References $_REQUEST, $tpl, and initFormCategory().

Referenced by save().

121  {
122  global $tpl, $ilTabs;
123 
124  $ilTabs->clearTargets();
125 
126  if($_REQUEST['backv'] == self::VIEW_MANAGE)
127  {
128  $back = 'manage';
129  }
130  else
131  {
132  $back = 'cancel';
133  }
134 
135  $ilTabs->setBackTarget($this->lng->txt("cal_back_to_list"), $this->ctrl->getLinkTarget($this, $back));
136 
137  $this->tpl = new ilTemplate('tpl.edit_category.html',true,true,'Services/Calendar');
138  $this->initFormCategory('create');
139  $this->tpl->setVariable('EDIT_CAT',$this->form->getHTML());
140  $tpl->setContent($this->tpl->get());
141  }
initFormCategory($a_mode)
init edit/create category form
special template class to simplify handling of ITX/PEAR
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addReferenceLinks()

ilCalendarCategoryGUI::addReferenceLinks (   $a_obj_id)
protected

Show links to references.

Parameters
int$a_obj_id$obj_id
Returns

Definition at line 1369 of file class.ilCalendarCategoryGUI.php.

References $ref_id, $tpl, ilObject\_getAllReferences(), ilLink\_getLink(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilObject\_lookupType(), and ilUtil\getTypeIconPath().

Referenced by details().

1370  {
1371  global $tree;
1372 
1373  $tpl = new ilTemplate('tpl.cal_reference_links.html',true,true,'Services/Calendar');
1374 
1375  foreach(ilObject::_getAllReferences($a_obj_id) as $ref_id => $ref_id)
1376  {
1377  include_once('./Services/Link/classes/class.ilLink.php');
1378 
1379  $parent_ref_id = $tree->getParentId($ref_id);
1380  $parent_obj_id = ilObject::_lookupObjId($parent_ref_id);
1381  $parent_type = ilObject::_lookupType($parent_obj_id);
1382  $parent_title = ilObject::_lookupTitle($parent_obj_id);
1383 
1384  $type = ilObject::_lookupType($a_obj_id);
1385  $title = ilObject::_lookupTitle($a_obj_id);
1386 
1387  $tpl->setCurrentBlock('reference');
1388  $tpl->setVariable('PIMG_SRC',ilUtil::getTypeIconPath($parent_type,$parent_obj_id,'tiny'));
1389  $tpl->setVariable('PIMG_ALT',$this->lng->txt('obj_'.$parent_type));
1390  $tpl->setVariable('PARENT_TITLE',$parent_title);
1391  $tpl->setVariable('PARENT_HREF',ilLink::_getLink($parent_ref_id));
1392 
1393  $tpl->setVariable('SRC',ilUtil::getTypeIconPath($type,$a_obj_id,'tiny'));
1394  $tpl->setVariable('ALT',$this->lng->txt('obj_'.$type));
1395  $tpl->setVariable('TITLE',$title);
1396  $tpl->setVariable('HREF',ilLink::_getLink($ref_id));
1397  $tpl->parseCurrentBlock();
1398  }
1399  return $tpl->get();
1400  }
static _lookupTitle($a_id)
lookup object title
static getTypeIconPath($a_type, $a_obj_id, $a_size='small')
Get type icon path path Return image path for icon_xxx.pngs Or (if enabled) path to custom icon...
static _getAllReferences($a_id)
get all reference ids of object
static _lookupObjId($a_id)
special template class to simplify handling of ITX/PEAR
static _lookupType($a_id, $a_reference=false)
lookup object type
$ref_id
Definition: sahs_server.php:39
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ appendCalendarSelection()

ilCalendarCategoryGUI::appendCalendarSelection ( )
protected
Parameters

Definition at line 1209 of file class.ilCalendarCategoryGUI.php.

References $ilUser, $tpl, ilCalendarUserSettings\_getInstance(), ilCalendarUserSettings\CAL_SELECTION_ITEMS, ilCalendarUserSettings\CAL_SELECTION_MEMBERSHIP, and IL_CAL_DATE.

1210  {
1211  global $ilUser;
1212 
1213  $this->lng->loadLanguageModule('pd');
1214 
1215  $tpl = new ilTemplate('tpl.calendar_selection.html',true,true,'Services/Calendar');
1216  include_once('./Services/Calendar/classes/class.ilCalendarUserSettings.php');
1217  switch(ilCalendarUserSettings::_getInstance()->getCalendarSelectionType())
1218  {
1220  $tpl->setVariable('HTEXT',$this->lng->txt('pd_my_memberships'));
1221  $tpl->touchBlock('head_item');
1222  $tpl->touchBlock('head_delim');
1223  $tpl->touchBlock('head_item');
1224 
1225  $this->ctrl->setParameter($this,'calendar_mode',ilCalendarUserSettings::CAL_SELECTION_ITEMS);
1226  $this->ctrl->setParameter($this,'seed',$this->seed->get(IL_CAL_DATE));
1227  $tpl->setVariable('HHREF',$this->ctrl->getLinkTarget($this,'switchCalendarMode'));
1228  $tpl->setVariable('HLINK',$this->lng->txt('pd_my_offers'));
1229  $tpl->touchBlock('head_item');
1230  break;
1231 
1233  $this->ctrl->setParameter($this,'calendar_mode',ilCalendarUserSettings::CAL_SELECTION_MEMBERSHIP);
1234  $this->ctrl->setParameter($this,'seed',$this->seed->get(IL_CAL_DATE));
1235  $tpl->setVariable('HHREF',$this->ctrl->getLinkTarget($this,'switchCalendarMode'));
1236  $tpl->setVariable('HLINK',$this->lng->txt('pd_my_memberships'));
1237  $tpl->touchBlock('head_item');
1238  $tpl->touchBlock('head_delim');
1239  $tpl->touchBlock('head_item');
1240 
1241  $tpl->setVariable('HTEXT',$this->lng->txt('pd_my_offers'));
1242  $tpl->touchBlock('head_item');
1243  break;
1244 
1245 
1246  }
1247  return $tpl->get();
1248  }
static _getInstance()
get instance for logged in user
special template class to simplify handling of ITX/PEAR
const IL_CAL_DATE
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ askDeleteAppointments()

ilCalendarCategoryGUI::askDeleteAppointments ( )
protected

ask delete appointments

protected

Returns

Definition at line 1133 of file class.ilCalendarCategoryGUI.php.

References $_GET, $_POST, $tpl, details(), and ilUtil\sendFailure().

1134  {
1135  global $tpl;
1136 
1137  if(!count($_POST['appointments']))
1138  {
1139  ilUtil::sendFailure($this->lng->txt('select_one'));
1140  $this->details();
1141  return true;
1142  }
1143 
1144  include_once('./Services/Utilities/classes/class.ilConfirmationGUI.php');
1145  $confirmation_gui = new ilConfirmationGUI();
1146 
1147  $this->ctrl->setParameter($this,'category_id',(int) $_GET['category_id']);
1148  $confirmation_gui->setFormAction($this->ctrl->getFormAction($this));
1149  $confirmation_gui->setHeaderText($this->lng->txt('cal_del_app_sure'));
1150  $confirmation_gui->setConfirm($this->lng->txt('delete'),'deleteAppointments');
1151  $confirmation_gui->setCancel($this->lng->txt('cancel'),'details');
1152 
1153  include_once('./Services/Calendar/classes/class.ilCalendarEntry.php');
1154  foreach($_POST['appointments'] as $app_id)
1155  {
1156  $app = new ilCalendarEntry($app_id);
1157  $confirmation_gui->addItem('appointments[]',(int) $app_id,$app->getTitle());
1158  }
1159 
1160  $tpl->setContent($confirmation_gui->getHTML());
1161  }
Model for a calendar entry.
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
details()
show calendar details
Confirmation screen class.
+ Here is the call graph for this function:

◆ cancel()

ilCalendarCategoryGUI::cancel ( )
protected

cancel

protected

Returns

Definition at line 109 of file class.ilCalendarCategoryGUI.php.

110  {
111  $this->ctrl->returnToParent($this);
112  }

◆ checkVisible()

ilCalendarCategoryGUI::checkVisible ( )
protected
Parameters

Definition at line 1338 of file class.ilCalendarCategoryGUI.php.

References $ilErr.

Referenced by details(), edit(), importAppointments(), and unshare().

1339  {
1340  global $ilErr;
1341 
1342  if(!$this->visible)
1343  {
1344  $ilErr->raiseError($this->lng->txt('permission_denied'),$ilErr->FATAL);
1345  }
1346  }
+ Here is the caller graph for this function:

◆ confirmDelete()

ilCalendarCategoryGUI::confirmDelete ( )
protected

confirm delete

protected

Returns

Definition at line 384 of file class.ilCalendarCategoryGUI.php.

References $_POST, $tpl, manage(), and ilUtil\sendFailure().

385  {
386  global $tpl;
387 
388  if(!$_POST['selected_cat_ids'])
389  {
390  ilUtil::sendFailure($this->lng->txt('select_one'),true);
391  $this->manage();
392  }
393 
394  /*
395  $this->readPermissions();
396  if(!$this->isEditable())
397  {
398  ilUtil::sendFailure($this->lng->txt('permission_denied'));
399  $this->manage();
400  return false;
401  }
402  */
403 
404  include_once('./Services/Utilities/classes/class.ilConfirmationGUI.php');
405  $confirmation_gui = new ilConfirmationGUI();
406 
407  $confirmation_gui->setFormAction($this->ctrl->getFormAction($this));
408  $confirmation_gui->setHeaderText($this->lng->txt('cal_del_cal_sure'));
409  $confirmation_gui->setConfirm($this->lng->txt('delete'),'delete');
410  $confirmation_gui->setCancel($this->lng->txt('cancel'),'manage');
411 
412  include_once('./Services/Calendar/classes/class.ilCalendarCategory.php');
413  foreach($_POST['selected_cat_ids'] as $cat_id)
414  {
415  $category = new ilCalendarCategory((int)$cat_id);
416  $confirmation_gui->addItem('category_id[]',$cat_id,$category->getTitle());
417  }
418 
419  $tpl->setContent($confirmation_gui->getHTML());
420  }
$_POST['username']
Definition: cron.php:12
Stores calendar categories.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
manage($a_reset_offsets=false)
Manage calendars type $lng type $ilCtrl type $tpl.
Confirmation screen class.
+ Here is the call graph for this function:

◆ delete()

ilCalendarCategoryGUI::delete ( )
protected

Delete.

protected

Parameters

Definition at line 429 of file class.ilCalendarCategoryGUI.php.

References $_POST, $ilCtrl, manage(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

430  {
431  global $ilCtrl;
432 
433  if(!$_POST['category_id'])
434  {
435  ilUtil::sendFailure($this->lng->txt('select_one'),true);
436  $this->manage();
437  }
438 
439  /*
440  $this->readPermissions();
441  if(!$this->isEditable())
442  {
443  ilUtil::sendFailure($this->lng->txt('permission_denied'));
444  $this->edit();
445  return false;
446  }
447  */
448 
449  include_once('./Services/Calendar/classes/class.ilCalendarCategory.php');
450  foreach($_POST['category_id'] as $cat_id)
451  {
452  $category = new ilCalendarCategory((int)$cat_id);
453  $category->delete();
454  }
455 
456  ilUtil::sendSuccess($this->lng->txt('cal_cal_deleted'), true);
457  $ilCtrl->redirect($this, 'manage');
458  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
Stores calendar categories.
global $ilCtrl
Definition: ilias.php:18
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
manage($a_reset_offsets=false)
Manage calendars type $lng type $ilCtrl type $tpl.
+ Here is the call graph for this function:

◆ deleteAppointments()

ilCalendarCategoryGUI::deleteAppointments ( )
protected

delete appointments

protected

Returns

Definition at line 1169 of file class.ilCalendarCategoryGUI.php.

References $_POST, ilCalendarCategoryAssignments\_deleteByAppointmentId(), details(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

1170  {
1171  if(!count($_POST['appointments']))
1172  {
1173  ilUtil::sendFailure($this->lng->txt('select_one'));
1174  $this->details();
1175  return true;
1176  }
1177  include_once('./Services/Calendar/classes/class.ilCalendarEntry.php');
1178  foreach($_POST['appointments'] as $app_id)
1179  {
1180  $app = new ilCalendarEntry($app_id);
1181  $app->delete();
1182 
1183  include_once('./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
1185  }
1186 
1187  ilUtil::sendSuccess($this->lng->txt('settings_saved'));
1188  $this->details();
1189  return true;
1190 
1191  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
Model for a calendar entry.
$_POST['username']
Definition: cron.php:12
static _deleteByAppointmentId($a_app_id)
Delete appointment assignment.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
details()
show calendar details
+ Here is the call graph for this function:

◆ details()

ilCalendarCategoryGUI::details ( )
protected

show calendar details

protected

Returns

Definition at line 241 of file class.ilCalendarCategoryGUI.php.

References $_GET, $tpl, addReferenceLinks(), checkVisible(), readPermissions(), ilUtil\sendFailure(), ilCalendarCategory\TYPE_BOOK, ilCalendarCategory\TYPE_CH, ilCalendarCategory\TYPE_GLOBAL, ilCalendarCategory\TYPE_OBJ, and ilCalendarCategory\TYPE_USR.

Referenced by askDeleteAppointments(), and deleteAppointments().

242  {
243  global $tpl;
244 
245  if(!$_GET['category_id'])
246  {
247  ilUtil::sendFailure($this->lng->txt('select_one'),true);
248  $this->ctrl->returnToParent($this);
249  }
250 
251  $this->readPermissions();
252  $this->checkVisible();
253 
254  $category = new ilCalendarCategory((int) $_GET['category_id']);
255  if(!in_array($category->getType(), array(ilCalendarCategory::TYPE_CH, ilCalendarCategory::TYPE_BOOK)))
256  {
257  include_once "./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php";
258  $toolbar = new ilToolbarGui();
259  $toolbar->addButton($this->lng->txt("cal_add_appointment"), $this->ctrl->getLinkTargetByClass("ilcalendarappointmentgui", "add"));
260 
261  if(!in_array($category->getType(), array(ilCalendarCategory::TYPE_CH, ilCalendarCategory::TYPE_BOOK)))
262  {
263  $toolbar->addButton($this->lng->txt("cal_import_appointments"), $this->ctrl->getLinkTarget($this, "importAppointments"));
264  }
265  $toolbar = $toolbar->getHTML();
266  }
267 
268  // Non editable category
269  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
270  $info = new ilInfoScreenGUI($this);
271  $info->setFormAction($this->ctrl->getFormAction($this));
272 
273  $info->addSection($this->lng->txt('cal_cal_details'));
274 
275  // Calendar Name
276  $info->addProperty($this->lng->txt('cal_calendar_name'),$category->getTitle());
277  switch($category->getType())
278  {
280  $info->addProperty($this->lng->txt('cal_cal_type'),$this->lng->txt('cal_type_personal'));
281  break;
282 
284  $info->addProperty($this->lng->txt('cal_cal_type'),$this->lng->txt('cal_type_system'));
285  break;
286 
288  $info->addProperty($this->lng->txt('cal_cal_type'),$this->lng->txt('cal_type_'.$category->getObjType()));
289 
290  $info->addSection($this->lng->txt('additional_info'));
291  $info->addProperty($this->lng->txt('perma_link'),$this->addReferenceLinks($category->getObjId()));
292  break;
293 
296  // nothing to do
297  break;
298  }
299 
300  // Ical link
301  $this->ctrl->setParameterByClass('ilcalendarsubscriptiongui','cal_id',(int) $_GET['category_id']);
302  $info->addProperty(
303  $this->lng->txt('cal_ical_infoscreen'),
304  '<img src="'.ilUtil::getImagePath('ical.png').'" />',
305  $this->ctrl->getLinkTargetByClass(array('ilcalendarpresentationgui','ilcalendarsubscriptiongui'))
306  );
307 
308  $tpl->setContent($toolbar.$info->getHTML().$this->showAssignedAppointments());
309  }
Class ilInfoScreenGUI.
$_GET["client_id"]
addReferenceLinks($a_obj_id)
Show links to references.
Stores calendar categories.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ doImportFile()

ilCalendarCategoryGUI::doImportFile (   $file,
  $category_id 
)
protected

Import ics.

Parameters
type$file
type$category_id

Definition at line 1518 of file class.ilCalendarCategoryGUI.php.

References $file, $GLOBALS, ilICalParser\INPUT_FILE, and ilCalendarCategoryAssignments\lookupNumberOfAssignedAppointments().

Referenced by uploadAppointments().

1519  {
1520  include_once './Services/Calendar/classes/../classes/iCal/class.ilICalParser.php';
1521  include_once './Services/Calendar/classes/class.ilCalendarCategoryAssignments.php';
1522 
1523  $GLOBALS['ilLog']->write(__METHOD__.': Starting ical import...');
1524 
1525  $assigned_before = ilCalendarCategoryAssignments::lookupNumberOfAssignedAppointments(array($category_id));
1526 
1528  $parser->setCategoryId($category_id);
1529  $parser->parse();
1530 
1531  $assigned_after = ilCalendarCategoryAssignments::lookupNumberOfAssignedAppointments(array($category_id));
1532 
1533  return $assigned_after - $assigned_before;
1534  }
print $file
static lookupNumberOfAssignedAppointments($a_cat_ids)
Get number of assigned appoitments.
$GLOBALS['ct_recipient']
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ doSynchronisation()

ilCalendarCategoryGUI::doSynchronisation ( ilCalendarCategory  $category)
protected

Sync calendar.

Parameters
ilCalendarCategory$cat

Definition at line 336 of file class.ilCalendarCategoryGUI.php.

References ilCalendarCategory\getRemotePass(), ilCalendarCategory\getRemoteUrl(), ilCalendarCategory\getRemoteUser(), and ilCalendarRemoteReader\setUser().

Referenced by save(), and synchroniseCalendar().

337  {
338  include_once './Services/Calendar/classes/class.ilCalendarRemoteReader.php';
339  $remote = new ilCalendarRemoteReader($category->getRemoteUrl());
340  $remote->setUser($category->getRemoteUser());
341  $remote->setPass($category->getRemotePass());
342  $remote->read();
343  $remote->import($category);
344  }
Reader for remote ical calendars.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ edit()

ilCalendarCategoryGUI::edit ( )
protected

edit category

protected

Returns

Definition at line 208 of file class.ilCalendarCategoryGUI.php.

References $_GET, $tpl, checkVisible(), initFormCategory(), isEditable(), manage(), readPermissions(), and ilUtil\sendFailure().

Referenced by update().

209  {
210  global $tpl, $ilTabs;
211 
212  if(!$_GET['category_id'])
213  {
214  ilUtil::sendFailure($this->lng->txt('select_one'),true);
215  $this->ctrl->returnToParent($this);
216  }
217 
218  $this->readPermissions();
219  $this->checkVisible();
220 
221  if(!$this->isEditable())
222  {
223  ilUtil::sendFailure($this->lng->txt('permission_denied'));
224  $this->manage();
225  return false;
226  }
227 
228  $ilTabs->clearTargets();
229  $ilTabs->setBackTarget($this->lng->txt("cal_back_to_list"), $this->ctrl->getLinkTarget($this, "manage"));
230 
231  $this->initFormCategory('edit');
232  $tpl->setContent($this->form->getHTML());
233  }
initFormCategory($a_mode)
init edit/create category form
$_GET["client_id"]
isEditable()
check if calendar is editable private
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
manage($a_reset_offsets=false)
Manage calendars type $lng type $ilCtrl type $tpl.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilCalendarCategoryGUI::executeCommand ( )

Execute command.

public

Parameters

Definition at line 75 of file class.ilCalendarCategoryGUI.php.

References $_GET, $cmd, $ilSetting, $ilUser, $tpl, and IL_CAL_DATE.

76  {
77  global $ilUser, $ilSetting,$tpl;
78 
79  $next_class = $this->ctrl->getNextClass($this);
80  $this->ctrl->saveParameter($this,'category_id');
81  $this->ctrl->setParameter($this,'seed',$this->seed->get(IL_CAL_DATE));
82  switch($next_class)
83  {
84  case 'ilcalendarappointmentgui':
85  $this->ctrl->setReturn($this,'details');
86 
87  include_once('./Services/Calendar/classes/class.ilCalendarAppointmentGUI.php');
88  $app = new ilCalendarAppointmentGUI($this->seed,$this->seed, (int) $_GET['app_id']);
89  $this->ctrl->forwardCommand($app);
90  break;
91 
92  default:
93  $cmd = $this->ctrl->getCmd("show");
94  $this->$cmd();
95  if(!in_array($cmd, array("details", "askDeleteAppointments", "deleteAppointments")))
96  {
97  return true;
98  }
99  }
100  return false;
101  }
$_GET["client_id"]
$cmd
Definition: sahs_server.php:35
const IL_CAL_DATE
global $ilUser
Definition: imgupload.php:15
Administrate calendar appointments.
global $ilSetting
Definition: privfeed.php:40

◆ getHTML()

ilCalendarCategoryGUI::getHTML ( )

Definition at line 1193 of file class.ilCalendarCategoryGUI.php.

References $ilCtrl, and $ilUser.

1194  {
1195  global $ilUser, $ilCtrl;
1196 
1197  include_once("./Services/Calendar/classes/class.ilCalendarSelectionBlockGUI.php");
1198  $block_gui = new ilCalendarSelectionBlockGUI($this->seed);
1199  $html = $ilCtrl->getHTML($block_gui);
1200  return $html;
1201  }
BlockGUI class calendar selection.
global $ilCtrl
Definition: ilias.php:18
global $ilUser
Definition: imgupload.php:15

◆ importAppointments()

ilCalendarCategoryGUI::importAppointments ( ilPropertyFormGUI  $form = null)
protected

import appointments

Definition at line 1433 of file class.ilCalendarCategoryGUI.php.

References $_GET, $tpl, checkVisible(), initImportForm(), isImportable(), manage(), readPermissions(), and ilUtil\sendFailure().

1434  {
1435  global $ilTabs, $tpl;
1436 
1437  if(!$_GET['category_id'])
1438  {
1439  ilUtil::sendFailure($this->lng->txt('select_one'),true);
1440  $this->ctrl->returnToParent($this);
1441  }
1442 
1443  $this->ctrl->setParameter($this,'category_id',(int) $_GET['category_id']);
1444 
1445  // Check permissions
1446  $this->readPermissions();
1447  $this->checkVisible();
1448 
1449  if(!$this->isImportable())
1450  {
1451  ilUtil::sendFailure($this->lng->txt('permission_denied'));
1452  $this->manage();
1453  return false;
1454  }
1455 
1456  $ilTabs->clearTargets();
1457  $ilTabs->setBackTarget($this->lng->txt("cal_back_to_list"), $this->ctrl->getLinkTarget($this, "manage"));
1458 
1459 
1460  if(!$form instanceof ilPropertyFormGUI)
1461  {
1462  $form = $this->initImportForm();
1463  }
1464  $tpl->setContent($form->getHTML());
1465  }
initImportForm()
Create import form.
This class represents a property form user interface.
$_GET["client_id"]
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
manage($a_reset_offsets=false)
Manage calendars type $lng type $ilCtrl type $tpl.
+ Here is the call graph for this function:

◆ initFormCategory()

ilCalendarCategoryGUI::initFormCategory (   $a_mode)
protected

init edit/create category form

protected

Returns

Definition at line 942 of file class.ilCalendarCategoryGUI.php.

References $_GET, $ilUser, $location, $pass, ilCalendarCategories\_getInstance(), ilCalendarSettings\_getInstance(), isEditable(), ilCalendarCategory\LTYPE_LOCAL, ilCalendarCategory\LTYPE_REMOTE, ilFormPropertyGUI\setDisabled(), ilRadioOption\setInfo(), ilColorPickerInputGUI\setValue(), ilRadioGroupInputGUI\setValue(), ilCalendarCategory\TYPE_GLOBAL, and ilCalendarCategory\TYPE_USR.

Referenced by add(), and edit().

943  {
944  global $rbacsystem,$ilUser, $ilHelp;
945 
946  $ilHelp->setScreenIdComponent("cal");
947  $ilHelp->setScreenId("cal");
948  if ($a_mode == "edit")
949  {
950  $ilHelp->setSubScreenId("edit");
951  }
952  else
953  {
954  $ilHelp->setSubScreenId("create");
955  }
956 
957  include_once('./Services/Form/classes/class.ilPropertyFormGUI.php');
958  include_once('./Services/Calendar/classes/class.ilCalendarCategory.php');
959 
960  include_once('./Services/Calendar/classes/class.ilCalendarCategories.php');
961  $cat_info = ilCalendarCategories::_getInstance()->getCategoryInfo((int) $_GET['category_id']);
962 
963  $this->form = new ilPropertyFormGUI();
964  #$this->form->setTableWidth('40%');
965  switch($a_mode)
966  {
967  case 'edit':
968  $category = new ilCalendarCategory((int) $_GET['category_id']);
969  $this->form->setTitle($this->lng->txt('cal_edit_category'));
970  $this->ctrl->saveParameter($this,array('seed','category_id'));
971  $this->form->setFormAction($this->ctrl->getFormAction($this));
972  if($this->isEditable())
973  {
974  $this->form->addCommandButton('update',$this->lng->txt('save'));
975 
976  /*
977  if($cat_info['type'] == ilCalendarCategory::TYPE_USR)
978  {
979  $this->form->addCommandButton('shareSearch',$this->lng->txt('cal_share'));
980  }
981  $this->form->addCommandButton('confirmDelete',$this->lng->txt('delete'));
982  */
983 
984  $this->form->addCommandButton('manage',$this->lng->txt('cancel'));
985  }
986  break;
987  case 'create':
988  $this->editable = true;
989  $category = new ilCalendarCategory(0);
990  $this->ctrl->saveParameter($this,array('category_id'));
991  $this->form->setFormAction($this->ctrl->getFormAction($this));
992  $this->form->setTitle($this->lng->txt('cal_add_category'));
993  $this->form->addCommandButton('save',$this->lng->txt('save'));
994  $this->form->addCommandButton('manage',$this->lng->txt('cancel'));
995  break;
996  }
997 
998  // Calendar name
999  $title = new ilTextInputGUI($this->lng->txt('cal_calendar_name'),'title');
1000  if($a_mode == 'edit')
1001  {
1002  $title->setDisabled(!$this->isEditable());
1003  }
1004  $title->setRequired(true);
1005  $title->setMaxLength(64);
1006  $title->setSize(32);
1007  $title->setValue($category->getTitle());
1008  $this->form->addItem($title);
1009 
1010 
1011  include_once('./Services/Calendar/classes/class.ilCalendarSettings.php');
1012  if($a_mode == 'create' and $rbacsystem->checkAccess('edit_event',ilCalendarSettings::_getInstance()->getCalendarSettingsId()))
1013  {
1014  $type = new ilRadioGroupInputGUI($this->lng->txt('cal_cal_type'),'type');
1015  $type->setValue($category->getType());
1016  $type->setRequired(true);
1017 
1018  $opt = new ilRadioOption($this->lng->txt('cal_type_personal'),ilCalendarCategory::TYPE_USR);
1019  $type->addOption($opt);
1020 
1021  $opt = new ilRadioOption($this->lng->txt('cal_type_system'),ilCalendarCategory::TYPE_GLOBAL);
1022  $type->addOption($opt);
1023  $type->setInfo($this->lng->txt('cal_type_info'));
1024  $this->form->addItem($type);
1025  }
1026 
1027 
1028  $color = new ilColorPickerInputGUI($this->lng->txt('cal_calendar_color'),'color');
1029  $color->setValue($category->getColor());
1030  if(!$this->isEditable())
1031  {
1032  $color->setDisabled(true);
1033  }
1034  $color->setRequired(true);
1035  $this->form->addItem($color);
1036 
1037  $location = new ilRadioGroupInputGUI($this->lng->txt('cal_type_rl'), 'type_rl');
1038  $location->setDisabled($a_mode == 'edit');
1039  $location_local = new ilRadioOption($this->lng->txt('cal_type_local'), ilCalendarCategory::LTYPE_LOCAL);
1040  $location->addOption($location_local);
1041  $location_remote = new ilRadioOption($this->lng->txt('cal_type_remote'), ilCalendarCategory::LTYPE_REMOTE);
1042  $location->addOption($location_remote);
1043  $location->setValue($category->getLocationType());
1044 
1045 
1046  $url = new ilTextInputGUI($this->lng->txt('cal_remote_url'), 'remote_url');
1047  $url->setDisabled($a_mode == 'edit');
1048  $url->setValue($category->getRemoteUrl());
1049  $url->setMaxLength(500);
1050  $url->setSize(60);
1051  $url->setRequired(true);
1052  $location_remote->addSubItem($url);
1053 
1054  $user = new ilTextInputGUI($this->lng->txt('username'),'remote_user');
1055  $user->setDisabled($a_mode == 'edit');
1056  $user->setValue($category->getRemoteUser());
1057  $user->setMaxLength(50);
1058  $user->setSize(20);
1059  $user->setRequired(false);
1060  $location_remote->addSubItem($user);
1061 
1062  $pass = new ilPasswordInputGUI($this->lng->txt('password'),'remote_pass');
1063  $pass->setDisabled($a_mode == 'edit');
1064  $pass->setValue($category->getRemotePass());
1065  $pass->setMaxLength(50);
1066  $pass->setSize(20);
1067  $pass->setRetype(false);
1068  $pass->setInfo($this->lng->txt('remote_pass_info'));
1069  $location_remote->addSubItem($pass);
1070 
1071  $this->form->addItem($location);
1072 
1073  }
This class represents an option in a radio group.
static _getInstance()
get singleton instance
This class represents a property form user interface.
$_GET["client_id"]
$location
Definition: buildRTE.php:44
Color picker form for selecting color hexcodes using yui library.
isEditable()
check if calendar is editable private
Stores calendar categories.
setInfo($a_info)
Set Info.
This class represents a property in a property form.
This class represents a text property in a property form.
This class represents a password property in a property form.
static _getInstance($a_usr_id=0)
get singleton instance
global $ilUser
Definition: imgupload.php:15
setDisabled($a_disabled)
Set Disabled.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initFormSearch()

ilCalendarCategoryGUI::initFormSearch ( )
protected

init form search

protected

Parameters

Definition at line 898 of file class.ilCalendarCategoryGUI.php.

References $_POST, $lng, ilTextInputGUI\setValue(), and ilRadioGroupInputGUI\setValue().

Referenced by shareSearch().

899  {
900  global $lng;
901 
902  $lng->loadLanguageModule('search');
903 
904  if(!is_object($this->form))
905  {
906  include_once('Services/Form/classes/class.ilPropertyFormGUI.php');
907  $this->form = new ilPropertyFormGUI();
908  $this->form->setFormAction($this->ctrl->getFormAction($this));
909  $this->form->setTitle($this->lng->txt('cal_share_search_header'));
910  }
911 
912  $type = new ilRadioGroupInputGUI($this->lng->txt('search_type'),'query_type');
913  $type->setValue($_POST['query_type'] ? $_POST['query_type'] : self::SEARCH_USER);
914  $type->setRequired(true);
915 
916  $user = new ilRadioOption($this->lng->txt('obj_user'),self::SEARCH_USER);
917  $type->addOption($user);
918 
919  $role = new ilRadioOption($this->lng->txt('obj_role'),self::SEARCH_ROLE);
920  $type->addOption($role);
921 
922  $this->form->addItem($type);
923 
924  $search = new ilTextInputGUI($this->lng->txt('cal_search'),'query');
925  $search->setValue($_POST['query']);
926  $search->setSize(16);
927  $search->setMaxLength(128);
928  $search->setRequired(true);
929  $search->setInfo($this->lng->txt('cal_search_info_share'));
930 
931  $this->form->addItem($search);
932  $this->form->addCommandButton('sharePerformSearch',$this->lng->txt('search'));
933  // $this->form->addCommandButton('manage',$this->lng->txt('cancel'));
934  }
This class represents an option in a radio group.
$_POST['username']
Definition: cron.php:12
This class represents a property form user interface.
This class represents a property in a property form.
This class represents a text property in a property form.
setValue($a_value)
Set Value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initImportForm()

ilCalendarCategoryGUI::initImportForm ( )
protected

Create import form.

Definition at line 1470 of file class.ilCalendarCategoryGUI.php.

References ilFileInputGUI\setALlowDeletion().

Referenced by importAppointments(), and uploadAppointments().

1471  {
1472  include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
1473  $form = new ilPropertyFormGUI();
1474  $form->setTitle($this->lng->txt('cal_import_tbl'));
1475  $form->setFormAction($this->ctrl->getFormAction($this));
1476 
1477  $form->addCommandButton('uploadAppointments',$this->lng->txt('import'));
1478 
1479  $ics = new ilFileInputGUI($this->lng->txt('cal_import_file'), 'file');
1480  $ics->setALlowDeletion(false);
1481  $ics->setSuffixes(array('ics'));
1482  $ics->setInfo($this->lng->txt('cal_import_file_info'));
1483  $form->addItem($ics);
1484 
1485  return $form;
1486  }
This class represents a property form user interface.
setALlowDeletion($a_val)
Set allow deletion.
This class represents a file property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isEditable()

ilCalendarCategoryGUI::isEditable ( )
private

check if calendar is editable private

Returns

Definition at line 1353 of file class.ilCalendarCategoryGUI.php.

References $editable.

Referenced by edit(), initFormCategory(), shareAssign(), shareAssignRoles(), shareDeassign(), shareSearch(), and update().

1354  {
1355  return $this->editable;
1356  }
+ Here is the caller graph for this function:

◆ isImportable()

ilCalendarCategoryGUI::isImportable ( )
protected

Definition at line 1358 of file class.ilCalendarCategoryGUI.php.

Referenced by importAppointments().

1359  {
1360  return $this->importable;
1361  }
+ Here is the caller graph for this function:

◆ manage()

ilCalendarCategoryGUI::manage (   $a_reset_offsets = false)
protected

Manage calendars type $lng type $ilCtrl type $tpl.

Definition at line 1408 of file class.ilCalendarCategoryGUI.php.

References $ilCtrl, $lng, and $tpl.

Referenced by confirmDelete(), delete(), edit(), importAppointments(), save(), shareSearch(), and update().

1409  {
1410  global $lng, $ilCtrl, $tpl;
1411 
1412  include_once('./Services/Calendar/classes/class.ilCalendarManageTableGUI.php');
1413  $table_gui = new ilCalendarManageTableGUI($this);
1414 
1415  if($a_reset_offsets)
1416  {
1417  $table_gui->resetToDefaults();
1418  }
1419 
1420  $table_gui->parse();
1421 
1422  include_once "./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php";
1423  $toolbar = new ilToolbarGui();
1424  $ilCtrl->setParameter($this,'backv',self::VIEW_MANAGE);
1425  $toolbar->addButton($lng->txt("cal_add_calendar"), $ilCtrl->getLinkTarget($this, "add"));
1426 
1427  $tpl->setContent($toolbar->getHTML().$table_gui->getHTML());
1428  }
show list of alle calendars to manage
global $ilCtrl
Definition: ilias.php:18
+ Here is the caller graph for this function:

◆ readPermissions()

ilCalendarCategoryGUI::readPermissions ( )
private

read permissions

private

Parameters

Definition at line 1272 of file class.ilCalendarCategoryGUI.php.

References $_GET, $ilUser, ilObject\_getAllReferences(), ilCalendarSettings\_getInstance(), ilCalendarShared\getSharedCalendarsForUser(), ilCalendarCategory\TYPE_BOOK, ilCalendarCategory\TYPE_CH, ilCalendarCategory\TYPE_GLOBAL, ilCalendarCategory\TYPE_OBJ, and ilCalendarCategory\TYPE_USR.

Referenced by details(), edit(), importAppointments(), shareAssign(), shareAssignRoles(), shareDeassign(), shareSearch(), unshare(), and update().

1273  {
1274  global $ilUser,$rbacsystem,$ilAccess;
1275 
1276  $this->editable = false;
1277  $this->visible = false;
1278  $this->importable = false;
1279 
1280  include_once('./Services/Calendar/classes/class.ilCalendarShared.php');
1281 
1282  $shared = ilCalendarShared::getSharedCalendarsForUser($ilUser->getId());
1283  $cat = new ilCalendarCategory((int) $_GET['category_id']);
1284 
1285  switch($cat->getType())
1286  {
1288 
1289  if($cat->getObjId() == $ilUser->getId())
1290  {
1291  $this->visible = true;
1292  $this->editable = true;
1293  $this->importable = true;
1294  }
1295  elseif(isset($shared[$cat->getCategoryID()]))
1296  {
1297  $this->visible = true;
1298  }
1299  break;
1300 
1302  $this->importable = $this->editable = $rbacsystem->checkAccess('edit_event',ilCalendarSettings::_getInstance()->getCalendarSettingsId());
1303  $this->visible = true;
1304  break;
1305 
1307  $this->editable = false;
1308 
1309  $refs = ilObject::_getAllReferences($cat->getObjId());
1310  foreach($refs as $ref)
1311  {
1312  if($ilAccess->checkAccess('read','',$ref))
1313  {
1314  $this->visible = true;
1315  }
1316  if($ilAccess->checkAccess('edit_event','',$ref))
1317  {
1318  $this->importable = true;
1319  }
1320  }
1321  break;
1322 
1325  $this->editable = $ilUser->getId() == $cat->getCategoryID();
1326  $this->visible = true;
1327  $this->importable = false;
1328  break;
1329  }
1330 
1331  }
static _getInstance()
get singleton instance
static getSharedCalendarsForUser($a_usr_id=0)
get shared calendars of user
$_GET["client_id"]
Stores calendar categories.
static _getAllReferences($a_id)
get all reference ids of object
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ save()

ilCalendarCategoryGUI::save ( )
protected

save new calendar

protected

Definition at line 148 of file class.ilCalendarCategoryGUI.php.

References $_POST, $ilUser, add(), doSynchronisation(), ilCalendarCategory\LTYPE_REMOTE, manage(), ilUtil\sendFailure(), ilUtil\sendSuccess(), ilUtil\stripSlashes(), ilCalendarCategory\TYPE_GLOBAL, and ilCalendarCategory\TYPE_USR.

149  {
150  global $ilUser;
151 
152  include_once('./Services/Calendar/classes/class.ilCalendarCategory.php');
153  $category = new ilCalendarCategory(0);
154  $category->setTitle(ilUtil::stripSlashes($_POST['title']));
155  $category->setColor('#'.ilUtil::stripSlashes($_POST['color']));
156  $category->setLocationType((int) $_POST['type_rl']);
157  $category->setRemoteUrl(ilUtil::stripSlashes($_POST['remote_url']));
158  $category->setRemoteUser(ilUtil::stripSlashes($_POST['remote_user']));
159  $category->setRemotePass(ilUtil::stripSlashes($_POST['remote_pass']));
160 
161  if(isset($_POST['type']) and $_POST['type'] == ilCalendarCategory::TYPE_GLOBAL)
162  {
163  $category->setType((int) $_POST['type']);
164  $category->setObjId(0);
165  }
166  else
167  {
168  $category->setType(ilCalendarCategory::TYPE_USR);
169  $category->setObjId($ilUser->getId());
170  }
171 
172  if(!$category->validate())
173  {
174  ilUtil::sendFailure($this->lng->txt('err_check_input'));
175  $this->add();
176  return false;
177  }
178  $category->add();
179 
180 
181  try {
182 
183  if($category->getLocationType() == ilCalendarCategory::LTYPE_REMOTE)
184  {
185  $this->doSynchronisation($category);
186  }
187  }
188  catch(Exception $e)
189  {
190  // Delete calendar if creation failed
191  $category->delete();
192  ilUtil::sendFailure($e->getMessage());
193  $this->manage();
194  return true;
195  }
196 
197  ilUtil::sendSuccess($this->lng->txt('settings_saved'),true);
198  // $this->ctrl->returnToParent($this);
199  $this->manage(true);
200  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
Stores calendar categories.
doSynchronisation(ilCalendarCategory $category)
Sync calendar.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
global $ilUser
Definition: imgupload.php:15
manage($a_reset_offsets=false)
Manage calendars type $lng type $ilCtrl type $tpl.
+ Here is the call graph for this function:

◆ saveSelection()

ilCalendarCategoryGUI::saveSelection ( )

save selection of categories

public

Parameters

Definition at line 469 of file class.ilCalendarCategoryGUI.php.

References $_POST, $ilUser, ilCalendarCategories\_getInstance(), ilCalendarHidden\_getInstanceByUserId(), and ilUtil\sendSuccess().

470  {
471  global $ilUser;
472 
473  include_once('./Services/Calendar/classes/class.ilCalendarCategories.php');
474  include_once('./Services/Calendar/classes/class.ilCalendarHidden.php');
475 
476  $selected_cat_ids = $_POST['selected_cat_ids'] ? $_POST['selected_cat_ids'] : array();
477  $shown_cat_ids = $_POST['shown_cat_ids'] ? $_POST['shown_cat_ids'] : array();
478 
479  $cats = ilCalendarCategories::_getInstance($ilUser->getId());
480  $cat_ids = $cats->getCategories();
481 
482  $hidden_cats = ilCalendarHidden::_getInstanceByUserId($ilUser->getId());
483  $hidden_cat_ids = $hidden_cats->getHidden();
484 
485  $hidden = array();
486 
487  foreach($hidden_cat_ids as $hidden_cat_id)
488  {
489  if( !in_array($hidden_cat_id,$shown_cat_ids) )
490  {
491  $hidden[] = $hidden_cat_id;
492  }
493  }
494 
495  foreach($shown_cat_ids as $shown_cat_id)
496  {
497  $shown_cat_id = (int)$shown_cat_id;
498  if( !in_array($shown_cat_id, $selected_cat_ids) )
499  {
500  $hidden[] = $shown_cat_id;
501  }
502  }
503 
504  $hidden_categories = ilCalendarHidden::_getInstanceByUserId($this->user_id);
505  $hidden_categories->hideSelected($hidden);
506  $hidden_categories->save();
507 
508  ilUtil::sendSuccess($this->lng->txt('settings_saved'),true);
509  $this->ctrl->returnToParent($this);
510  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
static _getInstanceByUserId($a_user_id)
get instance by user id
static _getInstance($a_usr_id=0)
get singleton instance
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ shareAssign()

ilCalendarCategoryGUI::shareAssign (   $a_editable = false)

share assign

public

Returns

Definition at line 709 of file class.ilCalendarCategoryGUI.php.

References $_GET, $_POST, $ilUser, $user_id, isEditable(), readPermissions(), ilUtil\sendFailure(), ilUtil\sendSuccess(), sharePerformSearch(), shareSearch(), and ilCalendarShared\TYPE_USR.

Referenced by shareAssignEditable().

710  {
711  global $ilUser;
712 
713  if(!$_GET['category_id'])
714  {
715  ilUtil::sendFailure($this->lng->txt('select_one'),true);
716  $this->ctrl->returnToParent($this);
717  }
718  if(!count($_POST['user_ids']))
719  {
720  ilUtil::sendFailure($this->lng->txt('select_one'));
721  $this->sharePerformSearch();
722  return false;
723  }
724 
725  $this->readPermissions();
726  if(!$this->isEditable())
727  {
728  ilUtil::sendFailure($this->lng->txt('permission_denied'));
729  $this->shareSearch();
730  return false;
731  }
732 
733 
734  include_once('./Services/Calendar/classes/class.ilCalendarShared.php');
735  $shared = new ilCalendarShared((int) $_GET['category_id']);
736 
737  foreach($_POST['user_ids'] as $user_id)
738  {
739  if($ilUser->getId() != $user_id)
740  {
741  $shared->share($user_id,ilCalendarShared::TYPE_USR,$a_editable);
742  }
743  }
744  ilUtil::sendSuccess($this->lng->txt('cal_shared_selected_usr'));
745  $this->shareSearch();
746  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
sharePerformSearch()
share perform search
$_GET["client_id"]
isEditable()
check if calendar is editable private
Handles shared calendars.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ shareAssignEditable()

ilCalendarCategoryGUI::shareAssignEditable ( )

Share with write access.

Definition at line 698 of file class.ilCalendarCategoryGUI.php.

References shareAssign().

699  {
700  return $this->shareAssign(true);
701  }
shareAssign($a_editable=false)
share assign
+ Here is the call graph for this function:

◆ shareAssignRoles()

ilCalendarCategoryGUI::shareAssignRoles (   $a_editable = false)

share assign roles

public

Parameters

Definition at line 763 of file class.ilCalendarCategoryGUI.php.

References $_GET, $_POST, $ilUser, isEditable(), readPermissions(), ilUtil\sendFailure(), ilUtil\sendSuccess(), sharePerformSearch(), shareSearch(), and ilCalendarShared\TYPE_ROLE.

764  {
765  global $ilUser;
766 
767  if(!$_GET['category_id'])
768  {
769  ilUtil::sendFailure($this->lng->txt('select_one'),true);
770  $this->ctrl->returnToParent($this);
771  }
772  if(!count($_POST['role_ids']))
773  {
774  ilUtil::sendFailure($this->lng->txt('select_one'));
775  $this->sharePerformSearch();
776  return false;
777  }
778 
779  $this->readPermissions();
780  if(!$this->isEditable())
781  {
782  ilUtil::sendFailure($this->lng->txt('permission_denied'));
783  $this->shareSearch();
784  return false;
785  }
786 
787  include_once('./Services/Calendar/classes/class.ilCalendarShared.php');
788  $shared = new ilCalendarShared((int) $_GET['category_id']);
789 
790  foreach($_POST['role_ids'] as $role_id)
791  {
792  $shared->share($role_id,ilCalendarShared::TYPE_ROLE,$a_editable);
793  }
794  ilUtil::sendSuccess($this->lng->txt('cal_shared_selected_usr'));
795  $this->shareSearch();
796  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
sharePerformSearch()
share perform search
$_GET["client_id"]
isEditable()
check if calendar is editable private
Handles shared calendars.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ shareAssignRolesEditable()

ilCalendarCategoryGUI::shareAssignRolesEditable ( )
protected

Share editable.

Definition at line 751 of file class.ilCalendarCategoryGUI.php.

752  {
753  return $this->shareAssignRolesEditable(true);
754  }
shareAssignRolesEditable()
Share editable.

◆ shareDeassign()

ilCalendarCategoryGUI::shareDeassign ( )

desassign users/roles from calendar

public

Parameters

Definition at line 805 of file class.ilCalendarCategoryGUI.php.

References $_GET, $_POST, isEditable(), readPermissions(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and shareSearch().

806  {
807  if(!$_GET['category_id'])
808  {
809  ilUtil::sendFailure($this->lng->txt('select_one'),true);
810  $this->ctrl->returnToParent($this);
811  }
812  if(!count($_POST['obj_ids']))
813  {
814  ilUtil::sendFailure($this->lng->txt('select_one'));
815  $this->shareSearch();
816  return false;
817  }
818 
819  $this->readPermissions();
820  if(!$this->isEditable())
821  {
822  ilUtil::sendFailure($this->lng->txt('permission_denied'));
823  $this->shareSearch();
824  return false;
825  }
826 
827 
828  include_once('./Services/Calendar/classes/class.ilCalendarShared.php');
829  $shared = new ilCalendarShared((int) $_GET['category_id']);
830 
831  foreach($_POST['obj_ids'] as $obj_id)
832  {
833  $shared->stopSharing($obj_id);
834  }
835  ilUtil::sendSuccess($this->lng->txt('cal_unshared_selected_usr'));
836  $this->shareSearch();
837  return true;
838  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
isEditable()
check if calendar is editable private
Handles shared calendars.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ sharePerformSearch()

ilCalendarCategoryGUI::sharePerformSearch ( )

share perform search

public

Returns

Definition at line 594 of file class.ilCalendarCategoryGUI.php.

References $_GET, $_POST, $_SESSION, $query, $res, ilObjectSearchFactory\_getUserSearchInstance(), QP_COMBINATION_OR, ilUtil\sendFailure(), shareSearch(), showRoleList(), showUserList(), and ilUtil\stripSlashes().

Referenced by shareAssign(), and shareAssignRoles().

595  {
596  global $ilTabs;
597 
598  $this->lng->loadLanguageModule('search');
599 
600  if(!$_GET['category_id'])
601  {
602  ilUtil::sendFailure($this->lng->txt('select_one'),true);
603  $this->ctrl->returnToParent($this);
604  }
605  $this->ctrl->saveParameter($this,'category_id');
606 
607 
608  if(!isset($_POST['query']))
609  {
610  $query = $_SESSION['cal_query'];
611  $type = $_SESSION['cal_type'];
612  }
613  elseif($_POST['query'])
614  {
615  $query = $_SESSION['cal_query'] = $_POST['query'];
616  $type = $_SESSION['cal_type'] = $_POST['query_type'];
617  }
618 
619  if(!$query)
620  {
621  ilUtil::sendFailure($this->lng->txt('msg_no_search_string'));
622  $this->shareSearch();
623  return false;
624  }
625 
626 
627  include_once 'Services/Search/classes/class.ilQueryParser.php';
628  include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
629  include_once 'Services/Search/classes/class.ilSearchResult.php';
630 
631  $res_sum = new ilSearchResult();
632 
633  $query_parser = new ilQueryParser(ilUtil::stripSlashes($query));
634  $query_parser->setCombination(QP_COMBINATION_OR);
635  $query_parser->setMinWordLength(3);
636  $query_parser->parse();
637 
638 
639  switch($type)
640  {
641  case self::SEARCH_USER:
642  $search = ilObjectSearchFactory::_getUserSearchInstance($query_parser);
643  $search->enableActiveCheck(true);
644 
645  $search->setFields(array('login'));
646  $res = $search->performSearch();
647  $res_sum->mergeEntries($res);
648 
649  $search->setFields(array('firstname'));
650  $res = $search->performSearch();
651  $res_sum->mergeEntries($res);
652 
653  $search->setFields(array('lastname'));
654  $res = $search->performSearch();
655  $res_sum->mergeEntries($res);
656 
657  $res_sum->filter(ROOT_FOLDER_ID,QP_COMBINATION_OR);
658  break;
659 
660  case self::SEARCH_ROLE:
661 
662  include_once 'Services/Search/classes/Like/class.ilLikeObjectSearch.php';
663  $search = new ilLikeObjectSearch($query_parser);
664  $search->setFilter(array('role'));
665 
666  $res = $search->performSearch();
667  $res_sum->mergeEntries($res);
668 
669  $res_sum->filter(ROOT_FOLDER_ID,QP_COMBINATION_OR);
670  break;
671  }
672 
673  if(!count($res_sum->getResults()))
674  {
675  ilUtil::sendFailure($this->lng->txt('search_no_match'));
676  $this->shareSearch();
677  return true;
678  }
679 
680  $ilTabs->clearTargets();
681  $ilTabs->setBackTarget($this->lng->txt("cal_back_to_search"), $this->ctrl->getLinkTarget($this, "shareSearch"));
682 
683  switch($type)
684  {
685  case self::SEARCH_USER:
686  $this->showUserList($res_sum->getResultIds());
687  break;
688 
689  case self::SEARCH_ROLE:
690  $this->showRoleList($res_sum->getResultIds());
691  break;
692  }
693  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
showUserList($a_ids=array())
show user list
const QP_COMBINATION_OR
static _getUserSearchInstance($query_parser)
get reference of ilLikeUserSearch
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
showRoleList($a_ids=array())
show role list
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ shareSearch()

ilCalendarCategoryGUI::shareSearch ( )

share calendar

public

Parameters

Definition at line 553 of file class.ilCalendarCategoryGUI.php.

References $_GET, $_SESSION, $tpl, initFormSearch(), isEditable(), manage(), readPermissions(), and ilUtil\sendFailure().

Referenced by shareAssign(), shareAssignRoles(), shareDeassign(), and sharePerformSearch().

554  {
555  global $tpl, $ilTabs;
556 
557  if(!$_GET['category_id'])
558  {
559  ilUtil::sendFailure($this->lng->txt('select_one'),true);
560  $this->ctrl->returnToParent($this);
561  }
562 
563  $this->readPermissions();
564  if(!$this->isEditable())
565  {
566  ilUtil::sendFailure($this->lng->txt('permission_denied'));
567  $this->manage();
568  return false;
569  }
570 
571  $ilTabs->clearTargets();
572  $ilTabs->setBackTarget($this->lng->txt("cal_back_to_list"), $this->ctrl->getLinkTarget($this, "manage"));
573 
574  $_SESSION['cal_query'] = '';
575 
576  $this->ctrl->saveParameter($this,'category_id');
577  $this->initFormSearch();
578 
579  include_once('./Services/Calendar/classes/class.ilCalendarSharedListTableGUI.php');
580  $table = new ilCalendarSharedListTableGUI($this,'shareSearch');
581  $table->setTitle($this->lng->txt('cal_shared_header'));
582  $table->setCalendarId((int) $_GET['category_id']);
583  $table->parse();
584 
585  $tpl->setContent($this->form->getHTML().'<br />'.$table->getHTML());
586  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_GET["client_id"]
isEditable()
check if calendar is editable private
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
manage($a_reset_offsets=false)
Manage calendars type $lng type $ilCtrl type $tpl.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showAssignedAppointments()

ilCalendarCategoryGUI::showAssignedAppointments ( )
protected

show assigned aapointments

protected

Returns

Definition at line 1113 of file class.ilCalendarCategoryGUI.php.

References $_GET, ilCalendarCategoryAssignments\_getAssignedAppointments(), and ilCalendarCategories\_getInstance().

1114  {
1115  include_once('./Services/Calendar/classes/class.ilCalendarCategoryTableGUI.php');
1116  include_once('./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
1117  include_once('./Services/Calendar/classes/class.ilCalendarAppointmentsTableGUI.php');
1118 
1119  $table_gui = new ilCalendarAppointmentsTableGUI($this, 'details', (int)$_GET['category_id']);
1120  $table_gui->setTitle($this->lng->txt('cal_assigned_appointments'));
1121  $table_gui->setAppointments(
1123  ilCalendarCategories::_getInstance()->getSubitemCategories((int) $_GET['category_id'])));
1124  return $table_gui->getHTML();
1125  }
$_GET["client_id"]
static _getInstance($a_usr_id=0)
get singleton instance
static _getAssignedAppointments($a_cat_id)
Get assigned apointments.
+ Here is the call graph for this function:

◆ showCategories()

ilCalendarCategoryGUI::showCategories ( )

public

Parameters

Definition at line 519 of file class.ilCalendarCategoryGUI.php.

References $_GET, $_POST, and $_SESSION.

520  {
521  include_once('./Services/Calendar/classes/class.ilCalendarCategoryTableGUI.php');
522  $table_gui = new ilCalendarCategoryTableGUI($this,$this->seed);
523  $nav_parameter = $table_gui->getNavParameter();
524 
525  if($_POST[$nav_parameter] != "")
526  {
527  if($_POST[$nav_parameter."1"] != $_POST[$nav_parameter])
528  {
529  $nav_value = $_POST[$nav_parameter."1"];
530  }
531  elseif($_POST[$nav_parameter."2"] != $_POST[$nav_parameter])
532  {
533  $nav_value = $_POST[$nav_parameter."2"];
534  }
535  }
536  else
537  {
538  $nav_value = $_GET[$nav_parameter];
539  }
540 
541  $_SESSION[$nav_parameter] = $nav_value;
542 
543  $this->ctrl->returnToParent($this);
544  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_POST['username']
Definition: cron.php:12
show presentation of calendar category side block
$_GET["client_id"]

◆ showRoleList()

ilCalendarCategoryGUI::showRoleList (   $a_ids = array())
protected

show role list

protected

Parameters
arrayarray of role ids
Returns

Definition at line 873 of file class.ilCalendarCategoryGUI.php.

References $tpl.

Referenced by sharePerformSearch().

874  {
875  global $tpl;
876 
877  include_once('./Services/Calendar/classes/class.ilCalendarSharedRoleListTableGUI.php');
878 
879  $table = new ilCalendarSharedRoleListTableGUI($this,'sharePerformSearch');
880  $table->setTitle($this->lng->txt('cal_share_search_role_header'));
881  $table->setFormAction($this->ctrl->getFormAction($this));
882  $table->setRoles($a_ids);
883  $table->parse();
884 
885  // $table->addCommandButton('shareSearch',$this->lng->txt('search_new'));
886  // $table->addCommandButton('manage',$this->lng->txt('cancel'));
887 
888  $tpl->setContent($table->getHTML());
889  }
+ Here is the caller graph for this function:

◆ showUserList()

ilCalendarCategoryGUI::showUserList (   $a_ids = array())
protected

show user list

protected

Parameters
arrayarray of user ids
Returns

Definition at line 848 of file class.ilCalendarCategoryGUI.php.

References $tpl.

Referenced by sharePerformSearch().

849  {
850  global $tpl;
851 
852  include_once('./Services/Calendar/classes/class.ilCalendarSharedUserListTableGUI.php');
853 
854  $table = new ilCalendarSharedUserListTableGUI($this,'sharePerformSearch');
855  $table->setTitle($this->lng->txt('cal_share_search_usr_header'));
856  $table->setFormAction($this->ctrl->getFormAction($this));
857  $table->setUsers($a_ids);
858  $table->parse();
859 
860  // $table->addCommandButton('shareSearch',$this->lng->txt('search_new'));
861  // $table->addCommandButton('manage',$this->lng->txt('cancel'));
862 
863  $tpl->setContent($table->getHTML());
864  }
+ Here is the caller graph for this function:

◆ switchCalendarMode()

ilCalendarCategoryGUI::switchCalendarMode ( )
protected

Switch calendar selection nmode.

Returns

Definition at line 1254 of file class.ilCalendarCategoryGUI.php.

References $_GET, and ilCalendarUserSettings\_getInstance().

1255  {
1256  include_once('./Services/Calendar/classes/class.ilCalendarUserSettings.php');
1257  ilCalendarUserSettings::_getInstance()->setCalendarSelectionType((int) $_GET['calendar_mode']);
1259 
1260  $this->ctrl->returnToParent($this);
1261 
1262  }
$_GET["client_id"]
static _getInstance()
get instance for logged in user
+ Here is the call graph for this function:

◆ synchroniseCalendar()

ilCalendarCategoryGUI::synchroniseCalendar ( )
protected

Definition at line 311 of file class.ilCalendarCategoryGUI.php.

References $_GET, doSynchronisation(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

312  {
313  if(!$_GET['category_id'])
314  {
315  ilUtil::sendFailure($this->lng->txt('select_one'),true);
316  $this->ctrl->returnToParent($this);
317  }
318 
319  $category = new ilCalendarCategory((int) $_GET['category_id']);
320 
321  try {
322  $this->doSynchronisation($category);
323  }
324  catch(Exception $e) {
325  ilUtil::sendFailure($e->getMessage(),true);
326  $this->ctrl->redirect($this,'manage');
327  }
328  ilUtil::sendSuccess($this->lng->txt('cal_cal_sync_success'),true);
329  $this->ctrl->redirect($this,'manage');
330  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_GET["client_id"]
Stores calendar categories.
doSynchronisation(ilCalendarCategory $category)
Sync calendar.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ unshare()

ilCalendarCategoryGUI::unshare ( )
protected

Stop calendar sharing.

Definition at line 1078 of file class.ilCalendarCategoryGUI.php.

References $_GET, $ilUser, checkVisible(), ilCalendarShared\isSharedWithUser(), readPermissions(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

1079  {
1080  global $ilUser;
1081 
1082  if(!$_GET['category_id'])
1083  {
1084  ilUtil::sendFailure($this->lng->txt('select_one'),true);
1085  $this->ctrl->returnToParent($this);
1086  }
1087 
1088  $this->readPermissions();
1089  $this->checkVisible();
1090 
1091  include_once('./Services/Calendar/classes/class.ilCalendarSharedStatus.php');
1092  $status = new ilCalendarSharedStatus($ilUser->getId());
1093 
1094  include_once('./Services/Calendar/classes/class.ilCalendarShared.php');
1095  if(!ilCalendarShared::isSharedWithUser($ilUser->getId(), $_GET['category_id']))
1096  {
1097  ilUtil::sendFailure($this->lng->txt('permission_denied'));
1098  $this->inbox();
1099  return false;
1100  }
1101  $status->decline($_GET['category_id']);
1102 
1103  ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
1104  $this->ctrl->redirect($this, 'manage');
1105  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_GET["client_id"]
Stores status (accepted/declined) of shared calendars.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
global $ilUser
Definition: imgupload.php:15
static isSharedWithUser($a_usr_id, $a_calendar_id)
is shared with user
+ Here is the call graph for this function:

◆ update()

ilCalendarCategoryGUI::update ( )
protected

update

protected

Returns

Definition at line 352 of file class.ilCalendarCategoryGUI.php.

References $_GET, $_POST, edit(), isEditable(), manage(), readPermissions(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and ilUtil\stripSlashes().

353  {
354  if(!$_GET['category_id'])
355  {
356  ilUtil::sendFailure($this->lng->txt('select_one'),true);
357  $this->ctrl->returnToParent($this);
358  }
359  $this->readPermissions();
360  if(!$this->isEditable())
361  {
362  ilUtil::sendFailure($this->lng->txt('permission_denied'));
363  $this->edit();
364  return false;
365  }
366 
367  include_once('./Services/Calendar/classes/class.ilCalendarCategory.php');
368  $category = new ilCalendarCategory((int) $_GET['category_id']);
369  $category->setTitle(ilUtil::stripSlashes($_POST['title']));
370  $category->setColor('#'.ilUtil::stripSlashes($_POST['color']));
371  $category->update();
372 
373  ilUtil::sendSuccess($this->lng->txt('settings_saved'),true);
374  // $this->ctrl->returnToParent($this);
375  $this->manage();
376  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
isEditable()
check if calendar is editable private
Stores calendar categories.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
manage($a_reset_offsets=false)
Manage calendars type $lng type $ilCtrl type $tpl.
+ Here is the call graph for this function:

◆ uploadAppointments()

ilCalendarCategoryGUI::uploadAppointments ( )
protected

Upload appointments.

Definition at line 1491 of file class.ilCalendarCategoryGUI.php.

References $_REQUEST, $file, doImportFile(), ilUtil\ilTempnam(), initImportForm(), ilUtil\moveUploadedFile(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

1492  {
1493  // @todo permission check
1494 
1495  $form = $this->initImportForm();
1496  if($form->checkInput())
1497  {
1498  $file = $form->getInput('file');
1499  $tmp = ilUtil::ilTempnam();
1500 
1501  ilUtil::moveUploadedFile($file['tmp_name'], $file['name'], $tmp);
1502 
1503  $num = $this->doImportFile($tmp, (int) $_REQUEST['category_id']);
1504 
1505  ilUtil::sendSuccess(sprintf($this->lng->txt('cal_imported_success'), (int) $num),true);
1506  $this->ctrl->redirect($this,'manage');
1507  }
1508 
1509  ilUtil::sendFailure($this->lng->txt('cal_err_file_upload'),true);
1510  $this->initImportForm($form);
1511  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
initImportForm()
Create import form.
print $file
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
doImportFile($file, $category_id)
Import ics.
static ilTempnam()
Create a temporary file in an ILIAS writable directory.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilCalendarCategoryGUI::$ctrl
protected

Definition at line 44 of file class.ilCalendarCategoryGUI.php.

◆ $editable

ilCalendarCategoryGUI::$editable = false
protected

Definition at line 47 of file class.ilCalendarCategoryGUI.php.

Referenced by isEditable().

◆ $lng

ilCalendarCategoryGUI::$lng
protected

Definition at line 45 of file class.ilCalendarCategoryGUI.php.

Referenced by __construct(), initFormSearch(), and manage().

◆ $tpl

◆ $user_id

ilCalendarCategoryGUI::$user_id
protected

Definition at line 42 of file class.ilCalendarCategoryGUI.php.

Referenced by shareAssign().

◆ $visible

ilCalendarCategoryGUI::$visible = false
protected

Definition at line 48 of file class.ilCalendarCategoryGUI.php.

◆ SEARCH_ROLE

const ilCalendarCategoryGUI::SEARCH_ROLE = 2

Definition at line 38 of file class.ilCalendarCategoryGUI.php.

◆ SEARCH_USER

const ilCalendarCategoryGUI::SEARCH_USER = 1

Definition at line 37 of file class.ilCalendarCategoryGUI.php.

◆ VIEW_MANAGE

const ilCalendarCategoryGUI::VIEW_MANAGE = 1

Definition at line 40 of file class.ilCalendarCategoryGUI.php.


The documentation for this class was generated from the following file: