ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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...
 

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
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 

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

27 {
28 global $DIC;
29
30 $this->error = $DIC["ilErr"];
31 $this->access = $DIC->access();
32 $this->rbacsystem = $DIC->rbac()->system();
33 $this->settings = $DIC->settings();
34 $this->ctrl = $DIC->ctrl();
35 $this->lng = $DIC->language();
36 $this->toolbar = $DIC->toolbar();
37 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
38
39 $this->type = 'reps';
40 $this->lng->loadLanguageModule('rep');
41 $this->lng->loadLanguageModule('cmps');
42 }
error($a_errmsg)
set error message @access public
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
settings()
Definition: settings.php:2
$DIC
Definition: xapitoken.php:46

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

575 {
576 if (!$a_form) {
577 $a_form = $this->initNewItemGroupForm();
578 }
579
580 $this->tpl->setContent($a_form->getHTML());
581 }

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

644 {
646 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
647 }
648 $this->ctrl->redirect($this, "listNewItemGroups");
649 }

References ilObjRepositorySettings\addNewItemGroupSeparator().

+ Here is the call graph for this function:

◆ addToExternalSettingsForm()

ilObjRepositorySettingsGUI::addToExternalSettingsForm (   $a_form_id)

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

722 {
724
725 switch ($a_form_id) {
727
728 require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
729 $fields = array('trac_show_repository_views' => array(ilChangeEvent::_isActive(), ilAdministrationSettingsFormHandler::VALUE_BOOL));
730
731 return array(array("view", $fields));
732
733
735
736 $fields = array(
737 'adm_show_comments_tagging_in_lists' => array($ilSetting->get('comments_tagging_in_lists'), ilAdministrationSettingsFormHandler::VALUE_BOOL,
738 array('adm_show_comments_tagging_in_lists_tags' => array($ilSetting->get('comments_tagging_in_lists_tags'), ilAdministrationSettingsFormHandler::VALUE_BOOL))
739 ));
740
741 return array(array("view", $fields));
742 }
743 }
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 682 of file class.ilObjRepositorySettingsGUI.php.

683 {
684 if (!is_array($_POST["grp_id"])) {
685 ilUtil::sendFailure($this->lng->txt("select_one"));
686 return $this->listNewItemGroups();
687 }
688
689 $this->setModuleSubTabs("new_item_groups");
690
691 $cgui = new ilConfirmationGUI();
692 $cgui->setHeaderText($this->lng->txt("rep_new_item_group_delete_sure"));
693
694 $cgui->setFormAction($this->ctrl->getFormAction($this));
695 $cgui->setCancel($this->lng->txt("cancel"), "listNewItemGroups");
696 $cgui->setConfirm($this->lng->txt("confirm"), "deleteNewItemGroup");
697
699
700 foreach ($_POST["grp_id"] as $grp_id) {
701 $cgui->addItem("grp_id[]", $grp_id, $groups[$grp_id]["title"]);
702 }
703
704 $this->tpl->setContent($cgui->getHTML());
705 }
$_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 360 of file class.ilObjRepositorySettingsGUI.php.

361 {
362 $this->tabs_gui->activateTab("icons");
363
364 if (!$a_form) {
365 $a_form = $this->initCustomIconsForm();
366 }
367
368 $this->tpl->setContent($a_form->getHTML());
369 }

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

708 {
709 if (!is_array($_POST["grp_id"])) {
710 return $this->listNewItemGroups();
711 }
712
713 foreach ($_POST["grp_id"] as $grp_id) {
715 }
716
717 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
718 $this->ctrl->redirect($this, "listNewItemGroups");
719 }

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

603 {
604 $grp_id = (int) $_GET["grp_id"];
605 if (!$grp_id) {
606 $this->ctrl->redirect($this, "listNewItemGroups");
607 }
608
609 if (!$a_form) {
610 $this->ctrl->setParameter($this, "grp_id", $grp_id);
611 $a_form = $this->initNewItemGroupForm($grp_id);
612 }
613
614 $this->tpl->setContent($a_form->getHTML());
615 }
$_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 44 of file class.ilObjRepositorySettingsGUI.php.

