ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilObjRepositorySettingsGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 include_once("./Services/Object/classes/class.ilObjectGUI.php");
4 
16 {
17  public function __construct($a_data, $a_id, $a_call_by_reference = true, $a_prepare_output = true)
18  {
19  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
20 
21  $this->type = 'reps';
22  $this->lng->loadLanguageModule('rep');
23  $this->lng->loadLanguageModule('cmps');
24  }
25 
26  public function executeCommand()
27  {
28  global $ilErr, $ilAccess;
29 
30  $next_class = $this->ctrl->getNextClass($this);
31  $cmd = $this->ctrl->getCmd();
32 
33  $this->prepareOutput();
34 
35  if(!$ilAccess->checkAccess('read', '', $this->object->getRefId()))
36  {
37  $ilErr->raiseError($this->lng->txt('no_permission'), $ilErr->WARNING);
38  }
39 
40  switch($next_class)
41  {
42  case 'ilpermissiongui':
43  $this->tabs_gui->setTabActive('perm_settings');
44  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
45  $perm_gui = new ilPermissionGUI($this);
46  $this->ctrl->forwardCommand($perm_gui);
47  break;
48 
49  default:
50  $this->$cmd();
51  break;
52  }
53  return true;
54  }
55 
56  public function getAdminTabs()
57  {
58  global $rbacsystem;
59 
60  $this->tabs_gui->addTab("settings",
61  $this->lng->txt("settings"),
62  $this->ctrl->getLinkTarget($this, "view"));
63 
64  $this->tabs_gui->addTab("icons",
65  $this->lng->txt("rep_custom_icons"),
66  $this->ctrl->getLinkTarget($this, "customIcons"));
67 
68  $this->tabs_gui->addTab("modules",
69  $this->lng->txt("cmps_repository_object_types"),
70  $this->ctrl->getLinkTarget($this, "listModules"));
71 
72  if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
73  {
74  $this->tabs_gui->addTab("perm_settings",
75  $this->lng->txt("perm_settings"),
76  $this->ctrl->getLinkTargetByClass('ilpermissiongui',"perm"));
77  }
78  }
79 
80  public function view(ilPropertyFormGUI $a_form = null)
81  {
82  $this->tabs_gui->activateTab("settings");
83 
84  if(!$a_form)
85  {
86  $a_form = $this->initSettingsForm();
87  }
88 
89  $this->tpl->setContent($a_form->getHTML());
90  }
91 
92  protected function initSettingsForm()
93  {
94  global $ilSetting, $ilAccess;
95 
96  include_once('Services/Form/classes/class.ilPropertyFormGUI.php');
97  $form = new ilPropertyFormGUI();
98  $form->setTitle($this->lng->txt("settings"));
99  $form->setFormAction($this->ctrl->getFormAction($this, 'saveSettings'));
100 
101  // default repository view
102  $options = array(
103  "flat" => $this->lng->txt("flatview"),
104  "tree" => $this->lng->txt("treeview")
105  );
106  $si = new ilSelectInputGUI($this->lng->txt("def_repository_view"), "default_rep_view");
107  $si->setOptions($options);
108  $si->setInfo($this->lng->txt(""));
109  if ($ilSetting->get("default_repository_view") == "tree")
110  {
111  $si->setValue("tree");
112  }
113  else
114  {
115  $si->setValue("flat");
116  }
117  $form->addItem($si);
118 
119  //
120  $options = array(
121  "" => $this->lng->txt("adm_rep_tree_only_container"),
122  "tree" => $this->lng->txt("adm_all_resource_types")
123  );
124 
125  // repository tree
126  $radg = new ilRadioGroupInputGUI($this->lng->txt("adm_rep_tree_presentation"), "tree_pres");
127  $radg->setValue($ilSetting->get("repository_tree_pres"));
128  $op1 = new ilRadioOption($this->lng->txt("adm_rep_tree_only_cntr"), "",
129  $this->lng->txt("adm_rep_tree_only_cntr_info"));
130  $radg->addOption($op1);
131 
132  $op2 = new ilRadioOption($this->lng->txt("adm_rep_tree_all_types"), "all_types",
133  $this->lng->txt("adm_rep_tree_all_types_info"));
134 
135  // limit tree in courses and groups
136  $cb = new ilCheckboxInputGUI($this->lng->txt("adm_rep_tree_limit_grp_crs"), "rep_tree_limit_grp_crs");
137  $cb->setChecked($ilSetting->get("rep_tree_limit_grp_crs"));
138  $cb->setInfo($this->lng->txt("adm_rep_tree_limit_grp_crs_info"));
139  $op2->addSubItem($cb);
140 
141  $radg->addOption($op2);
142 
143  $form->addItem($radg);
144 
145  /* OBSOLETE
146  // synchronize repository tree with main view
147  $cb = new ilCheckboxInputGUI($this->lng->txt("adm_synchronize_rep_tree"), "rep_tree_synchronize");
148  $cb->setInfo($this->lng->txt("adm_synchronize_rep_tree_info"));
149  $cb->setChecked($ilSetting->get("rep_tree_synchronize"));
150  $form->addItem($cb);
151  */
152 
153  /* DISABLED
154  // repository access check
155  $options = array(
156  0 => "0",
157  10 => "10",
158  30 => "30",
159  60 => "60",
160  120 => "120"
161  );
162  $si = new ilSelectInputGUI($this->lng->txt("adm_repository_cache_time"), "rep_cache");
163  $si->setOptions($options);
164  $si->setValue($ilSetting->get("rep_cache"));
165  $si->setInfo($this->lng->txt("adm_repository_cache_time_info")." ".
166  $this->lng->txt("adm_repository_cache_time_info2"));
167  $form->addItem($si);
168  */
169 
170  // trash
171  $cb = new ilCheckboxInputGUI($this->lng->txt("enable_trash"), "enable_trash");
172  $cb->setInfo($this->lng->txt("enable_trash_info"));
173  if ($ilSetting->get("enable_trash"))
174  {
175  $cb->setChecked(true);
176  }
177  $form->addItem($cb);
178 
179  // change event
180  require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
181  $this->lng->loadLanguageModule("trac");
182  $event = new ilCheckboxInputGUI($this->lng->txt('trac_show_repository_views'), 'change_event_tracking');
183  $event->setInfo($this->lng->txt("trac_show_repository_views_info"));
184  $event->setChecked(ilChangeEvent::_isActive());
185  $form->addItem($event);
186 
187 
188  include_once "Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php";
191  $form,
192  $this
193  );
194 
195 
196  // object lists
197 
198  $lists = new ilFormSectionHeaderGUI();
199  $lists->setTitle($this->lng->txt("rep_object_lists"));
200  $form->addItem($lists);
201 
202  $sdesc = new ilCheckboxInputGUI($this->lng->txt("adm_rep_shorten_description"), "rep_shorten_description");
203  $sdesc->setInfo($this->lng->txt("adm_rep_shorten_description_info"));
204  $sdesc->setChecked($ilSetting->get("rep_shorten_description"));
205  $form->addItem($sdesc);
206 
207  $sdesclen = new ilNumberInputGUI($this->lng->txt("adm_rep_shorten_description_length"), "rep_shorten_description_length");
208  $sdesclen->setValue($ilSetting->get("rep_shorten_description_length"));
209  $sdesclen->setSize(3);
210  $sdesc->addSubItem($sdesclen);
211 
212  // load action commands asynchronously
213  $cb = new ilCheckboxInputGUI($this->lng->txt("adm_item_cmd_asynch"), "item_cmd_asynch");
214  $cb->setInfo($this->lng->txt("adm_item_cmd_asynch_info"));
215  $cb->setChecked($ilSetting->get("item_cmd_asynch"));
216  $form->addItem($cb);
217 
218  // notes/comments/tagging
219  $pl = new ilCheckboxInputGUI($this->lng->txt('adm_show_comments_tagging_in_lists'),'comments_tagging_in_lists');
220  $pl->setValue(1);
221  $pl->setChecked($ilSetting->get('comments_tagging_in_lists'));
222  $form->addItem($pl);
223 
224  $pltags = new ilCheckboxInputGUI($this->lng->txt('adm_show_comments_tagging_in_lists_tags'),'comments_tagging_in_lists_tags');
225  $pltags->setValue(1);
226  $pltags->setChecked($ilSetting->get('comments_tagging_in_lists_tags'));
227  $pl->addSubItem($pltags);
228 
229  if($ilAccess->checkAccess('write','',$this->object->getRefId()))
230  {
231  $form->addCommandButton('saveSettings', $this->lng->txt('save'));
232  }
233 
234  return $form;
235  }
236 
237  public function saveSettings()
238  {
239  global $ilSetting, $ilAccess;
240 
241  if(!$ilAccess->checkAccess('write','',$this->object->getRefId()))
242  {
243  $this->ctrl->redirect($this, "view");
244  }
245 
246  $form = $this->initSettingsForm();
247  if ($form->checkInput())
248  {
249  $ilSetting->set("default_repository_view", $_POST["default_rep_view"]);
250 
251  $ilSetting->set("repository_tree_pres", $_POST["tree_pres"]);
252  if ($_POST["tree_pres"] == "")
253  {
254  $_POST["rep_tree_limit_grp_crs"] = "";
255  }
256  if ($_POST["rep_tree_limit_grp_crs"] && !$ilSetting->get("rep_tree_limit_grp_crs"))
257  {
258  $_POST["rep_tree_synchronize"] = true;
259  }
260  else if (!$_POST["rep_tree_synchronize"] && $ilSetting->get("rep_tree_synchronize"))
261  {
262  $_POST["rep_tree_limit_grp_crs"] = false;
263  }
264  $ilSetting->set("rep_tree_limit_grp_crs", $_POST["rep_tree_limit_grp_crs"]);
265 
266  // $ilSetting->set('rep_cache',(int) $_POST['rep_cache']);
267  // $ilSetting->set("rep_tree_synchronize", $_POST["rep_tree_synchronize"]);
268 
269  $ilSetting->set("enable_trash", $_POST["enable_trash"]);
270 
271  $ilSetting->set("rep_shorten_description", $form->getInput('rep_shorten_description'));
272  $ilSetting->set("rep_shorten_description_length", (int)$form->getInput('rep_shorten_description_length'));
273  $ilSetting->set('item_cmd_asynch',(int) $_POST['item_cmd_asynch']);
274  $ilSetting->set('comments_tagging_in_lists',(int) $_POST['comments_tagging_in_lists']);
275  $ilSetting->set('comments_tagging_in_lists_tags',(int) $_POST['comments_tagging_in_lists_tags']);
276 
277  require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
278  if ($form->getInput('change_event_tracking'))
279  {
281  }
282  else
283  {
285  }
286 
287  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
288  $this->ctrl->redirect($this, "view");
289  }
290 
291  $form->setValuesByPost();
292  $this->view($form);
293  }
294 
295  public function customIcons(ilPropertyFormGUI $a_form = null)
296  {
297  $this->tabs_gui->activateTab("icons");
298 
299  if(!$a_form)
300  {
301  $a_form = $this->initCustomIconsForm();
302  }
303 
304  $this->tpl->setContent($a_form->getHTML());
305  }
306 
307  protected function initCustomIconsForm()
308  {
309  global $ilSetting, $ilAccess;
310 
311  include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
312  include_once "Services/Form/classes/class.ilCombinationInputGUI.php";
313  $form = new ilPropertyFormGUI();
314  $form->setTitle($this->lng->txt("rep_custom_icons"));
315  $form->setFormAction($this->ctrl->getFormAction($this, 'saveCustomIcons'));
316 
317  $cb = new ilCheckboxInputGUI($this->lng->txt("enable_custom_icons"), "custom_icons");
318  $cb->setInfo($this->lng->txt("enable_custom_icons_info"));
319  $cb->setChecked($ilSetting->get("custom_icons"));
320  $form->addItem($cb);
321 
322  if($ilAccess->checkAccess('write','',$this->object->getRefId()))
323  {
324  $form->addCommandButton('saveCustomIcons', $this->lng->txt('save'));
325  }
326 
327  return $form;
328  }
329 
330  public function saveCustomIcons()
331  {
332  global $ilSetting, $ilAccess;
333 
334  if(!$ilAccess->checkAccess('write','',$this->object->getRefId()))
335  {
336  $this->ctrl->redirect($this, "customIcons");
337  }
338 
339  $form = $this->initCustomIconsForm();
340  if ($form->checkInput())
341  {
342  $ilSetting->set("custom_icons", (int)$form->getInput("custom_icons"));
343  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
344  $this->ctrl->redirect($this, "customIcons");
345  }
346 
347  $form->setValuesByPost();
348  $this->customIcons($form);
349  }
350 
351  protected function setModuleSubTabs($a_active)
352  {
353  $this->tabs_gui->activateTab('modules');
354 
355  $this->tabs_gui->addSubTab("list_mods",
356  $this->lng->txt("rep_new_item_menu"),
357  $this->ctrl->getLinkTarget($this, "listModules"));
358 
359  $this->tabs_gui->addSubTab("new_item_groups",
360  $this->lng->txt("rep_new_item_groups"),
361  $this->ctrl->getLinkTarget($this, "listNewItemGroups"));
362 
363  $this->tabs_gui->activateSubTab($a_active);
364  }
365 
366  protected function listModules()
367  {
368  global $ilAccess;
369 
370  $this->setModuleSubTabs("list_mods");
371 
372  $has_write = $ilAccess->checkAccess('write','',$this->object->getRefId());
373 
374  include_once("./Services/Repository/classes/class.ilModulesTableGUI.php");
375  $comp_table = new ilModulesTableGUI($this, "listModules", $has_write);
376 
377  $this->tpl->setContent($comp_table->getHTML());
378  }
379 
380  protected function saveModules()
381  {
382  global $ilSetting, $ilCtrl, $lng, $ilAccess;
383 
384  if(!is_array($_POST["obj_grp"]) ||
385  !is_array($_POST["obj_pos"]) ||
386  !$ilAccess->checkAccess('write','',$this->object->getRefId()))
387  {
388  $ilCtrl->redirect($this, "listModules");
389  }
390 
391  $grp_pos_map = array(0 => 9999);
392  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
394  {
395  $grp_pos_map[$item["id"]] = $item["pos"];
396  }
397 
398  $type_pos_map = array();
399  foreach($_POST["obj_pos"] as $obj_type => $pos)
400  {
401  $grp_id = (int)$_POST["obj_grp"][$obj_type];
402  $type_pos_map[$grp_id][$obj_type] = $pos;
403 
404  // enable creation?
405  $ilSetting->set("obj_dis_creation_".$obj_type, !(int)$_POST["obj_enbl_creation"][$obj_type]);
406  }
407 
408  foreach($type_pos_map as $grp_id => $obj_types)
409  {
410  $grp_pos = str_pad($grp_pos_map[$grp_id], 4, "0", STR_PAD_LEFT);
411 
412  asort($obj_types);
413  $pos = 0;
414  foreach(array_keys($obj_types) as $obj_type)
415  {
416  $pos += 10;
417  $type_pos = $grp_pos.str_pad($pos, 4, "0", STR_PAD_LEFT);
418  $ilSetting->set("obj_add_new_pos_".$obj_type, $type_pos);
419  $ilSetting->set("obj_add_new_pos_grp_".$obj_type, $grp_id);
420  }
421  }
422 
423  /*
424  if (count($double) == 0)
425  {
426  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
427  }
428  else
429  {
430  ilUtil::sendInfo($lng->txt("cmps_duplicate_positions")." ".implode($double, ", "), true);
431  }
432  */
433 
434  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
435  $ilCtrl->redirect($this, "listModules");
436  }
437 
438  protected function listNewItemGroups()
439  {
440  global $ilToolbar, $ilAccess;
441 
442  $this->setModuleSubTabs("new_item_groups");
443 
444  $has_write = $ilAccess->checkAccess('write','',$this->object->getRefId());
445 
446  if($has_write)
447  {
448  $ilToolbar->addButton($this->lng->txt("rep_new_item_group_add"),
449  $this->ctrl->getLinkTarget($this, "addNewItemGroup"));
450 
451  $ilToolbar->addButton($this->lng->txt("rep_new_item_group_add_separator"),
452  $this->ctrl->getLinkTarget($this, "addNewItemGroupSeparator"));
453  }
454 
455  include_once("./Services/Repository/classes/class.ilNewItemGroupTableGUI.php");
456  $grp_table = new ilNewItemGroupTableGUI($this, "listNewItemGroups", $has_write);
457 
458  $this->tpl->setContent($grp_table->getHTML());
459  }
460 
461  protected function initNewItemGroupForm($a_grp_id = false)
462  {
463  $this->setModuleSubTabs("new_item_groups");
464 
465  include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
466  $form = new ilPropertyFormGUI();
467 
468  $this->lng->loadLanguageModule("meta");
469  $def_lng = $this->lng->getDefaultLanguage();
470 
471  $title = new ilTextInputGUI($this->lng->txt("title"), "title_".$def_lng);
472  $title->setInfo($this->lng->txt("meta_l_".$def_lng).
473  " (".$this->lng->txt("default_language").")");
474  $title->setRequired(true);
475  $form->addItem($title);
476 
477  foreach($this->lng->getInstalledLanguages() as $lang_id)
478  {
479  if($lang_id != $def_lng)
480  {
481  $title = new ilTextInputGUI($this->lng->txt("translation"), "title_".$lang_id);
482  $title->setInfo($this->lng->txt("meta_l_".$lang_id));
483  $form->addItem($title);
484  }
485  }
486 
487  if(!$a_grp_id)
488  {
489  $form->setTitle($this->lng->txt("rep_new_item_group_add"));
490  $form->setFormAction($this->ctrl->getFormAction($this, "saveNewItemGroup"));
491 
492  $form->addCommandButton("saveNewItemGroup", $this->lng->txt("save"));
493  }
494  else
495  {
496  $form->setTitle($this->lng->txt("rep_new_item_group_edit"));
497  $form->setFormAction($this->ctrl->getFormAction($this, "updateNewItemGroup"));
498 
499  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
501  $grp = $grp[$a_grp_id];
502 
503  foreach($grp["titles"] as $id => $value)
504  {
505  $field = $form->getItemByPostVar("title_".$id);
506  if($field)
507  {
508  $field->setValue($value);
509  }
510  }
511 
512  $form->addCommandButton("updateNewItemGroup", $this->lng->txt("save"));
513  }
514  $form->addCommandButton("listNewItemGroups", $this->lng->txt("cancel"));
515 
516  return $form;
517  }
518 
519  protected function addNewItemGroup(ilPropertyFormGUI $a_form = null)
520  {
521  if(!$a_form)
522  {
523  $a_form = $this->initNewItemGroupForm();
524  }
525 
526  $this->tpl->setContent($a_form->getHTML());
527  }
528 
529  protected function saveNewItemGroup()
530  {
531  $form = $this->initNewItemGroupForm();
532  if($form->checkInput())
533  {
534  $titles = array();
535  foreach($this->lng->getInstalledLanguages() as $lang_id)
536  {
537  $titles[$lang_id] = $form->getInput("title_".$lang_id);
538  }
539 
540  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
542  {
543  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
544  $this->ctrl->redirect($this, "listNewItemGroups");
545  }
546  }
547 
548  $form->setValuesByPost();
549  $this->addNewItemGroup($form);
550  }
551 
552  protected function editNewItemGroup(ilPropertyFormGUI $a_form = null)
553  {
554  $grp_id = (int)$_GET["grp_id"];
555  if(!$grp_id)
556  {
557  $this->ctrl->redirect($this, "listNewItemGroups");
558  }
559 
560  if(!$a_form)
561  {
562  $this->ctrl->setParameter($this, "grp_id", $grp_id);
563  $a_form = $this->initNewItemGroupForm($grp_id);
564  }
565 
566  $this->tpl->setContent($a_form->getHTML());
567  }
568 
569  protected function updateNewItemGroup()
570  {
571  $grp_id = (int)$_GET["grp_id"];
572  if(!$grp_id)
573  {
574  $this->ctrl->redirect($this, "listNewItemGroups");
575  }
576 
577  $this->ctrl->setParameter($this, "grp_id", $grp_id);
578 
579  $form = $this->initNewItemGroupForm($grp_id);
580  if($form->checkInput())
581  {
582  $titles = array();
583  foreach($this->lng->getInstalledLanguages() as $lang_id)
584  {
585  $titles[$lang_id] = $form->getInput("title_".$lang_id);
586  }
587 
588  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
589  if(ilObjRepositorySettings::updateNewItemGroup($grp_id, $titles))
590  {
591  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
592  $this->ctrl->redirect($this, "listNewItemGroups");
593  }
594  }
595 
596  $form->setValuesByPost();
597  $this->addNewItemGroup($form);
598  }
599 
600  protected function addNewItemGroupSeparator()
601  {
602  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
604  {
605  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
606  }
607  $this->ctrl->redirect($this, "listNewItemGroups");
608  }
609 
610  protected function saveNewItemGroupOrder()
611  {
612  global $ilSetting;
613 
614  if(is_array($_POST["grp_order"]))
615  {
616  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
618 
619  $grp_pos_map = array();
620  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
622  {
623  $grp_pos_map[$item["id"]] = str_pad($item["pos"], 4, "0", STR_PAD_LEFT);
624  }
625 
626  // update order of assigned objects
627  foreach(ilObjRepositorySettings::getNewItemGroupSubItems() as $grp_id => $subitems)
628  {
629  // unassigned objects will always be last
630  if($grp_id)
631  {
632  foreach($subitems as $obj_type)
633  {
634  $old_pos = $ilSetting->get("obj_add_new_pos_".$obj_type);
635  if(strlen($old_pos) == 8)
636  {
637  $new_pos = $grp_pos_map[$grp_id].substr($old_pos, 4);
638  $ilSetting->set("obj_add_new_pos_".$obj_type, $new_pos);
639  }
640  }
641  }
642  }
643 
644  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
645  }
646  $this->ctrl->redirect($this, "listNewItemGroups");
647  }
648 
649  protected function confirmDeleteNewItemGroup()
650  {
651  if(!is_array($_POST["grp_id"]))
652  {
653  ilUtil::sendFailure($this->lng->txt("select_one"));
654  return $this->listNewItemGroups();
655  }
656 
657  $this->setModuleSubTabs("new_item_groups");
658 
659  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
660  $cgui = new ilConfirmationGUI();
661  $cgui->setHeaderText($this->lng->txt("rep_new_item_group_delete_sure"));
662 
663  $cgui->setFormAction($this->ctrl->getFormAction($this));
664  $cgui->setCancel($this->lng->txt("cancel"), "listNewItemGroups");
665  $cgui->setConfirm($this->lng->txt("confirm"), "deleteNewItemGroup");
666 
667  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
669 
670  foreach ($_POST["grp_id"] as $grp_id)
671  {
672  $cgui->addItem("grp_id[]", $grp_id, $groups[$grp_id]["title"]);
673  }
674 
675  $this->tpl->setContent($cgui->getHTML());
676  }
677 
678  protected function deleteNewItemGroup()
679  {
680  if(!is_array($_POST["grp_id"]))
681  {
682  return $this->listNewItemGroups();
683  }
684 
685  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
686  foreach($_POST["grp_id"] as $grp_id)
687  {
689  }
690 
691  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
692  $this->ctrl->redirect($this, "listNewItemGroups");
693  }
694 
695  public function addToExternalSettingsForm($a_form_id)
696  {
697  global $ilSetting;
698 
699  switch($a_form_id)
700  {
702 
703  require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
704  $fields = array('trac_show_repository_views' => array(ilChangeEvent::_isActive(), ilAdministrationSettingsFormHandler::VALUE_BOOL));
705 
706  return array(array("view", $fields));
707 
708 
710 
711  $fields = array(
712  'adm_show_comments_tagging_in_lists' => array($ilSetting->get('comments_tagging_in_lists'), ilAdministrationSettingsFormHandler::VALUE_BOOL,
713  array('adm_show_comments_tagging_in_lists_tags' => array($ilSetting->get('comments_tagging_in_lists_tags'), ilAdministrationSettingsFormHandler::VALUE_BOOL))
714  ));
715 
716  return array(array("view", $fields));
717  }
718  }
719 }
720 
721 ?>
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
view(ilPropertyFormGUI $a_form=null)
global $ilErr
Definition: raiseError.php:16
This class represents an option in a radio group.
static _activate()
Activates change event tracking.
setValue($a_value)
Set Value.
This class represents a selection list property in a property form.
TableGUI class for new item groups.
This class represents a property form user interface.
$_GET["client_id"]
This class represents a section header in a property form.
customIcons(ilPropertyFormGUI $a_form=null)
$cmd
Definition: sahs_server.php:35
This class represents a checkbox property in a property form.
setInfo($a_info)
Set Info.
static addFieldsToForm($a_form_id, ilPropertyFormGUI $a_form, ilObjectGUI $a_parent_gui)
global $ilCtrl
Definition: ilias.php:18
setInfo($a_info)
Set Information Text.
prepareOutput($a_show_subobjects=true)
prepare output
This class represents a property in a property form.
if(!is_array($argv)) $options
This class represents a number property in a property form.
Class ilObjectGUI Basic methods of all Output classes.
setValue($a_value)
Set Value.
This class represents a text property in a property form.
__construct($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
setOptions($a_options)
Set Options.
Create styles array
The data for the language used.
static updateNewItemGroupOrder(array $a_order)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static addNewItemGroup(array $a_titles)
Create new PHPExcel object
obj_idprivate
global $ilSetting
Definition: privfeed.php:17
static _isActive()
Returns true, if change event tracking is active.
static _deactivate()
Deactivates change event tracking.
static updateNewItemGroup($a_id, array $a_titles)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
TableGUI class for module listing.
addNewItemGroup(ilPropertyFormGUI $a_form=null)
editNewItemGroup(ilPropertyFormGUI $a_form=null)
$_POST["username"]
Confirmation screen class.