ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 ()
 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 ()
 
 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...
 
 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
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $rbacsystem
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

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

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

References $DIC, 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 534 of file class.ilObjRepositorySettingsGUI.php.

535 {
536 if (!$a_form) {
537 $a_form = $this->initNewItemGroupForm();
538 }
539
540 $this->tpl->setContent($a_form->getHTML());
541 }

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

606 {
607 include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
609 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
610 }
611 $this->ctrl->redirect($this, "listNewItemGroups");
612 }
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 689 of file class.ilObjRepositorySettingsGUI.php.

690 {
692
693 switch ($a_form_id) {
695
696 require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
697 $fields = array('trac_show_repository_views' => array(ilChangeEvent::_isActive(), ilAdministrationSettingsFormHandler::VALUE_BOOL));
698
699 return array(array("view", $fields));
700
701
703
704 $fields = array(
705 'adm_show_comments_tagging_in_lists' => array($ilSetting->get('comments_tagging_in_lists'), ilAdministrationSettingsFormHandler::VALUE_BOOL,
706 array('adm_show_comments_tagging_in_lists_tags' => array($ilSetting->get('comments_tagging_in_lists_tags'), ilAdministrationSettingsFormHandler::VALUE_BOOL))
707 ));
708
709 return array(array("view", $fields));
710 }
711 }
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 647 of file class.ilObjRepositorySettingsGUI.php.

648 {
649 if (!is_array($_POST["grp_id"])) {
650 ilUtil::sendFailure($this->lng->txt("select_one"));
651 return $this->listNewItemGroups();
652 }
653
654 $this->setModuleSubTabs("new_item_groups");
655
656 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
657 $cgui = new ilConfirmationGUI();
658 $cgui->setHeaderText($this->lng->txt("rep_new_item_group_delete_sure"));
659
660 $cgui->setFormAction($this->ctrl->getFormAction($this));
661 $cgui->setCancel($this->lng->txt("cancel"), "listNewItemGroups");
662 $cgui->setConfirm($this->lng->txt("confirm"), "deleteNewItemGroup");
663
664 include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
666
667 foreach ($_POST["grp_id"] as $grp_id) {
668 $cgui->addItem("grp_id[]", $grp_id, $groups[$grp_id]["title"]);
669 }
670
671 $this->tpl->setContent($cgui->getHTML());
672 }
$_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 313 of file class.ilObjRepositorySettingsGUI.php.

314 {
315 $this->tabs_gui->activateTab("icons");
316
317 if (!$a_form) {
318 $a_form = $this->initCustomIconsForm();
319 }
320
321 $this->tpl->setContent($a_form->getHTML());
322 }

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

675 {
676 if (!is_array($_POST["grp_id"])) {
677 return $this->listNewItemGroups();
678 }
679
680 include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
681 foreach ($_POST["grp_id"] as $grp_id) {
683 }
684
685 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
686 $this->ctrl->redirect($this, "listNewItemGroups");
687 }

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

564 {
565 $grp_id = (int) $_GET["grp_id"];
566 if (!$grp_id) {
567 $this->ctrl->redirect($this, "listNewItemGroups");
568 }
569
570 if (!$a_form) {
571 $this->ctrl->setParameter($this, "grp_id", $grp_id);
572 $a_form = $this->initNewItemGroupForm($grp_id);
573 }
574
575 $this->tpl->setContent($a_form->getHTML());
576 }
$_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 45 of file class.ilObjRepositorySettingsGUI.php.

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

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

References $rbacsystem.

◆ initCustomIconsForm()

ilObjRepositorySettingsGUI::initCustomIconsForm ( )
protected

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

325 {
327 $ilAccess = $this->access;
328
329 include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
330 include_once "Services/Form/classes/class.ilCombinationInputGUI.php";
331 $form = new ilPropertyFormGUI();
332 $form->setTitle($this->lng->txt("rep_custom_icons"));
333 $form->setFormAction($this->ctrl->getFormAction($this, 'saveCustomIcons'));
334
335 $cb = new ilCheckboxInputGUI($this->lng->txt("enable_custom_icons"), "custom_icons");
336 $cb->setInfo($this->lng->txt("enable_custom_icons_info"));
337 $cb->setChecked($ilSetting->get("custom_icons"));
338 $form->addItem($cb);
339
340 if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
341 $form->addCommandButton('saveCustomIcons', $this->lng->txt('save'));
342 }
343
344 return $form;
345 }
This class represents a checkbox property in a property form.
This class represents a property form user interface.
if(isset($_POST['submit'])) $form

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