45 {
47 $ilAccess = $this->access;
48
49 $next_class = $this->ctrl->getNextClass($this);
50 $cmd = $this->ctrl->getCmd();
51
52 $this->prepareOutput();
53
54 if (!$ilAccess->checkAccess('read', '', $this->object->getRefId())) {
55 $ilErr->raiseError($this->lng->txt('no_permission'), $ilErr->WARNING);
56 }
57
58 switch ($next_class) {
59 case 'ilpermissiongui':
60 $this->tabs_gui->setTabActive('perm_settings');
61 $perm_gui = new ilPermissionGUI($this);
62 $this->ctrl->forwardCommand($perm_gui);
63 break;
64
65 default:
66 $this->$cmd();
67 break;
68 }
69 return true;
70 }
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 72 of file class.ilObjRepositorySettingsGUI.php.

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

References $rbacsystem.

◆ initCustomIconsForm()

ilObjRepositorySettingsGUI::initCustomIconsForm ( )
protected

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

372 {
374 $ilAccess = $this->access;
375
376 $form = new ilPropertyFormGUI();
377 $form->setTitle($this->lng->txt("rep_custom_icons"));
378 $form->setFormAction($this->ctrl->getFormAction($this, 'saveCustomIcons'));
379
380 $cb = new ilCheckboxInputGUI($this->lng->txt("enable_custom_icons"), "custom_icons");
381 $cb->setInfo($this->lng->txt("enable_custom_icons_info"));
382 $cb->setChecked($ilSetting->get("custom_icons"));
383 $form->addItem($cb);
384
385 if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
386 $form->addCommandButton('saveCustomIcons', $this->lng->txt('save'));
387 }
388
389 return $form;
390 }
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 525 of file class.ilObjRepositorySettingsGUI.php.

526 {
527 $this->setModuleSubTabs("new_item_groups");
528
529 $form = new ilPropertyFormGUI();
530
531 $this->lng->loadLanguageModule("meta");
532 $def_lng = $this->lng->getDefaultLanguage();
533
534 $title = new ilTextInputGUI($this->lng->txt("title"), "title_" . $def_lng);
535 $title->setInfo($this->lng->txt("meta_l_" . $def_lng) .
536 " (" . $this->lng->txt("default_language") . ")");
537 $title->setRequired(true);
538 $form->addItem($title);
539
540 foreach ($this->lng->getInstalledLanguages() as $lang_id) {
541 if ($lang_id != $def_lng) {
542 $title = new ilTextInputGUI($this->lng->txt("translation"), "title_" . $lang_id);
543 $title->setInfo($this->lng->txt("meta_l_" . $lang_id));
544 $form->addItem($title);
545 }
546 }
547
548 if (!$a_grp_id) {
549 $form->setTitle($this->lng->txt("rep_new_item_group_add"));
550 $form->setFormAction($this->ctrl->getFormAction($this, "saveNewItemGroup"));
551
552 $form->addCommandButton("saveNewItemGroup", $this->lng->txt("save"));
553 } else {
554 $form->setTitle($this->lng->txt("rep_new_item_group_edit"));
555 $form->setFormAction($this->ctrl->getFormAction($this, "updateNewItemGroup"));
556
558 $grp = $grp[$a_grp_id];
559
560 foreach ($grp["titles"] as $id => $value) {
561 $field = $form->getItemByPostVar("title_" . $id);
562 if ($field) {
563 $field->setValue($value);
564 }
565 }
566
567 $form->addCommandButton("updateNewItemGroup", $this->lng->txt("save"));
568 }
569 $form->addCommandButton("listNewItemGroups", $this->lng->txt("cancel"));
570
571 return $form;
572 }
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 114 of file class.ilObjRepositorySettingsGUI.php.

