ILIAS  release_7 Revision v7.30-3-g800a261c036
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 ()
 administration tabs show only permissions and trash folder More...
 
 view (ilPropertyFormGUI $a_form=null)
 
 saveSettings ()
 
 customIcons (ilPropertyFormGUI $a_form=null)
 
 saveCustomIcons ()
 
 addToExternalSettingsForm ($a_form_id)
 
- Public Member Functions inherited from ilObjectGUI
 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...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 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 ()
 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...
 
 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...
 
 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 ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 
 addToDeskObject ()
 @inheritDoc More...
 
 removeFromDeskObject ()
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

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
 getObjectService ()
 Get object service. More...
 
 assignObject ()
 
 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...
 
 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...
 
 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...
 
 getTabs ()
 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 (ilColumnGUI $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...
 

Protected Attributes

 $error
 
 $rbacsystem
 
 $folder_settings
 
- Protected Attributes inherited from ilObjectGUI
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 
 $request
 

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 ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $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
 

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 14 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 31 of file class.ilObjRepositorySettingsGUI.php.

32 {
33 global $DIC;
34
35 $this->error = $DIC["ilErr"];
36 $this->access = $DIC->access();
37 $this->rbacsystem = $DIC->rbac()->system();
38 $this->settings = $DIC->settings();
39 $this->folder_settings = new ilSetting('fold');
40 $this->ctrl = $DIC->ctrl();
41 $this->lng = $DIC->language();
42 $this->toolbar = $DIC->toolbar();
43 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
44
45 $this->type = 'reps';
46 $this->lng->loadLanguageModule('rep');
47 $this->lng->loadLanguageModule('cmps');
48 }
error($a_errmsg)
set error message @access public
ILIAS Setting Class.
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
settings()
Definition: settings.php:2

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), error(), and settings().

+ Here is the call graph for this function:

Member Function Documentation

◆ addNewItemGroup()

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

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

609 {
610 if (!$a_form) {
611 $a_form = $this->initNewItemGroupForm();
612 }
613
614 $this->tpl->setContent($a_form->getHTML());
615 }

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 677 of file class.ilObjRepositorySettingsGUI.php.

678 {
680 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
681 }
682 $this->ctrl->redirect($this, "listNewItemGroups");
683 }

References ilObjRepositorySettings\addNewItemGroupSeparator().

+ Here is the call graph for this function:

◆ addToExternalSettingsForm()

ilObjRepositorySettingsGUI::addToExternalSettingsForm (   $a_form_id)

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

756 {
758
759 switch ($a_form_id) {
761
762 require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
763 $fields = array('trac_show_repository_views' => array(ilChangeEvent::_isActive(), ilAdministrationSettingsFormHandler::VALUE_BOOL));
764
765 return array(array("view", $fields));
766
767
769
770 $fields = array(
771 'adm_show_comments_tagging_in_lists' => array($ilSetting->get('comments_tagging_in_lists'), ilAdministrationSettingsFormHandler::VALUE_BOOL,
772 array('adm_show_comments_tagging_in_lists_tags' => array($ilSetting->get('comments_tagging_in_lists_tags'), ilAdministrationSettingsFormHandler::VALUE_BOOL))
773 ));
774
775 return array(array("view", $fields));
776 }
777 }
static _isActive()
Returns true, if change event tracking is active.
global $ilSetting
Definition: privfeed.php:17

References $ilSetting, ilObjectGUI\$settings, 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 716 of file class.ilObjRepositorySettingsGUI.php.

717 {
718 if (!is_array($_POST["grp_id"])) {
719 ilUtil::sendFailure($this->lng->txt("select_one"));
720 return $this->listNewItemGroups();
721 }
722
723 $this->setModuleSubTabs("new_item_groups");
724
725 $cgui = new ilConfirmationGUI();
726 $cgui->setHeaderText($this->lng->txt("rep_new_item_group_delete_sure"));
727
728 $cgui->setFormAction($this->ctrl->getFormAction($this));
729 $cgui->setCancel($this->lng->txt("cancel"), "listNewItemGroups");
730 $cgui->setConfirm($this->lng->txt("confirm"), "deleteNewItemGroup");
731
733
734 foreach ($_POST["grp_id"] as $grp_id) {
735 $cgui->addItem("grp_id[]", $grp_id, $groups[$grp_id]["title"]);
736 }
737
738 $this->tpl->setContent($cgui->getHTML());
739 }
$_POST["username"]
Confirmation screen class.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.

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 394 of file class.ilObjRepositorySettingsGUI.php.