484 {
485 $this->setModuleSubTabs("new_item_groups");
486
487 include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
488 $form = new ilPropertyFormGUI();
489
490 $this->lng->loadLanguageModule("meta");
491 $def_lng = $this->lng->getDefaultLanguage();
492
493 $title = new ilTextInputGUI($this->lng->txt("title"), "title_" . $def_lng);
494 $title->setInfo($this->lng->txt("meta_l_" . $def_lng) .
495 " (" . $this->lng->txt("default_language") . ")");
496 $title->setRequired(true);
497 $form->addItem($title);
498
499 foreach ($this->lng->getInstalledLanguages() as $lang_id) {
500 if ($lang_id != $def_lng) {
501 $title = new ilTextInputGUI($this->lng->txt("translation"), "title_" . $lang_id);
502 $title->setInfo($this->lng->txt("meta_l_" . $lang_id));
503 $form->addItem($title);
504 }
505 }
506
507 if (!$a_grp_id) {
508 $form->setTitle($this->lng->txt("rep_new_item_group_add"));
509 $form->setFormAction($this->ctrl->getFormAction($this, "saveNewItemGroup"));
510
511 $form->addCommandButton("saveNewItemGroup", $this->lng->txt("save"));
512 } else {
513 $form->setTitle($this->lng->txt("rep_new_item_group_edit"));
514 $form->setFormAction($this->ctrl->getFormAction($this, "updateNewItemGroup"));
515
516 include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
518 $grp = $grp[$a_grp_id];
519
520 foreach ($grp["titles"] as $id => $value) {
521 $field = $form->getItemByPostVar("title_" . $id);
522 if ($field) {
523 $field->setValue($value);
524 }
525 }
526
527 $form->addCommandButton("updateNewItemGroup", $this->lng->txt("save"));
528 }
529 $form->addCommandButton("listNewItemGroups", $this->lng->txt("cancel"));
530
531 return $form;
532 }
This class represents a text property in a property form.
if(!array_key_exists('StateId', $_REQUEST)) $id

References $form, $id, $title, 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 116 of file class.ilObjRepositorySettingsGUI.php.

