ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilObjRepositorySettingsGUI Class Reference

Repository settings. More...

+ Inheritance diagram for ilObjRepositorySettingsGUI:
+ Collaboration diagram for ilObjRepositorySettingsGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 
 executeCommand ()
 execute command More...
 
 getAdminTabs ()
 
 view (ilPropertyFormGUI $a_form=null)
 
 saveSettings ()
 
 customIcons (ilPropertyFormGUI $a_form=null)
 
 saveCustomIcons ()
 
 addToExternalSettingsForm ($a_form_id)
 
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor @access public. More...
 
executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ($in_rep=false)
 cancel action and go back to previous page @access public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 

Protected Member Functions

 initSettingsForm ()
 
 initCustomIconsForm ()
 
 setModuleSubTabs ($a_active)
 
 listModules ()
 
 saveModules ()
 
 listNewItemGroups ()
 
 initNewItemGroupForm ($a_grp_id=false)
 
 addNewItemGroup (ilPropertyFormGUI $a_form=null)
 
 saveNewItemGroup ()
 
 editNewItemGroup (ilPropertyFormGUI $a_form=null)
 
 updateNewItemGroup ()
 
 addNewItemGroupSeparator ()
 
 saveNewItemGroupOrder ()
 
 confirmDeleteNewItemGroup ()
 
 deleteNewItemGroup ()
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 prepareOutput ()
 prepare output More...
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs @access public More...
 
 setAdminTabs ()
 set admin tabs @access public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste More...
 
 getTabs (&$tabs_gui)
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings ($column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $ilias
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
- Protected Attributes inherited from ilObjectGUI
 $tmp_import_dir
 

Detailed Description

Repository settings.

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

@ilCtrl_Calls ilObjRepositorySettingsGUI: ilPermissionGUI

Definition at line 15 of file class.ilObjRepositorySettingsGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjRepositorySettingsGUI::__construct (   $a_data,
  $a_id,
  $a_call_by_reference = true,
  $a_prepare_output = true 
)

Definition at line 17 of file class.ilObjRepositorySettingsGUI.php.

18 {
19 parent::ilObjectGUI($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 }

Member Function Documentation

◆ addNewItemGroup()

ilObjRepositorySettingsGUI::addNewItemGroup ( ilPropertyFormGUI  $a_form = null)
protected

Definition at line 569 of file class.ilObjRepositorySettingsGUI.php.

570 {
571 if(!$a_form)
572 {
573 $a_form = $this->initNewItemGroupForm();
574 }
575
576 $this->tpl->setContent($a_form->getHTML());
577 }

References initNewItemGroupForm().

Referenced by saveNewItemGroup(), and updateNewItemGroup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addNewItemGroupSeparator()

ilObjRepositorySettingsGUI::addNewItemGroupSeparator ( )
protected

Definition at line 650 of file class.ilObjRepositorySettingsGUI.php.

651 {
652 include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
654 {
655 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
656 }
657 $this->ctrl->redirect($this, "listNewItemGroups");
658 }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.

References ilObjRepositorySettings\addNewItemGroupSeparator(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ addToExternalSettingsForm()

ilObjRepositorySettingsGUI::addToExternalSettingsForm (   $a_form_id)

Definition at line 745 of file class.ilObjRepositorySettingsGUI.php.

746 {
747 global $ilSetting;
748
749 switch($a_form_id)
750 {
752
753 require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
754 $fields = array('trac_repository_changes' => array(ilChangeEvent::_isActive(), ilAdministrationSettingsFormHandler::VALUE_BOOL));
755
756 return array(array("view", $fields));
757
758
760
761 $fields = array(
762 'adm_show_comments_tagging_in_lists' => array($ilSetting->get('comments_tagging_in_lists'), ilAdministrationSettingsFormHandler::VALUE_BOOL,
763 array('adm_show_comments_tagging_in_lists_tags' => array($ilSetting->get('comments_tagging_in_lists_tags'), ilAdministrationSettingsFormHandler::VALUE_BOOL))
764 ));
765
766 return array(array("view", $fields));
767 }
768 }
static _isActive()
Returns true, if change event tracking is active.
global $ilSetting
Definition: privfeed.php:40

References $ilSetting, ilChangeEvent\_isActive(), ilAdministrationSettingsFormHandler\FORM_LP, ilAdministrationSettingsFormHandler\FORM_TAGGING, and ilAdministrationSettingsFormHandler\VALUE_BOOL.

+ Here is the call graph for this function:

◆ confirmDeleteNewItemGroup()

ilObjRepositorySettingsGUI::confirmDeleteNewItemGroup ( )
protected

Definition at line 699 of file class.ilObjRepositorySettingsGUI.php.

700 {
701 if(!is_array($_POST["grp_id"]))
702 {
703 ilUtil::sendFailure($this->lng->txt("select_one"));
704 return $this->listNewItemGroups();
705 }
706
707 $this->setModuleSubTabs("new_item_groups");
708
709 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
710 $cgui = new ilConfirmationGUI();
711 $cgui->setHeaderText($this->lng->txt("rep_new_item_group_delete_sure"));
712
713 $cgui->setFormAction($this->ctrl->getFormAction($this));
714 $cgui->setCancel($this->lng->txt("cancel"), "listNewItemGroups");
715 $cgui->setConfirm($this->lng->txt("confirm"), "deleteNewItemGroup");
716
717 include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
719
720 foreach ($_POST["grp_id"] as $grp_id)
721 {
722 $cgui->addItem("grp_id[]", $grp_id, $groups[$grp_id]["title"]);
723 }
724
725 $this->tpl->setContent($cgui->getHTML());
726 }
Confirmation screen class.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$_POST['username']
Definition: cron.php:12

References $_POST, ilObjRepositorySettings\getNewItemGroups(), listNewItemGroups(), ilUtil\sendFailure(), and setModuleSubTabs().

+ Here is the call graph for this function:

◆ customIcons()

ilObjRepositorySettingsGUI::customIcons ( ilPropertyFormGUI  $a_form = null)

Definition at line 294 of file class.ilObjRepositorySettingsGUI.php.

295 {
296 $this->tabs_gui->activateTab("icons");
297
298 if(!$a_form)
299 {
300 $a_form = $this->initCustomIconsForm();
301 }
302
303 $this->tpl->setContent($a_form->getHTML());
304 }

References initCustomIconsForm().

Referenced by saveCustomIcons().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deleteNewItemGroup()

ilObjRepositorySettingsGUI::deleteNewItemGroup ( )
protected

Definition at line 728 of file class.ilObjRepositorySettingsGUI.php.

729 {
730 if(!is_array($_POST["grp_id"]))
731 {
732 return $this->listNewItemGroups();
733 }
734
735 include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
736 foreach($_POST["grp_id"] as $grp_id)
737 {
739 }
740
741 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
742 $this->ctrl->redirect($this, "listNewItemGroups");
743 }

References $_POST, ilObjRepositorySettings\deleteNewItemGroup(), listNewItemGroups(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ editNewItemGroup()

ilObjRepositorySettingsGUI::editNewItemGroup ( ilPropertyFormGUI  $a_form = null)
protected

Definition at line 602 of file class.ilObjRepositorySettingsGUI.php.

603 {
604 $grp_id = (int)$_GET["grp_id"];
605 if(!$grp_id)
606 {
607 $this->ctrl->redirect($this, "listNewItemGroups");
608 }
609
610 if(!$a_form)
611 {
612 $this->ctrl->setParameter($this, "grp_id", $grp_id);
613 $a_form = $this->initNewItemGroupForm($grp_id);
614 }
615
616 $this->tpl->setContent($a_form->getHTML());
617 }
$_GET["client_id"]

References $_GET, and initNewItemGroupForm().

+ Here is the call graph for this function:

◆ executeCommand()

ilObjRepositorySettingsGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

Definition at line 26 of file class.ilObjRepositorySettingsGUI.php.

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 }
prepareOutput()
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
$cmd
Definition: sahs_server.php:35

References $cmd, $ilErr, and ilObjectGUI\prepareOutput().

+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjRepositorySettingsGUI::getAdminTabs ( )

Definition at line 56 of file class.ilObjRepositorySettingsGUI.php.

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 }

◆ initCustomIconsForm()

ilObjRepositorySettingsGUI::initCustomIconsForm ( )
protected

Definition at line 306 of file class.ilObjRepositorySettingsGUI.php.

307 {
308 global $ilSetting, $ilAccess;
309
310 include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
311 include_once "Services/Form/classes/class.ilCombinationInputGUI.php";
312 $form = new ilPropertyFormGUI();
313 $form->setTitle($this->lng->txt("rep_custom_icons"));
314 $form->setFormAction($this->ctrl->getFormAction($this, 'saveCustomIcons'));
315
316 $cb = new ilCheckboxInputGUI($this->lng->txt("enable_custom_icons"), "custom_icons");
317 $cb->setInfo($this->lng->txt("enable_custom_icons_info"));
318 $cb->setChecked($ilSetting->get("custom_icons"));
319 $form->addItem($cb);
320
321 /*
322 $size_big = new ilCombinationInputGUI($this->lng->txt("custom_icon_size_big"));
323 $form->addItem($size_big);
324
325 $width = new ilNumberInputGUI("", "custom_icon_big_width");
326 $width->setSize(3);
327 $width->setValue($ilSetting->get("custom_icon_big_width"));
328 $size_big->addCombinationItem("bgw", $width, $this->lng->txt("width"));
329
330 $height = new ilNumberInputGUI("", "custom_icon_big_height");
331 $height->setSize(3);
332 $height->setValue($ilSetting->get("custom_icon_big_height"));
333 $size_big->addCombinationItem("bgh", $height, $this->lng->txt("height"));
334
335
336 $size_small = new ilCombinationInputGUI($this->lng->txt("custom_icon_size_standard"));
337 $form->addItem($size_small);
338
339 $width = new ilNumberInputGUI("", "custom_icon_small_width");
340 $width->setSize(3);
341 $width->setValue($ilSetting->get("custom_icon_small_width"));
342 $size_small->addCombinationItem("smw", $width, $this->lng->txt("width"));
343
344 $height = new ilNumberInputGUI("", "custom_icon_small_height");
345 $height->setSize(3);
346 $height->setValue($ilSetting->get("custom_icon_small_height"));
347 $size_small->addCombinationItem("smh", $height, $this->lng->txt("height"));
348
349
350 $size_tiny = new ilCombinationInputGUI($this->lng->txt("custom_icon_size_tiny"));
351 $form->addItem($size_tiny);
352
353 $width = new ilNumberInputGUI("", "custom_icon_tiny_width");
354 $width->setSize(3);
355 $width->setValue($ilSetting->get("custom_icon_tiny_width"));
356 $size_tiny->addCombinationItem("tnw", $width, $this->lng->txt("width"));
357
358 $height = new ilNumberInputGUI("", "custom_icon_tiny_height");
359 $height->setSize(3);
360 $height->setValue($ilSetting->get("custom_icon_tiny_height"));
361 $size_tiny->addCombinationItem("tnh", $height, $this->lng->txt("height"));
362 */
363
364 if($ilAccess->checkAccess('write','',$this->object->getRefId()))
365 {
366 $form->addCommandButton('saveCustomIcons', $this->lng->txt('save'));
367 }
368
369 return $form;
370 }
This class represents a checkbox property in a property form.
This class represents a property form user interface.

References $ilSetting.

Referenced by customIcons().

+ Here is the caller graph for this function:

◆ initNewItemGroupForm()

ilObjRepositorySettingsGUI::initNewItemGroupForm (   $a_grp_id = false)
protected

Definition at line 511 of file class.ilObjRepositorySettingsGUI.php.

512 {
513 $this->setModuleSubTabs("new_item_groups");
514
515 include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
516 $form = new ilPropertyFormGUI();
517
518 $this->lng->loadLanguageModule("meta");
519 $def_lng = $this->lng->getDefaultLanguage();
520
521 $title = new ilTextInputGUI($this->lng->txt("title"), "title_".$def_lng);
522 $title->setInfo($this->lng->txt("meta_l_".$def_lng).
523 " (".$this->lng->txt("default_language").")");
524 $title->setRequired(true);
525 $form->addItem($title);
526
527 foreach($this->lng->getInstalledLanguages() as $lang_id)
528 {
529 if($lang_id != $def_lng)
530 {
531 $title = new ilTextInputGUI($this->lng->txt("translation"), "title_".$lang_id);
532 $title->setInfo($this->lng->txt("meta_l_".$lang_id));
533 $form->addItem($title);
534 }
535 }
536
537 if(!$a_grp_id)
538 {
539 $form->setTitle($this->lng->txt("rep_new_item_group_add"));
540 $form->setFormAction($this->ctrl->getFormAction($this, "saveNewItemGroup"));
541
542 $form->addCommandButton("saveNewItemGroup", $this->lng->txt("save"));
543 }
544 else
545 {
546 $form->setTitle($this->lng->txt("rep_new_item_group_edit"));
547 $form->setFormAction($this->ctrl->getFormAction($this, "updateNewItemGroup"));
548
549 include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
551 $grp = $grp[$a_grp_id];
552
553 foreach($grp["titles"] as $id => $value)
554 {
555 $field = $form->getItemByPostVar("title_".$id);
556 if($field)
557 {
558 $field->setValue($value);
559 }
560 }
561
562 $form->addCommandButton("updateNewItemGroup", $this->lng->txt("save"));
563 }
564 $form->addCommandButton("listNewItemGroups", $this->lng->txt("cancel"));
565
566 return $form;
567 }
This class represents a text property in a property form.

References ilObjRepositorySettings\getNewItemGroups(), and setModuleSubTabs().

Referenced by addNewItemGroup(), editNewItemGroup(), saveNewItemGroup(), and updateNewItemGroup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initSettingsForm()

ilObjRepositorySettingsGUI::initSettingsForm ( )
protected

Definition at line 92 of file class.ilObjRepositorySettingsGUI.php.

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_repository_changes'), 'change_event_tracking');
183 $event->setChecked(ilChangeEvent::_isActive());
184 $form->addItem($event);
185
186
187 include_once "Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php";
190 $form,
191 $this
192 );
193
194
195 // object lists
196
197 $lists = new ilFormSectionHeaderGUI();
198 $lists->setTitle($this->lng->txt("rep_object_lists"));
199 $form->addItem($lists);
200
201 $sdesc = new ilCheckboxInputGUI($this->lng->txt("adm_rep_shorten_description"), "rep_shorten_description");
202 $sdesc->setInfo($this->lng->txt("adm_rep_shorten_description_info"));
203 $sdesc->setChecked($ilSetting->get("rep_shorten_description"));
204 $form->addItem($sdesc);
205
206 $sdesclen = new ilNumberInputGUI($this->lng->txt("adm_rep_shorten_description_length"), "rep_shorten_description_length");
207 $sdesclen->setValue($ilSetting->get("rep_shorten_description_length"));
208 $sdesclen->setSize(3);
209 $sdesc->addSubItem($sdesclen);
210
211 // load action commands asynchronously
212 $cb = new ilCheckboxInputGUI($this->lng->txt("adm_item_cmd_asynch"), "item_cmd_asynch");
213 $cb->setInfo($this->lng->txt("adm_item_cmd_asynch_info"));
214 $cb->setChecked($ilSetting->get("item_cmd_asynch"));
215 $form->addItem($cb);
216
217 // notes/comments/tagging
218 $pl = new ilCheckboxInputGUI($this->lng->txt('adm_show_comments_tagging_in_lists'),'comments_tagging_in_lists');
219 $pl->setValue(1);
220 $pl->setChecked($ilSetting->get('comments_tagging_in_lists'));
221 $form->addItem($pl);
222
223 $pltags = new ilCheckboxInputGUI($this->lng->txt('adm_show_comments_tagging_in_lists_tags'),'comments_tagging_in_lists_tags');
224 $pltags->setValue(1);
225 $pltags->setChecked($ilSetting->get('comments_tagging_in_lists_tags'));
226 $pl->addSubItem($pltags);
227
228 if($ilAccess->checkAccess('write','',$this->object->getRefId()))
229 {
230 $form->addCommandButton('saveSettings', $this->lng->txt('save'));
231 }
232
233 return $form;
234 }
static addFieldsToForm($a_form_id, ilPropertyFormGUI $a_form, ilObjectGUI $a_parent_gui)
This class represents a section header in a property form.
This class represents a number property in a property form.
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.
if(!is_array($argv)) $options