115 {
117 $ilAccess = $this->access;
118
119 $form = new ilPropertyFormGUI();
120 $form->setTitle($this->lng->txt("settings"));
121 $form->setFormAction($this->ctrl->getFormAction($this, 'saveSettings'));
122
123 // default repository view
124 $options = array(
125 "flat" => $this->lng->txt("flatview"),
126 "tree" => $this->lng->txt("treeview")
127 );
128 $si = new ilSelectInputGUI($this->lng->txt("def_repository_view"), "default_rep_view");
129 $si->setOptions($options);
130 $si->setInfo($this->lng->txt(""));
131 if ($ilSetting->get("default_repository_view") == "tree") {
132 $si->setValue("tree");
133 } else {
134 $si->setValue("flat");
135 }
136 $form->addItem($si);
137
138 //
139 $options = array(
140 "" => $this->lng->txt("adm_rep_tree_only_container"),
141 "tree" => $this->lng->txt("adm_all_resource_types")
142 );
143
144 // repository tree
145 $radg = new ilRadioGroupInputGUI($this->lng->txt("adm_rep_tree_presentation"), "tree_pres");
146 $radg->setValue($ilSetting->get("repository_tree_pres"));
147 $op1 = new ilRadioOption(
148 $this->lng->txt("adm_rep_tree_only_cntr"),
149 "",
150 $this->lng->txt("adm_rep_tree_only_cntr_info")
151 );
152 $radg->addOption($op1);
153
154 $op2 = new ilRadioOption(
155 $this->lng->txt("adm_rep_tree_all_types"),
156 "all_types",
157 $this->lng->txt("adm_rep_tree_all_types_info")
158 );
159
160 // limit tree in courses and groups
161 $cb = new ilCheckboxInputGUI($this->lng->txt("adm_rep_tree_limit_grp_crs"), "rep_tree_limit_grp_crs");
162 $cb->setChecked($ilSetting->get("rep_tree_limit_grp_crs"));
163 $cb->setInfo($this->lng->txt("adm_rep_tree_limit_grp_crs_info"));
164 $op2->addSubItem($cb);
165
166 $radg->addOption($op2);
167
168 $form->addItem($radg);
169
170 // limit items in tree
171 $tree_limit = new ilCheckboxInputGUI($this->lng->txt("rep_tree_limit"), "rep_tree_limit");
172 $tree_limit->setChecked($ilSetting->get("rep_tree_limit_number") > 0);
173 $tree_limit->setInfo($this->lng->txt("rep_tree_limit_info"));
174 $form->addItem($tree_limit);
175
176 // limit items in tree (number)
177 $tree_limit_number = new ilNumberInputGUI($this->lng->txt("rep_tree_limit_number"), "rep_tree_limit_number");
178 $tree_limit_number->setMaxLength(3);
179 $tree_limit_number->setSize(3);
180 $tree_limit_number->setValue($ilSetting->get("rep_tree_limit_number"));
181 $tree_limit_number->setInfo($this->lng->txt("rep_tree_limit_number_info"));
182 $tree_limit->addSubItem($tree_limit_number);
183
184 // breadcrumbs start with courses
185 $cb = new ilCheckboxInputGUI($this->lng->txt("rep_breadcr_crs"), "rep_breadcr_crs");
186 $cb->setChecked((int) $ilSetting->get("rep_breadcr_crs"));
187 $form->addItem($cb);
188
189 $radg = new ilRadioGroupInputGUI($this->lng->txt("rep_breadcr_crs"), "rep_breadcr_crs_overwrite");
190 $radg->setValue((int) $ilSetting->get("rep_breadcr_crs_overwrite"));
191
192 $op0 = new ilRadioOption($this->lng->txt("rep_breadcr_crs_overwrite"), 1);
193 $cb0 = new ilCheckboxInputGUI($this->lng->txt("rep_default"), "rep_breadcr_crs_default");
194 $cb0->setChecked((int) $ilSetting->get("rep_breadcr_crs_default"));
195 $op0->addSubItem($cb0);
196 $radg->addOption($op0);
197
198 $op1 = new ilRadioOption($this->lng->txt("rep_breadcr_crs_overwrite_not"), 0);
199 $radg->addOption($op1);
200
201
202 $cb->addSubItem($radg);
203
204
205
206 // trash
207 $cb = new ilCheckboxInputGUI($this->lng->txt("enable_trash"), "enable_trash");
208 $cb->setInfo($this->lng->txt("enable_trash_info"));
209 if ($ilSetting->get("enable_trash")) {
210 $cb->setChecked(true);
211 }
212 $form->addItem($cb);
213
214 // change event
215 $this->lng->loadLanguageModule("trac");
216 $event = new ilCheckboxInputGUI($this->lng->txt('trac_show_repository_views'), 'change_event_tracking');
217 $event->setInfo($this->lng->txt("trac_show_repository_views_info"));
218 $event->setChecked(ilChangeEvent::_isActive());
219 $form->addItem($event);
220
221
224 $form,
225 $this
226 );
227
228 // export limitations
229 $limiter = new ilExportLimitation();
230 $exp_limit = new ilRadioGroupInputGUI($this->lng->txt("rep_export_limitation"), "rep_export_limitation");
231 $exp_limit->setValue($limiter->getLimitationMode());
232 $exp_limit->setInfo($this->lng->txt("rep_export_limitation_info"));
233
234 $op_disabled = new ilRadioOption(
235 $this->lng->txt("rep_export_limitation_disabled"),
237 );
238 $exp_limit->addOption($op_disabled);
239
240 $op_limited = new ilRadioOption(
241 $this->lng->txt("rep_export_limitation_limited"),
243 );
244 $exp_limit->addOption($op_limited);
245
246 // limit items in tree (number)
247 $exp_limit_num = new ilNumberInputGUI($this->lng->txt("rep_export_limit_number"), "rep_export_limit_number");
248 $exp_limit_num->setMaxLength(6);
249 $exp_limit_num->setSize(6);
250 $exp_limit_num->setValue($ilSetting->get("rep_export_limit_number"));
251 $op_limited->addSubItem($exp_limit_num);
252
253 $form->addItem($exp_limit);
254
255 // object lists
256
257 $lists = new ilFormSectionHeaderGUI();
258 $lists->setTitle($this->lng->txt("rep_object_lists"));
259 $form->addItem($lists);
260
261 $sdesc = new ilCheckboxInputGUI($this->lng->txt("adm_rep_shorten_description"), "rep_shorten_description");
262 $sdesc->setInfo($this->lng->txt("adm_rep_shorten_description_info"));
263 $sdesc->setChecked($ilSetting->get("rep_shorten_description"));
264 $form->addItem($sdesc);
265
266 $sdesclen = new ilNumberInputGUI($this->lng->txt("adm_rep_shorten_description_length"), "rep_shorten_description_length");
267 $sdesclen->setValue($ilSetting->get("rep_shorten_description_length"));
268 $sdesclen->setSize(3);
269 $sdesc->addSubItem($sdesclen);
270
271 // load action commands asynchronously
272 $cb = new ilCheckboxInputGUI($this->lng->txt("adm_item_cmd_asynch"), "item_cmd_asynch");
273 $cb->setInfo($this->lng->txt("adm_item_cmd_asynch_info"));
274 $cb->setChecked($ilSetting->get("item_cmd_asynch"));
275 $form->addItem($cb);
276
277 // notes/comments/tagging
278 $pl = new ilCheckboxInputGUI($this->lng->txt('adm_show_comments_tagging_in_lists'), 'comments_tagging_in_lists');
279 $pl->setValue(1);
280 $pl->setChecked($ilSetting->get('comments_tagging_in_lists'));
281 $form->addItem($pl);
282
283 $pltags = new ilCheckboxInputGUI($this->lng->txt('adm_show_comments_tagging_in_lists_tags'), 'comments_tagging_in_lists_tags');
284 $pltags->setValue(1);
285 $pltags->setChecked($ilSetting->get('comments_tagging_in_lists_tags'));
286 $pl->addSubItem($pltags);
287
288 if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
289 $form->addCommandButton('saveSettings', $this->lng->txt('save'));
290 }
291
292 return $form;
293 }
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.
This class represents a selection list property in a property form.

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