395 {
396 $this->tabs_gui->activateTab("icons");
397
398 if (!$a_form) {
399 $a_form = $this->initCustomIconsForm();
400 }
401
402 $this->tpl->setContent($a_form->getHTML());
403 }

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 741 of file class.ilObjRepositorySettingsGUI.php.

742 {
743 if (!is_array($_POST["grp_id"])) {
744 return $this->listNewItemGroups();
745 }
746
747 foreach ($_POST["grp_id"] as $grp_id) {
749 }
750
751 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
752 $this->ctrl->redirect($this, "listNewItemGroups");
753 }

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

+ Here is the call graph for this function:

◆ editNewItemGroup()

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

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

637 {
638 $grp_id = (int) $_GET["grp_id"];
639 if (!$grp_id) {
640 $this->ctrl->redirect($this, "listNewItemGroups");
641 }
642
643 if (!$a_form) {
644 $this->ctrl->setParameter($this, "grp_id", $grp_id);
645 $a_form = $this->initNewItemGroupForm($grp_id);
646 }
647
648 $this->tpl->setContent($a_form->getHTML());
649 }
$_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 50 of file class.ilObjRepositorySettingsGUI.php.

51 {
53 $ilAccess = $this->access;
54
55 $next_class = $this->ctrl->getNextClass($this);
56 $cmd = $this->ctrl->getCmd();
57
58 $this->prepareOutput();
59
60 if (!$ilAccess->checkAccess('read', '', $this->object->getRefId())) {
61 $ilErr->raiseError($this->lng->txt('no_permission'), $ilErr->WARNING);
62 }
63
64 switch ($next_class) {
65 case 'ilpermissiongui':
66 $this->tabs_gui->setTabActive('perm_settings');
67 $perm_gui = new ilPermissionGUI($this);
68 $this->ctrl->forwardCommand($perm_gui);
69 break;
70
71 default:
72 $this->$cmd();
73 break;
74 }
75 return true;
76 }
prepareOutput($a_show_subobjects=true)
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.

References ilObjectGUI\$access, $error, ilObjectGUI\$ilErr, and ilObjectGUI\prepareOutput().

+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjRepositorySettingsGUI::getAdminTabs ( )

administration tabs show only permissions and trash folder

Reimplemented from ilObjectGUI.

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

79 {
81
82 $this->tabs_gui->addTab(
83 "settings",
84 $this->lng->txt("settings"),
85 $this->ctrl->getLinkTarget($this, "view")
86 );
87
88 $this->tabs_gui->addTab(
89 "icons",
90 $this->lng->txt("rep_custom_icons"),
91 $this->ctrl->getLinkTarget($this, "customIcons")
92 );
93
94 $this->tabs_gui->addTab(
95 "modules",
96 $this->lng->txt("cmps_repository_object_types"),
97 $this->ctrl->getLinkTarget($this, "listModules")
98 );
99
100 if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
101 $this->tabs_gui->addTab(
102 "perm_settings",
103 $this->lng->txt("perm_settings"),
104 $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm")
105 );
106 }
107 }

References $rbacsystem.

◆ initCustomIconsForm()

ilObjRepositorySettingsGUI::initCustomIconsForm ( )
protected

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

406 {
408 $ilAccess = $this->access;
409
410 $form = new ilPropertyFormGUI();
411 $form->setTitle($this->lng->txt("rep_custom_icons"));
412 $form->setFormAction($this->ctrl->getFormAction($this, 'saveCustomIcons'));
413
414 $cb = new ilCheckboxInputGUI($this->lng->txt("enable_custom_icons"), "custom_icons");
415 $cb->setInfo($this->lng->txt("enable_custom_icons_info"));
416 $cb->setChecked($ilSetting->get("custom_icons"));
417 $form->addItem($cb);
418
419 if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
420 $form->addCommandButton('saveCustomIcons', $this->lng->txt('save'));
421 }
422
423 return $form;
424 }
This class represents a checkbox property in a property form.
This class represents a property form user interface.

References ilObjectGUI\$access, $ilSetting, and ilObjectGUI\$settings.