References $ilSetting, $options, $si, ilChangeEvent\_isActive(), ilAdministrationSettingsFormHandler\addFieldsToForm(), and ilAdministrationSettingsFormHandler\FORM_REPOSITORY.

Referenced by saveCustomIcons(), saveSettings(), and view().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listModules()

ilObjRepositorySettingsGUI::listModules ( )
protected

Definition at line 416 of file class.ilObjRepositorySettingsGUI.php.

417 {
418 global $ilAccess;
419
420 $this->setModuleSubTabs("list_mods");
421
422 $has_write = $ilAccess->checkAccess('write','',$this->object->getRefId());
423
424 include_once("./Services/Repository/classes/class.ilModulesTableGUI.php");
425 $comp_table = new ilModulesTableGUI($this, "listModules", $has_write);
426
427 $this->tpl->setContent($comp_table->getHTML());
428 }
TableGUI class for module listing.

References setModuleSubTabs().

+ Here is the call graph for this function:

◆ listNewItemGroups()

ilObjRepositorySettingsGUI::listNewItemGroups ( )
protected

Definition at line 488 of file class.ilObjRepositorySettingsGUI.php.

489 {
490 global $ilToolbar, $ilAccess;
491
492 $this->setModuleSubTabs("new_item_groups");
493
494 $has_write = $ilAccess->checkAccess('write','',$this->object->getRefId());
495
496 if($has_write)
497 {
498 $ilToolbar->addButton($this->lng->txt("rep_new_item_group_add"),
499 $this->ctrl->getLinkTarget($this, "addNewItemGroup"));
500
501 $ilToolbar->addButton($this->lng->txt("rep_new_item_group_add_separator"),
502 $this->ctrl->getLinkTarget($this, "addNewItemGroupSeparator"));
503 }
504
505 include_once("./Services/Repository/classes/class.ilNewItemGroupTableGUI.php");
506 $grp_table = new ilNewItemGroupTableGUI($this, "listNewItemGroups", $has_write);
507
508 $this->tpl->setContent($grp_table->getHTML());
509 }
TableGUI class for new item groups.

