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