Referenced by customIcons(), and saveCustomIcons().

+ Here is the caller graph for this function:

◆ initNewItemGroupForm()

ilObjRepositorySettingsGUI::initNewItemGroupForm (   $a_grp_id = false)
protected

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

560 {
561 $this->setModuleSubTabs("new_item_groups");
562
563 $form = new ilPropertyFormGUI();
564
565 $this->lng->loadLanguageModule("meta");
566 $def_lng = $this->lng->getDefaultLanguage();
567
568 $title = new ilTextInputGUI($this->lng->txt("title"), "title_" . $def_lng);
569 $title->setInfo($this->lng->txt("meta_l_" . $def_lng) .
570 " (" . $this->lng->txt("default_language") . ")");
571 $title->setRequired(true);
572 $form->addItem($title);
573
574 foreach ($this->lng->getInstalledLanguages() as $lang_id) {
575 if ($lang_id != $def_lng) {
576 $title = new ilTextInputGUI($this->lng->txt("translation"), "title_" . $lang_id);
577 $title->setInfo($this->lng->txt("meta_l_" . $lang_id));
578 $form->addItem($title);
579 }
580 }
581
582 if (!$a_grp_id) {
583 $form->setTitle($this->lng->txt("rep_new_item_group_add"));
584 $form->setFormAction($this->ctrl->getFormAction($this, "saveNewItemGroup"));
585
586 $form->addCommandButton("saveNewItemGroup", $this->lng->txt("save"));
587 } else {
588 $form->setTitle($this->lng->txt("rep_new_item_group_edit"));
589 $form->setFormAction($this->ctrl->getFormAction($this, "updateNewItemGroup"));
590
592 $grp = $grp[$a_grp_id];
593
594 foreach ($grp["titles"] as $id => $value) {
595 $field = $form->getItemByPostVar("title_" . $id);
596 if ($field) {
597 $field->setValue($value);
598 }
599 }
600
601 $form->addCommandButton("updateNewItemGroup", $this->lng->txt("save"));
602 }
603 $form->addCommandButton("listNewItemGroups", $this->lng->txt("cancel"));
604
605 return $form;
606 }
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 120 of file class.ilObjRepositorySettingsGUI.php.