References setModuleSubTabs().

Referenced by confirmDeleteNewItemGroup(), and deleteNewItemGroup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveCustomIcons()

ilObjRepositorySettingsGUI::saveCustomIcons ( )

Definition at line 372 of file class.ilObjRepositorySettingsGUI.php.

373 {
374 global $ilSetting, $ilAccess;
375
376 if(!$ilAccess->checkAccess('write','',$this->object->getRefId()))
377 {
378 $this->ctrl->redirect($this, "customIcons");
379 }
380
381 $form = $this->initSettingsForm();
382 if ($form->checkInput())
383 {
384 $ilSetting->set("custom_icons", (int)$form->getInput("custom_icons"));
385 /*
386 $ilSetting->set("custom_icon_big_width", (int)$form->getInput("custom_icon_big_width"));
387 $ilSetting->set("custom_icon_big_height", (int)$form->getInput("custom_icon_big_height"));
388 $ilSetting->set("custom_icon_small_width", (int)$form->getInput("custom_icon_small_width"));
389 $ilSetting->set("custom_icon_small_height", (int)$form->getInput("custom_icon_small_height"));
390 $ilSetting->set("custom_icon_tiny_width", (int)$form->getInput("custom_icon_tiny_width"));
391 $ilSetting->set("custom_icon_tiny_height", (int)$form->getInput("custom_icon_tiny_height"));
392 */
393 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
394 $this->ctrl->redirect($this, "customIcons");
395 }
396
397 $form->setValuesByPost();
398 $this->customIcons($form);
399 }
customIcons(ilPropertyFormGUI $a_form=null)