117 {
119 $ilAccess = $this->access;
120
121 include_once('Services/Form/classes/class.ilPropertyFormGUI.php');
122 $form = new ilPropertyFormGUI();
123 $form->setTitle($this->lng->txt("settings"));
124 $form->setFormAction($this->ctrl->getFormAction($this, 'saveSettings'));
125
126 // default repository view
127 $options = array(
128 "flat" => $this->lng->txt("flatview"),
129 "tree" => $this->lng->txt("treeview")
130 );
131 $si = new ilSelectInputGUI($this->lng->txt("def_repository_view"), "default_rep_view");
132 $si->setOptions($options);
133 $si->setInfo($this->lng->txt(""));
134 if ($ilSetting->get("default_repository_view") == "tree") {
135 $si->setValue("tree");
136 } else {
137 $si->setValue("flat");
138 }
139 $form->addItem($si);
140
141 //
142 $options = array(
143 "" => $this->lng->txt("adm_rep_tree_only_container"),
144 "tree" => $this->lng->txt("adm_all_resource_types")
145 );
146
147 // repository tree
148 $radg = new ilRadioGroupInputGUI($this->lng->txt("adm_rep_tree_presentation"), "tree_pres");
149 $radg->setValue($ilSetting->get("repository_tree_pres"));
150 $op1 = new ilRadioOption(
151 $this->lng->txt("adm_rep_tree_only_cntr"),
152 "",
153 $this->lng->txt("adm_rep_tree_only_cntr_info")
154 );
155 $radg->addOption($op1);
156
157 $op2 = new ilRadioOption(
158 $this->lng->txt("adm_rep_tree_all_types"),
159 "all_types",
160 $this->lng->txt("adm_rep_tree_all_types_info")
161 );
162
163 // limit tree in courses and groups
164 $cb = new ilCheckboxInputGUI($this->lng->txt("adm_rep_tree_limit_grp_crs"), "rep_tree_limit_grp_crs");
165 $cb->setChecked($ilSetting->get("rep_tree_limit_grp_crs"));
166 $cb->setInfo($this->lng->txt("adm_rep_tree_limit_grp_crs_info"));
167 $op2->addSubItem($cb);
168
169 $radg->addOption($op2);
170
171 $form->addItem($radg);
172
173 /* OBSOLETE
174 // synchronize repository tree with main view
175 $cb = new ilCheckboxInputGUI($this->lng->txt("adm_synchronize_rep_tree"), "rep_tree_synchronize");
176 $cb->setInfo($this->lng->txt("adm_synchronize_rep_tree_info"));
177 $cb->setChecked($ilSetting->get("rep_tree_synchronize"));
178 $form->addItem($cb);
179 */
180
181 /* DISABLED
182 // repository access check
183 $options = array(
184 0 => "0",
185 10 => "10",
186 30 => "30",
187 60 => "60",
188 120 => "120"
189 );
190 $si = new ilSelectInputGUI($this->lng->txt("adm_repository_cache_time"), "rep_cache");
191 $si->setOptions($options);
192 $si->setValue($ilSetting->get("rep_cache"));
193 $si->setInfo($this->lng->txt("adm_repository_cache_time_info")." ".
194 $this->lng->txt("adm_repository_cache_time_info2"));
195 $form->addItem($si);
196 */
197
198 // trash
199 $cb = new ilCheckboxInputGUI($this->lng->txt("enable_trash"), "enable_trash");
200 $cb->setInfo($this->lng->txt("enable_trash_info"));
201 if ($ilSetting->get("enable_trash")) {
202 $cb->setChecked(true);
203 }
204 $form->addItem($cb);
205
206 // change event
207 require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
208 $this->lng->loadLanguageModule("trac");
209 $event = new ilCheckboxInputGUI($this->lng->txt('trac_show_repository_views'), 'change_event_tracking');
210 $event->setInfo($this->lng->txt("trac_show_repository_views_info"));
211 $event->setChecked(ilChangeEvent::_isActive());
212 $form->addItem($event);
213
214
215 include_once "Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php";
218 $form,
219 $this
220 );
221
222
223 // object lists
224
225 $lists = new ilFormSectionHeaderGUI();
226 $lists->setTitle($this->lng->txt("rep_object_lists"));
227 $form->addItem($lists);
228
229 $sdesc = new ilCheckboxInputGUI($this->lng->txt("adm_rep_shorten_description"), "rep_shorten_description");
230 $sdesc->setInfo($this->lng->txt("adm_rep_shorten_description_info"));
231 $sdesc->setChecked($ilSetting->get("rep_shorten_description"));
232 $form->addItem($sdesc);
233
234 $sdesclen = new ilNumberInputGUI($this->lng->txt("adm_rep_shorten_description_length"), "rep_shorten_description_length");
235 $sdesclen->setValue($ilSetting->get("rep_shorten_description_length"));
236 $sdesclen->setSize(3);
237 $sdesc->addSubItem($sdesclen);
238
239 // load action commands asynchronously
240 $cb = new ilCheckboxInputGUI($this->lng->txt("adm_item_cmd_asynch"), "item_cmd_asynch");
241 $cb->setInfo($this->lng->txt("adm_item_cmd_asynch_info"));
242 $cb->setChecked($ilSetting->get("item_cmd_asynch"));
243 $form->addItem($cb);
244
245 // notes/comments/tagging
246 $pl = new ilCheckboxInputGUI($this->lng->txt('adm_show_comments_tagging_in_lists'), 'comments_tagging_in_lists');
247 $pl->setValue(1);
248 $pl->setChecked($ilSetting->get('comments_tagging_in_lists'));
249 $form->addItem($pl);
250
251 $pltags = new ilCheckboxInputGUI($this->lng->txt('adm_show_comments_tagging_in_lists_tags'), 'comments_tagging_in_lists_tags');
252 $pltags->setValue(1);
253 $pltags->setChecked($ilSetting->get('comments_tagging_in_lists_tags'));
254 $pl->addSubItem($pltags);
255
256 if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
257 $form->addCommandButton('saveSettings', $this->lng->txt('save'));
258 }
259
260 return $form;
261 }
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Definition: as_login.php:20
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.

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

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

387 {
388 $ilAccess = $this->access;
389
390 $this->setModuleSubTabs("list_mods");
391
392 $has_write = $ilAccess->checkAccess('write', '', $this->object->getRefId());
393
394 include_once("./Services/Repository/classes/class.ilModulesTableGUI.php");
395 $comp_table = new ilModulesTableGUI($this, "listModules", $has_write);
396
397 $this->tpl->setContent($comp_table->getHTML());
398 }
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 456 of file class.ilObjRepositorySettingsGUI.php.