121 {
123 $ilAccess = $this->access;
124
125 $form = new ilPropertyFormGUI();
126 $form->setTitle($this->lng->txt("settings"));
127 $form->setFormAction($this->ctrl->getFormAction($this, 'saveSettings'));
128
129 // default repository view
130 /*
131 $options = array(
132 "flat" => $this->lng->txt("flatview"),
133 "tree" => $this->lng->txt("treeview")
134 );
135 $si = new ilSelectInputGUI($this->lng->txt("def_repository_view"), "default_rep_view");
136 $si->setOptions($options);
137 $si->setInfo($this->lng->txt(""));
138 if ($ilSetting->get("default_repository_view") == "tree") {
139 $si->setValue("tree");
140 } else {
141 $si->setValue("flat");
142 }
143 $form->addItem($si);*/
144
145 //
146 $options = array(
147 "" => $this->lng->txt("adm_rep_tree_only_container"),
148 "tree" => $this->lng->txt("adm_all_resource_types")
149 );
150
151 // repository tree
152 $radg = new ilRadioGroupInputGUI($this->lng->txt("adm_rep_tree_presentation"), "tree_pres");
153 $radg->setValue($ilSetting->get("repository_tree_pres"));
154 $op1 = new ilRadioOption(
155 $this->lng->txt("adm_rep_tree_only_cntr"),
156 "",
157 $this->lng->txt("adm_rep_tree_only_cntr_info")
158 );
159 $radg->addOption($op1);
160
161 $op2 = new ilRadioOption(
162 $this->lng->txt("adm_rep_tree_all_types"),
163 "all_types",
164 $this->lng->txt("adm_rep_tree_all_types_info")
165 );
166
167 // limit tree in courses and groups
168 $cb = new ilCheckboxInputGUI($this->lng->txt("adm_rep_tree_limit_grp_crs"), "rep_tree_limit_grp_crs");
169 $cb->setChecked($ilSetting->get("rep_tree_limit_grp_crs"));
170 $cb->setInfo($this->lng->txt("adm_rep_tree_limit_grp_crs_info"));
171 $op2->addSubItem($cb);
172
173 $radg->addOption($op2);
174
175 $form->addItem($radg);
176
177 // limit items in tree
178 $tree_limit = new ilCheckboxInputGUI($this->lng->txt("rep_tree_limit"), "rep_tree_limit");
179 $tree_limit->setChecked($ilSetting->get("rep_tree_limit_number") > 0);
180 $tree_limit->setInfo($this->lng->txt("rep_tree_limit_info"));
181 $form->addItem($tree_limit);
182
183 // limit items in tree (number)
184 $tree_limit_number = new ilNumberInputGUI($this->lng->txt("rep_tree_limit_number"), "rep_tree_limit_number");
185 $tree_limit_number->setMaxLength(3);
186 $tree_limit_number->setSize(3);
187 $tree_limit_number->setValue($ilSetting->get("rep_tree_limit_number"));
188 $tree_limit_number->setInfo($this->lng->txt("rep_tree_limit_number_info"));
189 $tree_limit->addSubItem($tree_limit_number);
190
191 // breadcrumbs start with courses
192 $cb = new ilCheckboxInputGUI($this->lng->txt("rep_breadcr_crs"), "rep_breadcr_crs");
193 $cb->setChecked((int) $ilSetting->get("rep_breadcr_crs"));
194 $form->addItem($cb);
195
196 $radg = new ilRadioGroupInputGUI($this->lng->txt("rep_breadcr_crs_config"), "rep_breadcr_crs_overwrite");
197 $radg->setValue((int) $ilSetting->get("rep_breadcr_crs_overwrite"));
198
199 $op0 = new ilRadioOption($this->lng->txt("rep_breadcr_crs_overwrite"), 1);
200 $cb0 = new ilCheckboxInputGUI($this->lng->txt("rep_crs_default_shortened"), "rep_breadcr_crs_default");
201 $cb0->setChecked((int) $ilSetting->get("rep_breadcr_crs_default"));
202 $op0->addSubItem($cb0);
203 $radg->addOption($op0);
204
205 $op1 = new ilRadioOption($this->lng->txt("rep_breadcr_crs_overwrite_not"), 0);
206 $radg->addOption($op1);
207
208
209 $cb->addSubItem($radg);
210
211
212
213 // trash
214 $cb = new ilCheckboxInputGUI($this->lng->txt("enable_trash"), "enable_trash");
215 $cb->setInfo($this->lng->txt("enable_trash_info"));
216 if ($ilSetting->get("enable_trash")) {
217 $cb->setChecked(true);
218 }
219 $form->addItem($cb);
220
221 // change event
222 $this->lng->loadLanguageModule("trac");
223 $event = new ilCheckboxInputGUI($this->lng->txt('trac_show_repository_views'), 'change_event_tracking');
224 $event->setInfo($this->lng->txt("trac_show_repository_views_info"));
225 $event->setChecked(ilChangeEvent::_isActive());
226 $form->addItem($event);
227
228
231 $form,
232 $this
233 );
234
235 // export limitations
236 $limiter = new ilExportLimitation();
237 $exp_limit = new ilRadioGroupInputGUI($this->lng->txt("rep_export_limitation"), "rep_export_limitation");
238 $exp_limit->setValue($limiter->getLimitationMode());
239 $exp_limit->setInfo($this->lng->txt("rep_export_limitation_info"));
240
241 $op_disabled = new ilRadioOption(
242 $this->lng->txt("rep_export_limitation_disabled"),
244 );
245 $exp_limit->addOption($op_disabled);
246
247 $op_limited = new ilRadioOption(
248 $this->lng->txt("rep_export_limitation_limited"),
250 );
251 $exp_limit->addOption($op_limited);
252
253 // limit items in tree (number)
254 $exp_limit_num = new ilNumberInputGUI($this->lng->txt("rep_export_limit_number"), "rep_export_limit_number");
255 $exp_limit_num->setMaxLength(6);
256 $exp_limit_num->setSize(6);
257 $exp_limit_num->setValue($ilSetting->get("rep_export_limit_number"));
258 $op_limited->addSubItem($exp_limit_num);
259
260 $form->addItem($exp_limit);
261
262 // Show download action for folder
263 $dl_prop = new ilCheckboxInputGUI($this->lng->txt("enable_download_folder"), "enable_download_folder");
264 $dl_prop->setValue('1');
265 // default value should reflect previous behaviour (-> 0)
266 $dl_prop->setChecked($this->folder_settings->get("enable_download_folder", 0) == 1);
267 $dl_prop->setInfo($this->lng->txt('enable_download_folder_info'));
268 $form->addItem($dl_prop);
269
270 // multi download
271 $dl_prop = new ilCheckboxInputGUI($this->lng->txt("enable_multi_download"), "enable_multi_download");
272 $dl_prop->setValue('1');
273 // default value should reflect previous behaviour (-> 0)
274 $dl_prop->setChecked($this->folder_settings->get("enable_multi_download", 0) == 1);
275 $dl_prop->setInfo($this->lng->txt('enable_multi_download_info'));
276 $form->addItem($dl_prop);
277
278 // favourites
279 $cb = new ilCheckboxInputGUI($this->lng->txt("rep_favourites"), "rep_favourites");
280 $cb->setInfo($this->lng->txt("rep_favourites_info"));
281 $cb->setChecked((bool) $ilSetting->get("rep_favourites"));
282 $form->addItem($cb);
283
284
285 // object lists
286
287 $lists = new ilFormSectionHeaderGUI();
288 $lists->setTitle($this->lng->txt("rep_object_lists"));
289 $form->addItem($lists);
290
291 $sdesc = new ilCheckboxInputGUI($this->lng->txt("adm_rep_shorten_description"), "rep_shorten_description");
292 $sdesc->setInfo($this->lng->txt("adm_rep_shorten_description_info"));
293 $sdesc->setChecked($ilSetting->get("rep_shorten_description"));
294 $form->addItem($sdesc);
295
296 $sdesclen = new ilNumberInputGUI($this->lng->txt("adm_rep_shorten_description_length"), "rep_shorten_description_length");
297 $sdesclen->setValue($ilSetting->get("rep_shorten_description_length"));
298 $sdesclen->setSize(3);
299 $sdesc->addSubItem($sdesclen);
300
301 // load action commands asynchronously
302 $cb = new ilCheckboxInputGUI($this->lng->txt("adm_item_cmd_asynch"), "item_cmd_asynch");
303 $cb->setInfo($this->lng->txt("adm_item_cmd_asynch_info"));
304 $cb->setChecked($ilSetting->get("item_cmd_asynch"));
305 $form->addItem($cb);
306
307 // notes/comments/tagging
308 $pl = new ilCheckboxInputGUI($this->lng->txt('adm_show_comments_tagging_in_lists'), 'comments_tagging_in_lists');
309 $pl->setValue(1);
310 $pl->setChecked($ilSetting->get('comments_tagging_in_lists'));
311 $form->addItem($pl);
312
313 $pltags = new ilCheckboxInputGUI($this->lng->txt('adm_show_comments_tagging_in_lists_tags'), 'comments_tagging_in_lists_tags');
314 $pltags->setValue(1);
315 $pltags->setChecked($ilSetting->get('comments_tagging_in_lists_tags'));
316 $pl->addSubItem($pltags);
317
318 if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
319 $form->addCommandButton('saveSettings', $this->lng->txt('save'));
320 }
321
322 return $form;
323 }
static addFieldsToForm($a_form_id, ilPropertyFormGUI $a_form, ilObjectGUI $a_parent_gui)
Export limitation checker.
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.

