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

Protected Member Functions

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

Additional Inherited Members

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

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

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

18  {
19  parent::ilObjectGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
20 
21  $this->type = 'reps';
22  $this->lng->loadLanguageModule('rep');
23  $this->lng->loadLanguageModule('cmps');
24  }

Member Function Documentation

◆ addNewItemGroup()

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

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

References initNewItemGroupForm().

Referenced by saveNewItemGroup(), and updateNewItemGroup().

538  {
539  if(!$a_form)
540  {
541  $a_form = $this->initNewItemGroupForm();
542  }
543 
544  $this->tpl->setContent($a_form->getHTML());
545  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addNewItemGroupSeparator()

ilObjRepositorySettingsGUI::addNewItemGroupSeparator ( )
protected

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

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

619  {
620  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
622  {
623  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
624  }
625  $this->ctrl->redirect($this, "listNewItemGroups");
626  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
+ Here is the call graph for this function:

◆ addToExternalSettingsForm()

ilObjRepositorySettingsGUI::addToExternalSettingsForm (   $a_form_id)

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

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

714  {
715  switch($a_form_id)
716  {
718 
719  require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
720  $fields = array('trac_repository_changes' => array(ilChangeEvent::_isActive(), ilAdministrationSettingsFormHandler::VALUE_BOOL));
721 
722  return array(array("view", $fields));
723  }
724  }
static _isActive()
Returns true, if change event tracking is active.
+ Here is the call graph for this function:

◆ confirmDeleteNewItemGroup()

ilObjRepositorySettingsGUI::confirmDeleteNewItemGroup ( )
protected

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

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

668  {
669  if(!is_array($_POST["grp_id"]))
670  {
671  ilUtil::sendFailure($this->lng->txt("select_one"));
672  return $this->listNewItemGroups();
673  }
674 
675  $this->setModuleSubTabs("new_item_groups");
676 
677  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
678  $cgui = new ilConfirmationGUI();
679  $cgui->setHeaderText($this->lng->txt("rep_new_item_group_delete_sure"));
680 
681  $cgui->setFormAction($this->ctrl->getFormAction($this));
682  $cgui->setCancel($this->lng->txt("cancel"), "listNewItemGroups");
683  $cgui->setConfirm($this->lng->txt("confirm"), "deleteNewItemGroup");
684 
685  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
687 
688  foreach ($_POST["grp_id"] as $grp_id)
689  {
690  $cgui->addItem("grp_id[]", $grp_id, $groups[$grp_id]["title"]);
691  }
692 
693  $this->tpl->setContent($cgui->getHTML());
694  }
$_POST['username']
Definition: cron.php:12
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Confirmation screen class.
+ Here is the call graph for this function:

◆ customIcons()

ilObjRepositorySettingsGUI::customIcons ( ilPropertyFormGUI  $a_form = null)

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

References initCustomIconsForm().

Referenced by saveCustomIcons().

282  {
283  $this->tabs_gui->activateTab("icons");
284 
285  if(!$a_form)
286  {
287  $a_form = $this->initCustomIconsForm();
288  }
289 
290  $this->tpl->setContent($a_form->getHTML());
291  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deleteNewItemGroup()

ilObjRepositorySettingsGUI::deleteNewItemGroup ( )
protected

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

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

697  {
698  if(!is_array($_POST["grp_id"]))
699  {
700  return $this->listNewItemGroups();
701  }
702 
703  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
704  foreach($_POST["grp_id"] as $grp_id)
705  {
707  }
708 
709  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
710  $this->ctrl->redirect($this, "listNewItemGroups");
711  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
+ Here is the call graph for this function:

◆ editNewItemGroup()

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

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

References $_GET, and initNewItemGroupForm().

571  {
572  $grp_id = (int)$_GET["grp_id"];
573  if(!$grp_id)
574  {
575  $this->ctrl->redirect($this, "listNewItemGroups");
576  }
577 
578  if(!$a_form)
579  {
580  $this->ctrl->setParameter($this, "grp_id", $grp_id);
581  $a_form = $this->initNewItemGroupForm($grp_id);
582  }
583 
584  $this->tpl->setContent($a_form->getHTML());
585  }
$_GET["client_id"]
+ Here is the call graph for this function:

◆ executeCommand()

ilObjRepositorySettingsGUI::executeCommand ( )

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

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

27  {
28  global $ilErr, $ilAccess;
29 
30  $next_class = $this->ctrl->getNextClass($this);
31  $cmd = $this->ctrl->getCmd();
32 
33  $this->prepareOutput();
34 
35  if(!$ilAccess->checkAccess('write', '', $this->object->getRefId()))
36  {
37  $ilErr->raiseError($this->lng->txt('no_permission'), $ilErr->WARNING);
38  }
39 
40  switch($next_class)
41  {
42  case 'ilpermissiongui':
43  $this->tabs_gui->setTabActive('perm_settings');
44  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
45  $perm_gui =& new ilPermissionGUI($this);
46  $this->ctrl->forwardCommand($perm_gui);
47  break;
48 
49  default:
50  $this->$cmd();
51  break;
52  }
53  return true;
54  }
$cmd
Definition: sahs_server.php:35
prepareOutput()
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjRepositorySettingsGUI::getAdminTabs ( )

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

57  {
58  global $rbacsystem;
59 
60  $this->tabs_gui->addTab("settings",
61  $this->lng->txt("settings"),
62  $this->ctrl->getLinkTarget($this, "view"));
63 
64  $this->tabs_gui->addTab("icons",
65  $this->lng->txt("rep_custom_icons"),
66  $this->ctrl->getLinkTarget($this, "customIcons"));
67 
68  $this->tabs_gui->addTab("modules",
69  $this->lng->txt("cmps_repository_object_types"),
70  $this->ctrl->getLinkTarget($this, "listModules"));
71 
72  if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
73  {
74  $this->tabs_gui->addTab("perm_settings",
75  $this->lng->txt("perm_settings"),
76  $this->ctrl->getLinkTargetByClass('ilpermissiongui',"perm"));
77  }
78  }

◆ initCustomIconsForm()

ilObjRepositorySettingsGUI::initCustomIconsForm ( )
protected

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

References $ilSetting, and ilFormPropertyGUI\setInfo().

Referenced by customIcons().

294  {
295  global $ilSetting;
296 
297  include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
298  include_once "Services/Form/classes/class.ilCombinationInputGUI.php";
299  $form = new ilPropertyFormGUI();
300  $form->setTitle($this->lng->txt("rep_custom_icons"));
301  $form->setFormAction($this->ctrl->getFormAction($this, 'saveCustomIcons'));
302 
303  $cb = new ilCheckboxInputGUI($this->lng->txt("enable_custom_icons"), "custom_icons");
304  $cb->setInfo($this->lng->txt("enable_custom_icons_info"));
305  $cb->setChecked($ilSetting->get("custom_icons"));
306  $form->addItem($cb);
307 
308 
309  $size_big = new ilCombinationInputGUI($this->lng->txt("custom_icon_size_big"));
310  $form->addItem($size_big);
311 
312  $width = new ilNumberInputGUI("", "custom_icon_big_width");
313  $width->setSize(3);
314  $width->setValue($ilSetting->get("custom_icon_big_width"));
315  $size_big->addCombinationItem("bgw", $width, $this->lng->txt("width"));
316 
317  $height = new ilNumberInputGUI("", "custom_icon_big_height");
318  $height->setSize(3);
319  $height->setValue($ilSetting->get("custom_icon_big_height"));
320  $size_big->addCombinationItem("bgh", $height, $this->lng->txt("height"));
321 
322 
323  $size_small = new ilCombinationInputGUI($this->lng->txt("custom_icon_size_standard"));
324  $form->addItem($size_small);
325 
326  $width = new ilNumberInputGUI("", "custom_icon_small_width");
327  $width->setSize(3);
328  $width->setValue($ilSetting->get("custom_icon_small_width"));
329  $size_small->addCombinationItem("smw", $width, $this->lng->txt("width"));
330 
331  $height = new ilNumberInputGUI("", "custom_icon_small_height");
332  $height->setSize(3);
333  $height->setValue($ilSetting->get("custom_icon_small_height"));
334  $size_small->addCombinationItem("smh", $height, $this->lng->txt("height"));
335 
336 
337  $size_tiny = new ilCombinationInputGUI($this->lng->txt("custom_icon_size_tiny"));
338  $form->addItem($size_tiny);
339 
340  $width = new ilNumberInputGUI("", "custom_icon_tiny_width");
341  $width->setSize(3);
342  $width->setValue($ilSetting->get("custom_icon_tiny_width"));
343  $size_tiny->addCombinationItem("tnw", $width, $this->lng->txt("width"));
344 
345  $height = new ilNumberInputGUI("", "custom_icon_tiny_height");
346  $height->setSize(3);
347  $height->setValue($ilSetting->get("custom_icon_tiny_height"));
348  $size_tiny->addCombinationItem("tnh", $height, $this->lng->txt("height"));
349 
350 
351  $form->addCommandButton('saveCustomIcons', $this->lng->txt('save'));
352 
353  return $form;
354  }
This class represents a property form user interface.
This class represents a checkbox property in a property form.
setInfo($a_info)
Set Information Text.
This class represents a number property in a property form.
This class represents a number property in a property form.
global $ilSetting
Definition: privfeed.php:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initNewItemGroupForm()

ilObjRepositorySettingsGUI::initNewItemGroupForm (   $a_grp_id = false)
protected

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

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

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

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

◆ initSettingsForm()

ilObjRepositorySettingsGUI::initSettingsForm ( )
protected

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

References $ilSetting, $options, $si, ilChangeEvent\_isActive(), ilAdministrationSettingsFormHandler\addFieldsToForm(), ilAdministrationSettingsFormHandler\FORM_REPOSITORY, ilCheckboxInputGUI\setChecked(), ilRadioOption\setInfo(), ilFormPropertyGUI\setInfo(), ilSelectInputGUI\setOptions(), ilTextInputGUI\setValue(), ilCheckboxInputGUI\setValue(), and ilRadioGroupInputGUI\setValue().

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

93  {
94  global $ilSetting;
95 
96  include_once('Services/Form/classes/class.ilPropertyFormGUI.php');
97  $form = new ilPropertyFormGUI();
98  $form->setTitle($this->lng->txt("settings"));
99  $form->setFormAction($this->ctrl->getFormAction($this, 'saveSettings'));
100 
101  // default repository view
102  $options = array(
103  "flat" => $this->lng->txt("flatview"),
104  "tree" => $this->lng->txt("treeview")
105  );
106  $si = new ilSelectInputGUI($this->lng->txt("def_repository_view"), "default_rep_view");
107  $si->setOptions($options);
108  $si->setInfo($this->lng->txt(""));
109  if ($ilSetting->get("default_repository_view") == "tree")
110  {
111  $si->setValue("tree");
112  }
113  else
114  {
115  $si->setValue("flat");
116  }
117  $form->addItem($si);
118 
119  //
120  $options = array(
121  "" => $this->lng->txt("adm_rep_tree_only_container"),
122  "tree" => $this->lng->txt("adm_all_resource_types")
123  );
124 
125  // repository tree
126  $radg = new ilRadioGroupInputGUI($this->lng->txt("adm_rep_tree_presentation"), "tree_pres");
127  $radg->setValue($ilSetting->get("repository_tree_pres"));
128  $op1 = new ilRadioOption($this->lng->txt("adm_rep_tree_only_cntr"), "",
129  $this->lng->txt("adm_rep_tree_only_cntr_info"));
130  $radg->addOption($op1);
131 
132  $op2 = new ilRadioOption($this->lng->txt("adm_rep_tree_all_types"), "all_types",
133  $this->lng->txt("adm_rep_tree_all_types_info"));
134 
135  // limit tree in courses and groups
136  $cb = new ilCheckboxInputGUI($this->lng->txt("adm_rep_tree_limit_grp_crs"), "rep_tree_limit_grp_crs");
137  $cb->setChecked($ilSetting->get("rep_tree_limit_grp_crs"));
138  $cb->setInfo($this->lng->txt("adm_rep_tree_limit_grp_crs_info"));
139  $op2->addSubItem($cb);
140 
141  $radg->addOption($op2);
142 
143  $form->addItem($radg);
144 
145  /* OBSOLETE
146  // synchronize repository tree with main view
147  $cb = new ilCheckboxInputGUI($this->lng->txt("adm_synchronize_rep_tree"), "rep_tree_synchronize");
148  $cb->setInfo($this->lng->txt("adm_synchronize_rep_tree_info"));
149  $cb->setChecked($ilSetting->get("rep_tree_synchronize"));
150  $form->addItem($cb);
151  */
152 
153  /* DISABLED
154  // repository access check
155  $options = array(
156  0 => "0",
157  10 => "10",
158  30 => "30",
159  60 => "60",
160  120 => "120"
161  );
162  $si = new ilSelectInputGUI($this->lng->txt("adm_repository_cache_time"), "rep_cache");
163  $si->setOptions($options);
164  $si->setValue($ilSetting->get("rep_cache"));
165  $si->setInfo($this->lng->txt("adm_repository_cache_time_info")." ".
166  $this->lng->txt("adm_repository_cache_time_info2"));
167  $form->addItem($si);
168  */
169 
170  // trash
171  $cb = new ilCheckboxInputGUI($this->lng->txt("enable_trash"), "enable_trash");
172  $cb->setInfo($this->lng->txt("enable_trash_info"));
173  if ($ilSetting->get("enable_trash"))
174  {
175  $cb->setChecked(true);
176  }
177  $form->addItem($cb);
178 
179  // change event
180  require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
181  $this->lng->loadLanguageModule("trac");
182  $event = new ilCheckboxInputGUI($this->lng->txt('trac_repository_changes'), 'change_event_tracking');
184  $form->addItem($event);
185 
186 
187  include_once "Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php";
190  $form,
191  $this
192  );
193 
194 
195  // object lists
196 
197  $lists = new ilFormSectionHeaderGUI();
198  $lists->setTitle($this->lng->txt("rep_object_lists"));
199  $form->addItem($lists);
200 
201  $sdesc = new ilCheckboxInputGUI($this->lng->txt("adm_rep_shorten_description"), "rep_shorten_description");
202  $sdesc->setInfo($this->lng->txt("adm_rep_shorten_description_info"));
203  $sdesc->setChecked($ilSetting->get("rep_shorten_description"));
204  $form->addItem($sdesc);
205 
206  $sdesclen = new ilTextInputGUI($this->lng->txt("adm_rep_shorten_description_length"), "rep_shorten_description_length");
207  $sdesclen->setValue($ilSetting->get("rep_shorten_description_length"));
208  $sdesclen->setSize(3);
209  $sdesc->addSubItem($sdesclen);
210 
211  // load action commands asynchronously
212  $cb = new ilCheckboxInputGUI($this->lng->txt("adm_item_cmd_asynch"), "item_cmd_asynch");
213  $cb->setInfo($this->lng->txt("adm_item_cmd_asynch_info"));
214  $cb->setChecked($ilSetting->get("item_cmd_asynch"));
215  $form->addItem($cb);
216 
217  // notes/comments/tagging
218  $pl = new ilCheckboxInputGUI($this->lng->txt('adm_show_comments_tagging_in_lists'),'comments_tagging_in_lists');
219  $pl->setValue(1);
220  $pl->setChecked($ilSetting->get('comments_tagging_in_lists'));
221  $form->addItem($pl);
222 
223 
224  $form->addCommandButton('saveSettings', $this->lng->txt('save'));
225 
226  return $form;
227  }
This class represents an option in a radio group.
This class represents a selection list property in a property form.
This class represents a property form user interface.
This class represents a section header in a property form.
This class represents a checkbox property in a property form.
setInfo($a_info)
Set Info.
static addFieldsToForm($a_form_id, ilPropertyFormGUI $a_form, ilObjectGUI $a_parent_gui)
setInfo($a_info)
Set Information Text.
setChecked($a_checked)
Set Checked.
This class represents a property in a property form.
if(!is_array($argv)) $options
setValue($a_value)
Set Value.
This class represents a text property in a property form.
setOptions($a_options)
Set Options.
global $ilSetting
Definition: privfeed.php:40
static _isActive()
Returns true, if change event tracking is active.
setValue($a_value)
Set Value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listModules()

ilObjRepositorySettingsGUI::listModules ( )
protected

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

References setModuleSubTabs().

395  {
396  $this->setModuleSubTabs("list_mods");
397 
398  include_once("./Services/Repository/classes/class.ilModulesTableGUI.php");
399  $comp_table = new ilModulesTableGUI($this, "listModules");
400 
401  $this->tpl->setContent($comp_table->getHTML());
402  }
TableGUI class for module listing.
+ Here is the call graph for this function:

◆ listNewItemGroups()

ilObjRepositorySettingsGUI::listNewItemGroups ( )
protected

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

References setModuleSubTabs().

Referenced by confirmDeleteNewItemGroup(), and deleteNewItemGroup().

462  {
463  global $ilToolbar;
464 
465  $this->setModuleSubTabs("new_item_groups");
466 
467  $ilToolbar->addButton($this->lng->txt("rep_new_item_group_add"),
468  $this->ctrl->getLinkTarget($this, "addNewItemGroup"));
469 
470  $ilToolbar->addButton($this->lng->txt("rep_new_item_group_add_separator"),
471  $this->ctrl->getLinkTarget($this, "addNewItemGroupSeparator"));
472 
473  include_once("./Services/Repository/classes/class.ilNewItemGroupTableGUI.php");
474  $grp_table = new ilNewItemGroupTableGUI($this, "listNewItemGroups");
475 
476  $this->tpl->setContent($grp_table->getHTML());
477  }
TableGUI class for new item groups.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveCustomIcons()

ilObjRepositorySettingsGUI::saveCustomIcons ( )

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

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

357  {
358  global $ilSetting;
359 
360  $form = $this->initSettingsForm();
361  if ($form->checkInput())
362  {
363  $ilSetting->set("custom_icons", (int)$form->getInput("custom_icons"));
364  $ilSetting->set("custom_icon_big_width", (int)$form->getInput("custom_icon_big_width"));
365  $ilSetting->set("custom_icon_big_height", (int)$form->getInput("custom_icon_big_height"));
366  $ilSetting->set("custom_icon_small_width", (int)$form->getInput("custom_icon_small_width"));
367  $ilSetting->set("custom_icon_small_height", (int)$form->getInput("custom_icon_small_height"));
368  $ilSetting->set("custom_icon_tiny_width", (int)$form->getInput("custom_icon_tiny_width"));
369  $ilSetting->set("custom_icon_tiny_height", (int)$form->getInput("custom_icon_tiny_height"));
370 
371  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
372  $this->ctrl->redirect($this, "customIcons");
373  }
374 
375  $form->setValuesByPost();
376  $this->customIcons($form);
377  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
customIcons(ilPropertyFormGUI $a_form=null)
global $ilSetting
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ saveModules()

ilObjRepositorySettingsGUI::saveModules ( )
protected

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

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

405  {
406  global $ilSetting, $ilCtrl, $lng;
407 
408  if(!is_array($_POST["obj_grp"]) ||
409  !is_array($_POST["obj_pos"]))
410  {
411  $ilCtrl->redirect($this, "listModules");
412  }
413 
414  $grp_pos_map = array(0 => 9999);
415  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
417  {
418  $grp_pos_map[$item["id"]] = $item["pos"];
419  }
420 
421  $type_pos_map = array();
422  foreach($_POST["obj_pos"] as $obj_type => $pos)
423  {
424  $grp_id = (int)$_POST["obj_grp"][$obj_type];
425  $type_pos_map[$grp_id][$obj_type] = $pos;
426 
427  // enable creation?
428  $ilSetting->set("obj_dis_creation_".$obj_type, !(int)$_POST["obj_enbl_creation"][$obj_type]);
429  }
430 
431  foreach($type_pos_map as $grp_id => $obj_types)
432  {
433  $grp_pos = str_pad($grp_pos_map[$grp_id], 4, "0", STR_PAD_LEFT);
434 
435  asort($obj_types);
436  $pos = 0;
437  foreach(array_keys($obj_types) as $obj_type)
438  {
439  $pos += 10;
440  $type_pos = $grp_pos.str_pad($pos, 4, "0", STR_PAD_LEFT);
441  $ilSetting->set("obj_add_new_pos_".$obj_type, $type_pos);
442  $ilSetting->set("obj_add_new_pos_grp_".$obj_type, $grp_id);
443  }
444  }
445 
446  /*
447  if (count($double) == 0)
448  {
449  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
450  }
451  else
452  {
453  ilUtil::sendInfo($lng->txt("cmps_duplicate_positions")." ".implode($double, ", "), true);
454  }
455  */
456 
457  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
458  $ilCtrl->redirect($this, "listModules");
459  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
global $ilSetting
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ saveNewItemGroup()

ilObjRepositorySettingsGUI::saveNewItemGroup ( )
protected

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

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

548  {
549  $form = $this->initNewItemGroupForm();
550  if($form->checkInput())
551  {
552  $titles = array();
553  foreach($this->lng->getInstalledLanguages() as $lang_id)
554  {
555  $titles[$lang_id] = $form->getInput("title_".$lang_id);
556  }
557 
558  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
560  {
561  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
562  $this->ctrl->redirect($this, "listNewItemGroups");
563  }
564  }
565 
566  $form->setValuesByPost();
567  $this->addNewItemGroup($form);
568  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static addNewItemGroup(array $a_titles)
addNewItemGroup(ilPropertyFormGUI $a_form=null)
+ Here is the call graph for this function:

◆ saveNewItemGroupOrder()

ilObjRepositorySettingsGUI::saveNewItemGroupOrder ( )
protected

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

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

629  {
630  global $ilSetting;
631 
632  if(is_array($_POST["grp_order"]))
633  {
634  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
636 
637  $grp_pos_map = array();
638  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
640  {
641  $grp_pos_map[$item["id"]] = str_pad($item["pos"], 4, "0", STR_PAD_LEFT);
642  }
643 
644  // update order of assigned objects
645  foreach(ilObjRepositorySettings::getNewItemGroupSubItems() as $grp_id => $subitems)
646  {
647  // unassigned objects will always be last
648  if($grp_id)
649  {
650  foreach($subitems as $obj_type)
651  {
652  $old_pos = $ilSetting->get("obj_add_new_pos_".$obj_type);
653  if(strlen($old_pos) == 8)
654  {
655  $new_pos = $grp_pos_map[$grp_id].substr($old_pos, 4);
656  $ilSetting->set("obj_add_new_pos_".$obj_type, $new_pos);
657  }
658  }
659  }
660  }
661 
662  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
663  }
664  $this->ctrl->redirect($this, "listNewItemGroups");
665  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
static updateNewItemGroupOrder(array $a_order)
global $ilSetting
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ saveSettings()

ilObjRepositorySettingsGUI::saveSettings ( )

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

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

230  {
231  global $ilSetting;
232 
233  $form = $this->initSettingsForm();
234  if ($form->checkInput())
235  {
236  $ilSetting->set("default_repository_view", $_POST["default_rep_view"]);
237 
238  $ilSetting->set("repository_tree_pres", $_POST["tree_pres"]);
239  if ($_POST["tree_pres"] == "")
240  {
241  $_POST["rep_tree_limit_grp_crs"] = "";
242  }
243  if ($_POST["rep_tree_limit_grp_crs"] && !$ilSetting->get("rep_tree_limit_grp_crs"))
244  {
245  $_POST["rep_tree_synchronize"] = true;
246  }
247  else if (!$_POST["rep_tree_synchronize"] && $ilSetting->get("rep_tree_synchronize"))
248  {
249  $_POST["rep_tree_limit_grp_crs"] = false;
250  }
251  $ilSetting->set("rep_tree_limit_grp_crs", $_POST["rep_tree_limit_grp_crs"]);
252 
253  // $ilSetting->set('rep_cache',(int) $_POST['rep_cache']);
254  // $ilSetting->set("rep_tree_synchronize", $_POST["rep_tree_synchronize"]);
255 
256  $ilSetting->set("enable_trash", $_POST["enable_trash"]);
257 
258  $ilSetting->set("rep_shorten_description", $form->getInput('rep_shorten_description'));
259  $ilSetting->set("rep_shorten_description_length", (int)$form->getInput('rep_shorten_description_length'));
260  $ilSetting->set('item_cmd_asynch',(int) $_POST['item_cmd_asynch']);
261  $ilSetting->set('comments_tagging_in_lists',(int) $_POST['comments_tagging_in_lists']);
262 
263  require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
264  if ($form->getInput('change_event_tracking'))
265  {
267  }
268  else
269  {
271  }
272 
273  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
274  $this->ctrl->redirect($this, "view");
275  }
276 
277  $form->setValuesByPost();
278  $this->view($form);
279  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
view(ilPropertyFormGUI $a_form=null)
static _activate()
Activates change event tracking.
$_POST['username']
Definition: cron.php:12
global $ilSetting
Definition: privfeed.php:40
static _deactivate()
Deactivates change event tracking.
+ Here is the call graph for this function:

◆ setModuleSubTabs()

ilObjRepositorySettingsGUI::setModuleSubTabs (   $a_active)
protected

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

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

380  {
381  $this->tabs_gui->activateTab('modules');
382 
383  $this->tabs_gui->addSubTab("list_mods",
384  $this->lng->txt("rep_new_item_menu"),
385  $this->ctrl->getLinkTarget($this, "listModules"));
386 
387  $this->tabs_gui->addSubTab("new_item_groups",
388  $this->lng->txt("rep_new_item_groups"),
389  $this->ctrl->getLinkTarget($this, "listNewItemGroups"));
390 
391  $this->tabs_gui->activateSubTab($a_active);
392  }
+ Here is the caller graph for this function:

◆ updateNewItemGroup()

ilObjRepositorySettingsGUI::updateNewItemGroup ( )
protected

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

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

588  {
589  $grp_id = (int)$_GET["grp_id"];
590  if(!$grp_id)
591  {
592  $this->ctrl->redirect($this, "listNewItemGroups");
593  }
594 
595  $this->ctrl->setParameter($this, "grp_id", $grp_id);
596 
597  $form = $this->initNewItemGroupForm($grp_id);
598  if($form->checkInput())
599  {
600  $titles = array();
601  foreach($this->lng->getInstalledLanguages() as $lang_id)
602  {
603  $titles[$lang_id] = $form->getInput("title_".$lang_id);
604  }
605 
606  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
607  if(ilObjRepositorySettings::updateNewItemGroup($grp_id, $titles))
608  {
609  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
610  $this->ctrl->redirect($this, "listNewItemGroups");
611  }
612  }
613 
614  $form->setValuesByPost();
615  $this->addNewItemGroup($form);
616  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_GET["client_id"]
static updateNewItemGroup($a_id, array $a_titles)
addNewItemGroup(ilPropertyFormGUI $a_form=null)
+ Here is the call graph for this function:

◆ view()

ilObjRepositorySettingsGUI::view ( ilPropertyFormGUI  $a_form = null)

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

References initSettingsForm().

Referenced by saveSettings().

81  {
82  $this->tabs_gui->activateTab("settings");
83 
84  if(!$a_form)
85  {
86  $a_form = $this->initSettingsForm();
87  }
88 
89  $this->tpl->setContent($a_form->getHTML());
90  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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