457 {
458 $ilToolbar = $this->toolbar;
459 $ilAccess = $this->access;
460
461 $this->setModuleSubTabs("new_item_groups");
462
463 $has_write = $ilAccess->checkAccess('write', '', $this->object->getRefId());
464
465 if ($has_write) {
466 $ilToolbar->addButton(
467 $this->lng->txt("rep_new_item_group_add"),
468 $this->ctrl->getLinkTarget($this, "addNewItemGroup")
469 );
470
471 $ilToolbar->addButton(
472 $this->lng->txt("rep_new_item_group_add_separator"),
473 $this->ctrl->getLinkTarget($this, "addNewItemGroupSeparator")
474 );
475 }
476
477 include_once("./Services/Repository/classes/class.ilNewItemGroupTableGUI.php");
478 $grp_table = new ilNewItemGroupTableGUI($this, "listNewItemGroups", $has_write);
479
480 $this->tpl->setContent($grp_table->getHTML());
481 }
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 347 of file class.ilObjRepositorySettingsGUI.php.

348 {
350 $ilAccess = $this->access;
351
352 if (!$ilAccess->checkAccess('write', '', $this->object->getRefId())) {
353 $this->ctrl->redirect($this, "customIcons");
354 }
355
356 $form = $this->initCustomIconsForm();
357 if ($form->checkInput()) {
358 $ilSetting->set("custom_icons", (int) $form->getInput("custom_icons"));
359 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
360 $this->ctrl->redirect($this, "customIcons");
361 }
362
363 $form->setValuesByPost();
364 $this->customIcons($form);
365 }
customIcons(ilPropertyFormGUI $a_form=null)

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

+ Here is the call graph for this function:

◆ saveModules()

ilObjRepositorySettingsGUI::saveModules ( )
protected

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

401 {
405 $ilAccess = $this->access;
406
407 if (!is_array($_POST["obj_grp"]) ||
408 !is_array($_POST["obj_pos"]) ||
409 !$ilAccess->checkAccess('write', '', $this->object->getRefId())) {
410 $ilCtrl->redirect($this, "listModules");
411 }
412
413 $grp_pos_map = array(0 => 9999);
414 include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
415 foreach (ilObjRepositorySettings::getNewItemGroups() as $item) {
416 $grp_pos_map[$item["id"]] = $item["pos"];
417 }
418
419 $type_pos_map = array();
420 foreach ($_POST["obj_pos"] as $obj_type => $pos) {
421 $grp_id = (int) $_POST["obj_grp"][$obj_type];
422 $type_pos_map[$grp_id][$obj_type] = $pos;
423
424 // enable creation?
425 $ilSetting->set("obj_dis_creation_" . $obj_type, !(int) $_POST["obj_enbl_creation"][$obj_type]);
426 }
427
428 foreach ($type_pos_map as $grp_id => $obj_types) {
429 $grp_pos = str_pad($grp_pos_map[$grp_id], 4, "0", STR_PAD_LEFT);
430
431 asort($obj_types);
432 $pos = 0;
433 foreach (array_keys($obj_types) as $obj_type) {
434 $pos += 10;
435 $type_pos = $grp_pos . str_pad($pos, 4, "0", STR_PAD_LEFT);
436 $ilSetting->set("obj_add_new_pos_" . $obj_type, $type_pos);
437 $ilSetting->set("obj_add_new_pos_grp_" . $obj_type, $grp_id);
438 }
439 }
440
441 /*
442 if (count($double) == 0)
443 {
444 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
445 }
446 else
447 {
448 ilUtil::sendInfo($lng->txt("cmps_duplicate_positions")." ".implode($double, ", "), true);
449 }
450 */
451
452 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
453 $ilCtrl->redirect($this, "listModules");
454 }
global $ilCtrl
Definition: ilias.php:18

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

+ Here is the call graph for this function:

◆ saveNewItemGroup()

ilObjRepositorySettingsGUI::saveNewItemGroup ( )
protected

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

544 {
545 $form = $this->initNewItemGroupForm();
546 if ($form->checkInput()) {
547 $titles = array();
548 foreach ($this->lng->getInstalledLanguages() as $lang_id) {
549 $titles[$lang_id] = $form->getInput("title_" . $lang_id);
550 }
551
552 include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
554 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
555 $this->ctrl->redirect($this, "listNewItemGroups");
556 }
557 }
558
559 $form->setValuesByPost();
560 $this->addNewItemGroup($form);
561 }
addNewItemGroup(ilPropertyFormGUI $a_form=null)
static addNewItemGroup(array $a_titles)

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

+ Here is the call graph for this function:

◆ saveNewItemGroupOrder()

ilObjRepositorySettingsGUI::saveNewItemGroupOrder ( )
protected

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