References ilObjectGUI\$access, $ilSetting, ilObjectGUI\$settings, ilChangeEvent\_isActive(), ilAdministrationSettingsFormHandler\addFieldsToForm(), ilAdministrationSettingsFormHandler\FORM_REPOSITORY, ilExportLimitation\SET_EXPORT_DISABLED, and ilExportLimitation\SET_EXPORT_LIMITED.

Referenced by 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 465 of file class.ilObjRepositorySettingsGUI.php.

466 {
467 $ilAccess = $this->access;
468
469 $this->setModuleSubTabs("list_mods");
470
471 $has_write = $ilAccess->checkAccess('write', '', $this->object->getRefId());
472
473 $comp_table = new ilModulesTableGUI($this, "listModules", $has_write);
474
475 $this->tpl->setContent($comp_table->getHTML());
476 }
TableGUI class for module listing.

References ilObjectGUI\$access, and setModuleSubTabs().

+ Here is the call graph for this function:

◆ listNewItemGroups()

ilObjRepositorySettingsGUI::listNewItemGroups ( )
protected

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

534 {
535 $ilToolbar = $this->toolbar;
536 $ilAccess = $this->access;
537
538 $this->setModuleSubTabs("new_item_groups");
539
540 $has_write = $ilAccess->checkAccess('write', '', $this->object->getRefId());
541
542 if ($has_write) {
543 $ilToolbar->addButton(
544 $this->lng->txt("rep_new_item_group_add"),
545 $this->ctrl->getLinkTarget($this, "addNewItemGroup")
546 );
547
548 $ilToolbar->addButton(
549 $this->lng->txt("rep_new_item_group_add_separator"),
550 $this->ctrl->getLinkTarget($this, "addNewItemGroupSeparator")
551 );
552 }
553
554 $grp_table = new ilNewItemGroupTableGUI($this, "listNewItemGroups", $has_write);
555
556 $this->tpl->setContent($grp_table->getHTML());
557 }
TableGUI class for new item groups.

References ilObjectGUI\$access, ilObjectGUI\$toolbar, and 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 426 of file class.ilObjRepositorySettingsGUI.php.

427 {
429 $ilAccess = $this->access;
430
431 if (!$ilAccess->checkAccess('write', '', $this->object->getRefId())) {
432 $this->ctrl->redirect($this, "customIcons");
433 }
434
435 $form = $this->initCustomIconsForm();
436 if ($form->checkInput()) {
437 $ilSetting->set("custom_icons", (int) $form->getInput("custom_icons"));
438 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
439 $this->ctrl->redirect($this, "customIcons");
440 }
441
442 $form->setValuesByPost();
443 $this->customIcons($form);
444 }
customIcons(ilPropertyFormGUI $a_form=null)

References ilObjectGUI\$access, $ilSetting, ilObjectGUI\$settings, customIcons(), and initCustomIconsForm().

+ Here is the call graph for this function:

◆ saveModules()

ilObjRepositorySettingsGUI::saveModules ( )
protected

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

479 {
481 $ilCtrl = $this->ctrl;
483 $ilAccess = $this->access;
484
485 if (!is_array($_POST["obj_grp"]) ||
486 !is_array($_POST["obj_pos"]) ||
487 !$ilAccess->checkAccess('write', '', $this->object->getRefId())) {
488 $ilCtrl->redirect($this, "listModules");
489 }
490
491 $grp_pos_map = array(0 => 9999);
492 foreach (ilObjRepositorySettings::getNewItemGroups() as $item) {
493 $grp_pos_map[$item["id"]] = $item["pos"];
494 }
495
496 $type_pos_map = array();
497 foreach ($_POST["obj_pos"] as $obj_type => $pos) {
498 $grp_id = (int) $_POST["obj_grp"][$obj_type];
499 $type_pos_map[$grp_id][$obj_type] = $pos;
500
501 // enable creation?
502 $ilSetting->set("obj_dis_creation_" . $obj_type, !(int) $_POST["obj_enbl_creation"][$obj_type]);
503 }
504
505 foreach ($type_pos_map as $grp_id => $obj_types) {
506 $grp_pos = str_pad($grp_pos_map[$grp_id], 4, "0", STR_PAD_LEFT);
507
508 asort($obj_types);
509 $pos = 0;
510 foreach (array_keys($obj_types) as $obj_type) {
511 $pos += 10;
512 $type_pos = $grp_pos . str_pad($pos, 4, "0", STR_PAD_LEFT);
513 $ilSetting->set("obj_add_new_pos_" . $obj_type, $type_pos);
514 $ilSetting->set("obj_add_new_pos_grp_" . $obj_type, $grp_id);
515 }
516 }
517
518 /*
519 if (count($double) == 0)
520 {
521 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
522 }
523 else
524 {
525 ilUtil::sendInfo($lng->txt("cmps_duplicate_positions")." ".implode($double, ", "), true);
526 }
527 */
528
529 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
530 $ilCtrl->redirect($this, "listModules");
531 }

References $_POST, ilObjectGUI\$access, ilObjectGUI\$ctrl, $ilSetting, ilObjectGUI\$lng, ilObjectGUI\$settings, and ilObjRepositorySettings\getNewItemGroups().

+ Here is the call graph for this function:

◆ saveNewItemGroup()

ilObjRepositorySettingsGUI::saveNewItemGroup ( )
protected

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