432 {
433 $ilAccess = $this->access;
434
435 $this->setModuleSubTabs("list_mods");
436
437 $has_write = $ilAccess->checkAccess('write', '', $this->object->getRefId());
438
439 $comp_table = new ilModulesTableGUI($this, "listModules", $has_write);
440
441 $this->tpl->setContent($comp_table->getHTML());
442 }
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 499 of file class.ilObjRepositorySettingsGUI.php.

500 {
501 $ilToolbar = $this->toolbar;
502 $ilAccess = $this->access;
503
504 $this->setModuleSubTabs("new_item_groups");
505
506 $has_write = $ilAccess->checkAccess('write', '', $this->object->getRefId());
507
508 if ($has_write) {
509 $ilToolbar->addButton(
510 $this->lng->txt("rep_new_item_group_add"),
511 $this->ctrl->getLinkTarget($this, "addNewItemGroup")
512 );
513
514 $ilToolbar->addButton(
515 $this->lng->txt("rep_new_item_group_add_separator"),
516 $this->ctrl->getLinkTarget($this, "addNewItemGroupSeparator")
517 );
518 }
519
520 $grp_table = new ilNewItemGroupTableGUI($this, "listNewItemGroups", $has_write);
521
522 $this->tpl->setContent($grp_table->getHTML());
523 }
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 392 of file class.ilObjRepositorySettingsGUI.php.

393 {
395 $ilAccess = $this->access;
396
397 if (!$ilAccess->checkAccess('write', '', $this->object->getRefId())) {
398 $this->ctrl->redirect($this, "customIcons");
399 }
400
401 $form = $this->initCustomIconsForm();
402 if ($form->checkInput()) {
403 $ilSetting->set("custom_icons", (int) $form->getInput("custom_icons"));
404 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
405 $this->ctrl->redirect($this, "customIcons");
406 }
407
408 $form->setValuesByPost();
409 $this->customIcons($form);
410 }
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 444 of file class.ilObjRepositorySettingsGUI.php.