References $ilSetting, customIcons(), initSettingsForm(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ saveModules()

ilObjRepositorySettingsGUI::saveModules ( )
protected

Definition at line 430 of file class.ilObjRepositorySettingsGUI.php.

431 {
432 global $ilSetting, $ilCtrl, $lng, $ilAccess;
433
434 if(!is_array($_POST["obj_grp"]) ||
435 !is_array($_POST["obj_pos"]) ||
436 !$ilAccess->checkAccess('write','',$this->object->getRefId()))
437 {
438 $ilCtrl->redirect($this, "listModules");
439 }
440
441 $grp_pos_map = array(0 => 9999);
442 include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
444 {
445 $grp_pos_map[$item["id"]] = $item["pos"];
446 }
447
448 $type_pos_map = array();
449 foreach($_POST["obj_pos"] as $obj_type => $pos)
450 {
451 $grp_id = (int)$_POST["obj_grp"][$obj_type];
452 $type_pos_map[$grp_id][$obj_type] = $pos;
453
454 // enable creation?
455 $ilSetting->set("obj_dis_creation_".$obj_type, !(int)$_POST["obj_enbl_creation"][$obj_type]);
456 }
457
458 foreach($type_pos_map as $grp_id => $obj_types)
459 {
460 $grp_pos = str_pad($grp_pos_map[$grp_id], 4, "0", STR_PAD_LEFT);
461
462 asort($obj_types);
463 $pos = 0;
464 foreach(array_keys($obj_types) as $obj_type)
465 {
466 $pos += 10;
467 $type_pos = $grp_pos.str_pad($pos, 4, "0", STR_PAD_LEFT);
468 $ilSetting->set("obj_add_new_pos_".$obj_type, $type_pos);
469 $ilSetting->set("obj_add_new_pos_grp_".$obj_type, $grp_id);
470 }
471 }
472
473 /*
474 if (count($double) == 0)
475 {
476 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
477 }
478 else
479 {
480 ilUtil::sendInfo($lng->txt("cmps_duplicate_positions")." ".implode($double, ", "), true);
481 }
482 */
483
484 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
485 $ilCtrl->redirect($this, "listModules");
486 }
global $ilCtrl
Definition: ilias.php:18

References $_POST, $ilCtrl, $ilSetting, ilObjectGUI\$lng, ilObjRepositorySettings\getNewItemGroups(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ saveNewItemGroup()

ilObjRepositorySettingsGUI::saveNewItemGroup ( )
protected

Definition at line 579 of file class.ilObjRepositorySettingsGUI.php.

580 {
581 $form = $this->initNewItemGroupForm();
582 if($form->checkInput())
583 {
584 $titles = array();
585 foreach($this->lng->getInstalledLanguages() as $lang_id)
586 {
587 $titles[$lang_id] = $form->getInput("title_".$lang_id);
588 }
589
590 include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
592 {
593 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
594 $this->ctrl->redirect($this, "listNewItemGroups");
595 }
596 }
597
598 $form->setValuesByPost();
599 $this->addNewItemGroup($form);
600 }
addNewItemGroup(ilPropertyFormGUI $a_form=null)
static addNewItemGroup(array $a_titles)

References ilObjRepositorySettings\addNewItemGroup(), addNewItemGroup(), initNewItemGroupForm(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ saveNewItemGroupOrder()

ilObjRepositorySettingsGUI::saveNewItemGroupOrder ( )
protected

Definition at line 660 of file class.ilObjRepositorySettingsGUI.php.

661 {
662 global $ilSetting;
663
664 if(is_array($_POST["grp_order"]))
665 {
666 include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
668
669 $grp_pos_map = array();
670 include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
672 {
673 $grp_pos_map[$item["id"]] = str_pad($item["pos"], 4, "0", STR_PAD_LEFT);
674 }
675
676 // update order of assigned objects
677 foreach(ilObjRepositorySettings::getNewItemGroupSubItems() as $grp_id => $subitems)
678 {
679 // unassigned objects will always be last
680 if($grp_id)
681 {
682 foreach($subitems as $obj_type)
683 {
684 $old_pos = $ilSetting->get("obj_add_new_pos_".$obj_type);
685 if(strlen($old_pos) == 8)
686 {
687 $new_pos = $grp_pos_map[$grp_id].substr($old_pos, 4);
688 $ilSetting->set("obj_add_new_pos_".$obj_type, $new_pos);
689 }
690 }
691 }
692 }
693
694 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
695 }
696 $this->ctrl->redirect($this, "listNewItemGroups");
697 }
static updateNewItemGroupOrder(array $a_order)

References $_POST, $ilSetting, ilObjRepositorySettings\getNewItemGroups(), ilObjRepositorySettings\getNewItemGroupSubItems(), ilUtil\sendSuccess(), and ilObjRepositorySettings\updateNewItemGroupOrder().

+ Here is the call graph for this function:

◆ saveSettings()

ilObjRepositorySettingsGUI::saveSettings ( )

Definition at line 236 of file class.ilObjRepositorySettingsGUI.php.

237 {
238 global $ilSetting, $ilAccess;
239
240 if(!$ilAccess->checkAccess('write','',$this->object->getRefId()))
241 {
242 $this->ctrl->redirect($this, "view");
243 }
244
245 $form = $this->initSettingsForm();
246 if ($form->checkInput())
247 {
248 $ilSetting->set("default_repository_view", $_POST["default_rep_view"]);
249
250 $ilSetting->set("repository_tree_pres", $_POST["tree_pres"]);
251 if ($_POST["tree_pres"] == "")
252 {
253 $_POST["rep_tree_limit_grp_crs"] = "";
254 }
255 if ($_POST["rep_tree_limit_grp_crs"] && !$ilSetting->get("rep_tree_limit_grp_crs"))
256 {
257 $_POST["rep_tree_synchronize"] = true;
258 }
259 else if (!$_POST["rep_tree_synchronize"] && $ilSetting->get("rep_tree_synchronize"))
260 {
261 $_POST["rep_tree_limit_grp_crs"] = false;
262 }
263 $ilSetting->set("rep_tree_limit_grp_crs", $_POST["rep_tree_limit_grp_crs"]);
264
265 // $ilSetting->set('rep_cache',(int) $_POST['rep_cache']);
266 // $ilSetting->set("rep_tree_synchronize", $_POST["rep_tree_synchronize"]);
267
268 $ilSetting->set("enable_trash", $_POST["enable_trash"]);
269
270 $ilSetting->set("rep_shorten_description", $form->getInput('rep_shorten_description'));
271 $ilSetting->set("rep_shorten_description_length", (int)$form->getInput('rep_shorten_description_length'));
272 $ilSetting->set('item_cmd_asynch',(int) $_POST['item_cmd_asynch']);
273 $ilSetting->set('comments_tagging_in_lists',(int) $_POST['comments_tagging_in_lists']);
274 $ilSetting->set('comments_tagging_in_lists_tags',(int) $_POST['comments_tagging_in_lists_tags']);
275
276 require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
277 if ($form->getInput('change_event_tracking'))
278 {
280 }
281 else
282 {
284 }
285
286 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
287 $this->ctrl->redirect($this, "view");
288 }
289
290 $form->setValuesByPost();
291 $this->view($form);
292 }
static _activate()
Activates change event tracking.
static _deactivate()
Deactivates change event tracking.
view(ilPropertyFormGUI $a_form=null)

References $_POST, $ilSetting, ilChangeEvent\_activate(), ilChangeEvent\_deactivate(), initSettingsForm(), ilUtil\sendSuccess(), and view().

+ Here is the call graph for this function:

◆ setModuleSubTabs()

ilObjRepositorySettingsGUI::setModuleSubTabs (   $a_active)
protected

Definition at line 401 of file class.ilObjRepositorySettingsGUI.php.

402 {
403 $this->tabs_gui->activateTab('modules');
404
405 $this->tabs_gui->addSubTab("list_mods",
406 $this->lng->txt("rep_new_item_menu"),
407 $this->ctrl->getLinkTarget($this, "listModules"));
408
409 $this->tabs_gui->addSubTab("new_item_groups",
410 $this->lng->txt("rep_new_item_groups"),
411 $this->ctrl->getLinkTarget($this, "listNewItemGroups"));
412
413 $this->tabs_gui->activateSubTab($a_active);
414 }

Referenced by confirmDeleteNewItemGroup(), initNewItemGroupForm(), listModules(), and listNewItemGroups().

+ Here is the caller graph for this function:

◆ updateNewItemGroup()

ilObjRepositorySettingsGUI::updateNewItemGroup ( )
protected

Definition at line 619 of file class.ilObjRepositorySettingsGUI.php.

620 {
621 $grp_id = (int)$_GET["grp_id"];
622 if(!$grp_id)
623 {
624 $this->ctrl->redirect($this, "listNewItemGroups");
625 }
626
627 $this->ctrl->setParameter($this, "grp_id", $grp_id);
628
629 $form = $this->initNewItemGroupForm($grp_id);
630 if($form->checkInput())
631 {
632 $titles = array();
633 foreach($this->lng->getInstalledLanguages() as $lang_id)
634 {
635 $titles[$lang_id] = $form->getInput("title_".$lang_id);
636 }
637
638 include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
640 {
641 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
642 $this->ctrl->redirect($this, "listNewItemGroups");
643 }
644 }
645
646 $form->setValuesByPost();
647 $this->addNewItemGroup($form);
648 }
static updateNewItemGroup($a_id, array $a_titles)

References $_GET, addNewItemGroup(), initNewItemGroupForm(), ilUtil\sendSuccess(), and ilObjRepositorySettings\updateNewItemGroup().

+ Here is the call graph for this function:

◆ view()

ilObjRepositorySettingsGUI::view ( ilPropertyFormGUI  $a_form = null)

Definition at line 80 of file class.ilObjRepositorySettingsGUI.php.

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 }

References initSettingsForm().

Referenced by saveSettings().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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