618 {
619 $form = $this->initNewItemGroupForm();
620 if ($form->checkInput()) {
621 $titles = array();
622 foreach ($this->lng->getInstalledLanguages() as $lang_id) {
623 $titles[$lang_id] = $form->getInput("title_" . $lang_id);
624 }
625
627 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
628 $this->ctrl->redirect($this, "listNewItemGroups");
629 }
630 }
631
632 $form->setValuesByPost();
633 $this->addNewItemGroup($form);
634 }
addNewItemGroup(ilPropertyFormGUI $a_form=null)
static addNewItemGroup(array $a_titles)

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

+ Here is the call graph for this function:

◆ saveNewItemGroupOrder()

ilObjRepositorySettingsGUI::saveNewItemGroupOrder ( )
protected

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

686 {
688
689 if (is_array($_POST["grp_order"])) {
691
692 $grp_pos_map = array();
693 foreach (ilObjRepositorySettings::getNewItemGroups() as $item) {
694 $grp_pos_map[$item["id"]] = str_pad($item["pos"], 4, "0", STR_PAD_LEFT);
695 }
696
697 // update order of assigned objects
698 foreach (ilObjRepositorySettings::getNewItemGroupSubItems() as $grp_id => $subitems) {
699 // unassigned objects will always be last
700 if ($grp_id) {
701 foreach ($subitems as $obj_type) {
702 $old_pos = $ilSetting->get("obj_add_new_pos_" . $obj_type);
703 if (strlen($old_pos) == 8) {
704 $new_pos = $grp_pos_map[$grp_id] . substr($old_pos, 4);
705 $ilSetting->set("obj_add_new_pos_" . $obj_type, $new_pos);
706 }
707 }
708 }
709 }
710
711 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
712 }
713 $this->ctrl->redirect($this, "listNewItemGroups");
714 }
static updateNewItemGroupOrder(array $a_order)

References $_POST, $ilSetting, ilObjectGUI\$settings, ilObjRepositorySettings\getNewItemGroups(), ilObjRepositorySettings\getNewItemGroupSubItems(), and ilObjRepositorySettings\updateNewItemGroupOrder().

+ Here is the call graph for this function:

◆ saveSettings()

ilObjRepositorySettingsGUI::saveSettings ( )

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

326 {
328 $ilAccess = $this->access;
329
330 if (!$ilAccess->checkAccess('write', '', $this->object->getRefId())) {
331 $this->ctrl->redirect($this, "view");
332 }
333
334 $form = $this->initSettingsForm();
335 if ($form->checkInput()) {
336 $ilSetting->set("default_repository_view", $_POST["default_rep_view"]);
337
338 $ilSetting->set("repository_tree_pres", $_POST["tree_pres"]);
339 if ($_POST["tree_pres"] == "") {
340 $_POST["rep_tree_limit_grp_crs"] = "";
341 }
342 if ($_POST["rep_tree_limit_grp_crs"] && !$ilSetting->get("rep_tree_limit_grp_crs")) {
343 $_POST["rep_tree_synchronize"] = true;
344 } elseif (!$_POST["rep_tree_synchronize"] && $ilSetting->get("rep_tree_synchronize")) {
345 $_POST["rep_tree_limit_grp_crs"] = false;
346 }
347 $ilSetting->set("rep_tree_limit_grp_crs", $_POST["rep_tree_limit_grp_crs"]);
348
349 $ilSetting->set("rep_export_limitation", $_POST["rep_export_limitation"]);
350 $ilSetting->set("rep_export_limit_number", $_POST["rep_export_limit_number"]);
351 $ilSetting->set("rep_favourites", $form->getInput("rep_favourites"));
352
353 // $ilSetting->set('rep_cache',(int) $_POST['rep_cache']);
354 // $ilSetting->set("rep_tree_synchronize", $_POST["rep_tree_synchronize"]);
355
356 $ilSetting->set("enable_trash", $_POST["enable_trash"]);
357
358
359 $ilSetting->set("rep_breadcr_crs_overwrite", (int) $_POST["rep_breadcr_crs_overwrite"]);
360 $ilSetting->set("rep_breadcr_crs", (int) $_POST["rep_breadcr_crs"]);
361 $ilSetting->set("rep_breadcr_crs_default", (int) $_POST["rep_breadcr_crs_default"]);
362
363
364 $ilSetting->set("rep_shorten_description", $form->getInput('rep_shorten_description'));
365 $ilSetting->set("rep_shorten_description_length", (int) $form->getInput('rep_shorten_description_length'));
366 $ilSetting->set('item_cmd_asynch', (int) $_POST['item_cmd_asynch']);
367 $ilSetting->set('comments_tagging_in_lists', (int) $_POST['comments_tagging_in_lists']);
368 $ilSetting->set('comments_tagging_in_lists_tags', (int) $_POST['comments_tagging_in_lists_tags']);
369
370 // repository tree limit of children
371 $limit_number = ($_POST['rep_tree_limit'] && $_POST['rep_tree_limit_number'] > 0)
372 ? (int) $_POST['rep_tree_limit_number']
373 : 0;
374 $ilSetting->set('rep_tree_limit_number', $limit_number);
375
376 $this->folder_settings->set("enable_download_folder", $_POST["enable_download_folder"] == 1);
377 $this->folder_settings->set("enable_multi_download", $_POST["enable_multi_download"] == 1);
378
379 require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
380 if ($form->getInput('change_event_tracking')) {
382 } else {
384 }
385
386 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
387 $this->ctrl->redirect($this, "view");
388 }
389
390 $form->setValuesByPost();
391 $this->view($form);
392 }
static _activate()
Activates change event tracking.
static _deactivate()
Deactivates change event tracking.
view(ilPropertyFormGUI $a_form=null)