445 {
449 $ilAccess = $this->access;
450
451 if (!is_array($_POST["obj_grp"]) ||
452 !is_array($_POST["obj_pos"]) ||
453 !$ilAccess->checkAccess('write', '', $this->object->getRefId())) {
454 $ilCtrl->redirect($this, "listModules");
455 }
456
457 $grp_pos_map = array(0 => 9999);
458 foreach (ilObjRepositorySettings::getNewItemGroups() as $item) {
459 $grp_pos_map[$item["id"]] = $item["pos"];
460 }
461
462 $type_pos_map = array();
463 foreach ($_POST["obj_pos"] as $obj_type => $pos) {
464 $grp_id = (int) $_POST["obj_grp"][$obj_type];
465 $type_pos_map[$grp_id][$obj_type] = $pos;
466
467 // enable creation?
468 $ilSetting->set("obj_dis_creation_" . $obj_type, !(int) $_POST["obj_enbl_creation"][$obj_type]);
469 }
470
471 foreach ($type_pos_map as $grp_id => $obj_types) {
472 $grp_pos = str_pad($grp_pos_map[$grp_id], 4, "0", STR_PAD_LEFT);
473
474 asort($obj_types);
475 $pos = 0;
476 foreach (array_keys($obj_types) as $obj_type) {
477 $pos += 10;
478 $type_pos = $grp_pos . str_pad($pos, 4, "0", STR_PAD_LEFT);
479 $ilSetting->set("obj_add_new_pos_" . $obj_type, $type_pos);
480 $ilSetting->set("obj_add_new_pos_grp_" . $obj_type, $grp_id);
481 }
482 }
483
484 /*
485 if (count($double) == 0)
486 {
487 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
488 }
489 else
490 {
491 ilUtil::sendInfo($lng->txt("cmps_duplicate_positions")." ".implode($double, ", "), true);
492 }
493 */
494
495 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
496 $ilCtrl->redirect($this, "listModules");
497 }
global $ilCtrl
Definition: ilias.php:18

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

+ Here is the call graph for this function:

◆ saveNewItemGroup()

ilObjRepositorySettingsGUI::saveNewItemGroup ( )
protected

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