615 {
617
618 if (is_array($_POST["grp_order"])) {
619 include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
621
622 $grp_pos_map = array();
623 include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
624 foreach (ilObjRepositorySettings::getNewItemGroups() as $item) {
625 $grp_pos_map[$item["id"]] = str_pad($item["pos"], 4, "0", STR_PAD_LEFT);
626 }
627
628 // update order of assigned objects
629 foreach (ilObjRepositorySettings::getNewItemGroupSubItems() as $grp_id => $subitems) {
630 // unassigned objects will always be last
631 if ($grp_id) {
632 foreach ($subitems as $obj_type) {
633 $old_pos = $ilSetting->get("obj_add_new_pos_" . $obj_type);
634 if (strlen($old_pos) == 8) {
635 $new_pos = $grp_pos_map[$grp_id] . substr($old_pos, 4);
636 $ilSetting->set("obj_add_new_pos_" . $obj_type, $new_pos);
637 }
638 }
639 }
640 }
641
642 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
643 }
644 $this->ctrl->redirect($this, "listNewItemGroups");
645 }
static updateNewItemGroupOrder(array $a_order)

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

+ Here is the call graph for this function:

◆ saveSettings()

ilObjRepositorySettingsGUI::saveSettings ( )

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

264 {
266 $ilAccess = $this->access;
267
268 if (!$ilAccess->checkAccess('write', '', $this->object->getRefId())) {
269 $this->ctrl->redirect($this, "view");
270 }
271
272 $form = $this->initSettingsForm();
273 if ($form->checkInput()) {
274 $ilSetting->set("default_repository_view", $_POST["default_rep_view"]);
275
276 $ilSetting->set("repository_tree_pres", $_POST["tree_pres"]);
277 if ($_POST["tree_pres"] == "") {
278 $_POST["rep_tree_limit_grp_crs"] = "";
279 }
280 if ($_POST["rep_tree_limit_grp_crs"] && !$ilSetting->get("rep_tree_limit_grp_crs")) {
281 $_POST["rep_tree_synchronize"] = true;
282 } elseif (!$_POST["rep_tree_synchronize"] && $ilSetting->get("rep_tree_synchronize")) {
283 $_POST["rep_tree_limit_grp_crs"] = false;
284 }
285 $ilSetting->set("rep_tree_limit_grp_crs", $_POST["rep_tree_limit_grp_crs"]);
286
287 // $ilSetting->set('rep_cache',(int) $_POST['rep_cache']);
288 // $ilSetting->set("rep_tree_synchronize", $_POST["rep_tree_synchronize"]);
289
290 $ilSetting->set("enable_trash", $_POST["enable_trash"]);
291
292 $ilSetting->set("rep_shorten_description", $form->getInput('rep_shorten_description'));
293 $ilSetting->set("rep_shorten_description_length", (int) $form->getInput('rep_shorten_description_length'));
294 $ilSetting->set('item_cmd_asynch', (int) $_POST['item_cmd_asynch']);
295 $ilSetting->set('comments_tagging_in_lists', (int) $_POST['comments_tagging_in_lists']);
296 $ilSetting->set('comments_tagging_in_lists_tags', (int) $_POST['comments_tagging_in_lists_tags']);
297
298 require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
299 if ($form->getInput('change_event_tracking')) {
301 } else {
303 }
304
305 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
306 $this->ctrl->redirect($this, "view");
307 }
308
309 $form->setValuesByPost();
310 $this->view($form);
311 }
static _activate()
Activates change event tracking.
static _deactivate()
Deactivates change event tracking.
view(ilPropertyFormGUI $a_form=null)

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

368 {
369 $this->tabs_gui->activateTab('modules');
370
371 $this->tabs_gui->addSubTab(
372 "list_mods",
373 $this->lng->txt("rep_new_item_menu"),
374 $this->ctrl->getLinkTarget($this, "listModules")
375 );
376
377 $this->tabs_gui->addSubTab(
378 "new_item_groups",
379 $this->lng->txt("rep_new_item_groups"),
380 $this->ctrl->getLinkTarget($this, "listNewItemGroups")
381 );
382
383 $this->tabs_gui->activateSubTab($a_active);
384 }

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

+ Here is the caller graph for this function:

◆ updateNewItemGroup()

ilObjRepositorySettingsGUI::updateNewItemGroup ( )
protected

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

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

References $_GET, $form, 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 105 of file class.ilObjRepositorySettingsGUI.php.

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

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

Referenced by executeCommand().

◆ $rbacsystem

ilObjRepositorySettingsGUI::$rbacsystem
protected

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

Referenced by getAdminTabs().


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