References $_POST, ilObjectGUI\$access, $ilSetting, ilObjectGUI\$settings, ilChangeEvent\_activate(), ilChangeEvent\_deactivate(), initSettingsForm(), and view().

+ Here is the call graph for this function:

◆ setModuleSubTabs()

ilObjRepositorySettingsGUI::setModuleSubTabs (   $a_active)
protected

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

447 {
448 $this->tabs_gui->activateTab('modules');
449
450 $this->tabs_gui->addSubTab(
451 "list_mods",
452 $this->lng->txt("rep_new_item_menu"),
453 $this->ctrl->getLinkTarget($this, "listModules")
454 );
455
456 $this->tabs_gui->addSubTab(
457 "new_item_groups",
458 $this->lng->txt("rep_new_item_groups"),
459 $this->ctrl->getLinkTarget($this, "listNewItemGroups")
460 );
461
462 $this->tabs_gui->activateSubTab($a_active);
463 }

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

+ Here is the caller graph for this function:

◆ updateNewItemGroup()

ilObjRepositorySettingsGUI::updateNewItemGroup ( )
protected

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

652 {
653 $grp_id = (int) $_GET["grp_id"];
654 if (!$grp_id) {
655 $this->ctrl->redirect($this, "listNewItemGroups");
656 }
657
658 $this->ctrl->setParameter($this, "grp_id", $grp_id);
659
660 $form = $this->initNewItemGroupForm($grp_id);
661 if ($form->checkInput()) {
662 $titles = array();
663 foreach ($this->lng->getInstalledLanguages() as $lang_id) {
664 $titles[$lang_id] = $form->getInput("title_" . $lang_id);
665 }
666
667 if (ilObjRepositorySettings::updateNewItemGroup($grp_id, $titles)) {
668 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
669 $this->ctrl->redirect($this, "listNewItemGroups");
670 }
671 }
672
673 $form->setValuesByPost();
674 $this->addNewItemGroup($form);
675 }
static updateNewItemGroup($a_id, array $a_titles)

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

+ Here is the call graph for this function:

◆ view()

ilObjRepositorySettingsGUI::view ( ilPropertyFormGUI  $a_form = null)

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

110 {
111 $this->tabs_gui->activateTab("settings");
112
113 if (!$a_form) {
114 $a_form = $this->initSettingsForm();
115 }
116
117 $this->tpl->setContent($a_form->getHTML());
118 }

References initSettingsForm().

Referenced by saveSettings().

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

Field Documentation

◆ $error

ilObjRepositorySettingsGUI::$error
protected

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

Referenced by executeCommand().

◆ $folder_settings

ilObjRepositorySettingsGUI::$folder_settings
protected

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

◆ $rbacsystem

ilObjRepositorySettingsGUI::$rbacsystem
protected

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

Referenced by getAdminTabs().


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