584 {
585 $form = $this->initNewItemGroupForm();
586 if ($form->checkInput()) {
587 $titles = array();
588 foreach ($this->lng->getInstalledLanguages() as $lang_id) {
589 $titles[$lang_id] = $form->getInput("title_" . $lang_id);
590 }
591
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(), and initNewItemGroupForm().

+ Here is the call graph for this function:

◆ saveNewItemGroupOrder()

ilObjRepositorySettingsGUI::saveNewItemGroupOrder ( )
protected

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

652 {
654
655 if (is_array($_POST["grp_order"])) {
657
658 $grp_pos_map = array();
659 foreach (ilObjRepositorySettings::getNewItemGroups() as $item) {
660 $grp_pos_map[$item["id"]] = str_pad($item["pos"], 4, "0", STR_PAD_LEFT);
661 }
662
663 // update order of assigned objects
664 foreach (ilObjRepositorySettings::getNewItemGroupSubItems() as $grp_id => $subitems) {
665 // unassigned objects will always be last
666 if ($grp_id) {
667 foreach ($subitems as $obj_type) {
668 $old_pos = $ilSetting->get("obj_add_new_pos_" . $obj_type);
669 if (strlen($old_pos) == 8) {
670 $new_pos = $grp_pos_map[$grp_id] . substr($old_pos, 4);
671 $ilSetting->set("obj_add_new_pos_" . $obj_type, $new_pos);
672 }
673 }
674 }
675 }
676
677 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
678 }
679 $this->ctrl->redirect($this, "listNewItemGroups");
680 }
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 295 of file class.ilObjRepositorySettingsGUI.php.

296 {
298 $ilAccess = $this->access;
299
300 if (!$ilAccess->checkAccess('write', '', $this->object->getRefId())) {
301 $this->ctrl->redirect($this, "view");
302 }
303
304 $form = $this->initSettingsForm();
305 if ($form->checkInput()) {
306 $ilSetting->set("default_repository_view", $_POST["default_rep_view"]);
307
308 $ilSetting->set("repository_tree_pres", $_POST["tree_pres"]);
309 if ($_POST["tree_pres"] == "") {
310 $_POST["rep_tree_limit_grp_crs"] = "";
311 }
312 if ($_POST["rep_tree_limit_grp_crs"] && !$ilSetting->get("rep_tree_limit_grp_crs")) {
313 $_POST["rep_tree_synchronize"] = true;
314 } elseif (!$_POST["rep_tree_synchronize"] && $ilSetting->get("rep_tree_synchronize")) {
315 $_POST["rep_tree_limit_grp_crs"] = false;
316 }
317 $ilSetting->set("rep_tree_limit_grp_crs", $_POST["rep_tree_limit_grp_crs"]);
318
319 $ilSetting->set("rep_export_limitation", $_POST["rep_export_limitation"]);
320 $ilSetting->set("rep_export_limit_number", $_POST["rep_export_limit_number"]);
321
322 // $ilSetting->set('rep_cache',(int) $_POST['rep_cache']);
323 // $ilSetting->set("rep_tree_synchronize", $_POST["rep_tree_synchronize"]);
324
325 $ilSetting->set("enable_trash", $_POST["enable_trash"]);
326
327
328 $ilSetting->set("rep_breadcr_crs_overwrite", (int) $_POST["rep_breadcr_crs_overwrite"]);
329 $ilSetting->set("rep_breadcr_crs", (int) $_POST["rep_breadcr_crs"]);
330 $ilSetting->set("rep_breadcr_crs_default", (int) $_POST["rep_breadcr_crs_default"]);
331
332
333 $ilSetting->set("rep_shorten_description", $form->getInput('rep_shorten_description'));
334 $ilSetting->set("rep_shorten_description_length", (int) $form->getInput('rep_shorten_description_length'));
335 $ilSetting->set('item_cmd_asynch', (int) $_POST['item_cmd_asynch']);
336 $ilSetting->set('comments_tagging_in_lists', (int) $_POST['comments_tagging_in_lists']);
337 $ilSetting->set('comments_tagging_in_lists_tags', (int) $_POST['comments_tagging_in_lists_tags']);
338
339 // repository tree limit of children
340 $limit_number = ($_POST['rep_tree_limit'] && $_POST['rep_tree_limit_number'] > 0)
341 ? (int) $_POST['rep_tree_limit_number']
342 : 0;
343 $ilSetting->set('rep_tree_limit_number', $limit_number);
344
345 require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
346 if ($form->getInput('change_event_tracking')) {
348 } else {
350 }
351
352 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
353 $this->ctrl->redirect($this, "view");
354 }
355
356 $form->setValuesByPost();
357 $this->view($form);
358 }
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 412 of file class.ilObjRepositorySettingsGUI.php.

413 {
414 $this->tabs_gui->activateTab('modules');
415
416 $this->tabs_gui->addSubTab(
417 "list_mods",
418 $this->lng->txt("rep_new_item_menu"),
419 $this->ctrl->getLinkTarget($this, "listModules")
420 );
421
422 $this->tabs_gui->addSubTab(
423 "new_item_groups",
424 $this->lng->txt("rep_new_item_groups"),
425 $this->ctrl->getLinkTarget($this, "listNewItemGroups")
426 );
427
428 $this->tabs_gui->activateSubTab($a_active);
429 }

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

+ Here is the caller graph for this function:

◆ updateNewItemGroup()

ilObjRepositorySettingsGUI::updateNewItemGroup ( )
protected

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

618 {
619 $grp_id = (int) $_GET["grp_id"];
620 if (!$grp_id) {
621 $this->ctrl->redirect($this, "listNewItemGroups");
622 }
623
624 $this->ctrl->setParameter($this, "grp_id", $grp_id);
625
626 $form = $this->initNewItemGroupForm($grp_id);
627 if ($form->checkInput()) {
628 $titles = array();
629 foreach ($this->lng->getInstalledLanguages() as $lang_id) {
630 $titles[$lang_id] = $form->getInput("title_" . $lang_id);
631 }
632
633 if (ilObjRepositorySettings::updateNewItemGroup($grp_id, $titles)) {
634 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
635 $this->ctrl->redirect($this, "listNewItemGroups");
636 }
637 }
638
639 $form->setValuesByPost();
640 $this->addNewItemGroup($form);
641 }
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 103 of file class.ilObjRepositorySettingsGUI.php.

104 {
105 $this->tabs_gui->activateTab("settings");
106
107 if (!$a_form) {
108 $a_form = $this->initSettingsForm();
109 }
110
111 $this->tpl->setContent($a_form->getHTML());
112 }

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().

◆ $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: