ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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
 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 public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 

Protected Member Functions

 initSettingsForm ()
 
 initCustomIconsForm ()
 
 setModuleSubTabs ($a_active)
 
 listModules ()
 
 saveModules ()
 
 listNewItemGroups ()
 
 initNewItemGroupForm ($a_grp_id=false)
 
 addNewItemGroup (ilPropertyFormGUI $a_form=null)
 
 saveNewItemGroup ()
 
 editNewItemGroup (ilPropertyFormGUI $a_form=null)
 
 updateNewItemGroup ()
 
 addNewItemGroupSeparator ()
 
 saveNewItemGroupOrder ()
 
 confirmDeleteNewItemGroup ()
 
 deleteNewItemGroup ()
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 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...
 
 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...
 

Additional Inherited Members

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

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$

ilObjRepositorySettingsGUI: ilPermissionGUI

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

Constructor & Destructor Documentation

◆ __construct()

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

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

18  {
19  parent::__construct($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 519 of file class.ilObjRepositorySettingsGUI.php.

References initNewItemGroupForm().

Referenced by saveNewItemGroup(), and updateNewItemGroup().

520  {
521  if(!$a_form)
522  {
523  $a_form = $this->initNewItemGroupForm();
524  }
525 
526  $this->tpl->setContent($a_form->getHTML());
527  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addNewItemGroupSeparator()

ilObjRepositorySettingsGUI::addNewItemGroupSeparator ( )
protected

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

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

601  {
602  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
604  {
605  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
606  }
607  $this->ctrl->redirect($this, "listNewItemGroups");
608  }
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 695 of file class.ilObjRepositorySettingsGUI.php.

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

696  {
697  global $ilSetting;
698 
699  switch($a_form_id)
700  {
702 
703  require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
704  $fields = array('trac_show_repository_views' => array(ilChangeEvent::_isActive(), ilAdministrationSettingsFormHandler::VALUE_BOOL));
705 
706  return array(array("view", $fields));
707 
708 
710 
711  $fields = array(
712  'adm_show_comments_tagging_in_lists' => array($ilSetting->get('comments_tagging_in_lists'), ilAdministrationSettingsFormHandler::VALUE_BOOL,
713  array('adm_show_comments_tagging_in_lists_tags' => array($ilSetting->get('comments_tagging_in_lists_tags'), ilAdministrationSettingsFormHandler::VALUE_BOOL))
714  ));
715 
716  return array(array("view", $fields));
717  }
718  }
Create styles array
The data for the language used.
global $ilSetting
Definition: privfeed.php:17
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 649 of file class.ilObjRepositorySettingsGUI.php.

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

650  {
651  if(!is_array($_POST["grp_id"]))
652  {
653  ilUtil::sendFailure($this->lng->txt("select_one"));
654  return $this->listNewItemGroups();
655  }
656 
657  $this->setModuleSubTabs("new_item_groups");
658 
659  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
660  $cgui = new ilConfirmationGUI();
661  $cgui->setHeaderText($this->lng->txt("rep_new_item_group_delete_sure"));
662 
663  $cgui->setFormAction($this->ctrl->getFormAction($this));
664  $cgui->setCancel($this->lng->txt("cancel"), "listNewItemGroups");
665  $cgui->setConfirm($this->lng->txt("confirm"), "deleteNewItemGroup");
666 
667  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
669 
670  foreach ($_POST["grp_id"] as $grp_id)
671  {
672  $cgui->addItem("grp_id[]", $grp_id, $groups[$grp_id]["title"]);
673  }
674 
675  $this->tpl->setContent($cgui->getHTML());
676  }
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$_POST["username"]
Confirmation screen class.
+ Here is the call graph for this function:

◆ customIcons()

ilObjRepositorySettingsGUI::customIcons ( ilPropertyFormGUI  $a_form = null)

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

References initCustomIconsForm().

Referenced by saveCustomIcons().

296  {
297  $this->tabs_gui->activateTab("icons");
298 
299  if(!$a_form)
300  {
301  $a_form = $this->initCustomIconsForm();
302  }
303 
304  $this->tpl->setContent($a_form->getHTML());
305  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deleteNewItemGroup()

ilObjRepositorySettingsGUI::deleteNewItemGroup ( )
protected

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

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

679  {
680  if(!is_array($_POST["grp_id"]))
681  {
682  return $this->listNewItemGroups();
683  }
684 
685  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
686  foreach($_POST["grp_id"] as $grp_id)
687  {
689  }
690 
691  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
692  $this->ctrl->redirect($this, "listNewItemGroups");
693  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST["username"]
+ Here is the call graph for this function:

◆ editNewItemGroup()

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

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

References $_GET, and initNewItemGroupForm().

553  {
554  $grp_id = (int)$_GET["grp_id"];
555  if(!$grp_id)
556  {
557  $this->ctrl->redirect($this, "listNewItemGroups");
558  }
559 
560  if(!$a_form)
561  {
562  $this->ctrl->setParameter($this, "grp_id", $grp_id);
563  $a_form = $this->initNewItemGroupForm($grp_id);
564  }
565 
566  $this->tpl->setContent($a_form->getHTML());
567  }
$_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('read', '', $this->object->getRefId()))
36  {
37  $ilErr->raiseError($this->lng->txt('no_permission'), $ilErr->WARNING);
38  }
39 
40  switch($next_class)
41  {
42  case 'ilpermissiongui':
43  $this->tabs_gui->setTabActive('perm_settings');
44  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
45  $perm_gui = new ilPermissionGUI($this);
46  $this->ctrl->forwardCommand($perm_gui);
47  break;
48 
49  default:
50  $this->$cmd();
51  break;
52  }
53  return true;
54  }
global $ilErr
Definition: raiseError.php:16
$cmd
Definition: sahs_server.php:35
prepareOutput($a_show_subobjects=true)
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 307 of file class.ilObjRepositorySettingsGUI.php.

References $ilSetting, and ilFormPropertyGUI\setInfo().

Referenced by customIcons(), and saveCustomIcons().

308  {
309  global $ilSetting, $ilAccess;
310 
311  include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
312  include_once "Services/Form/classes/class.ilCombinationInputGUI.php";
313  $form = new ilPropertyFormGUI();
314  $form->setTitle($this->lng->txt("rep_custom_icons"));
315  $form->setFormAction($this->ctrl->getFormAction($this, 'saveCustomIcons'));
316 
317  $cb = new ilCheckboxInputGUI($this->lng->txt("enable_custom_icons"), "custom_icons");
318  $cb->setInfo($this->lng->txt("enable_custom_icons_info"));
319  $cb->setChecked($ilSetting->get("custom_icons"));
320  $form->addItem($cb);
321 
322  if($ilAccess->checkAccess('write','',$this->object->getRefId()))
323  {
324  $form->addCommandButton('saveCustomIcons', $this->lng->txt('save'));
325  }
326 
327  return $form;
328  }
This class represents a property form user interface.
This class represents a checkbox property in a property form.
setInfo($a_info)
Set Information Text.
global $ilSetting
Definition: privfeed.php:17
+ 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 461 of file class.ilObjRepositorySettingsGUI.php.

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

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

462  {
463  $this->setModuleSubTabs("new_item_groups");
464 
465  include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
466  $form = new ilPropertyFormGUI();
467 
468  $this->lng->loadLanguageModule("meta");
469  $def_lng = $this->lng->getDefaultLanguage();
470 
471  $title = new ilTextInputGUI($this->lng->txt("title"), "title_".$def_lng);
472  $title->setInfo($this->lng->txt("meta_l_".$def_lng).
473  " (".$this->lng->txt("default_language").")");
474  $title->setRequired(true);
475  $form->addItem($title);
476 
477  foreach($this->lng->getInstalledLanguages() as $lang_id)
478  {
479  if($lang_id != $def_lng)
480  {
481  $title = new ilTextInputGUI($this->lng->txt("translation"), "title_".$lang_id);
482  $title->setInfo($this->lng->txt("meta_l_".$lang_id));
483  $form->addItem($title);
484  }
485  }
486 
487  if(!$a_grp_id)
488  {
489  $form->setTitle($this->lng->txt("rep_new_item_group_add"));
490  $form->setFormAction($this->ctrl->getFormAction($this, "saveNewItemGroup"));
491 
492  $form->addCommandButton("saveNewItemGroup", $this->lng->txt("save"));
493  }
494  else
495  {
496  $form->setTitle($this->lng->txt("rep_new_item_group_edit"));
497  $form->setFormAction($this->ctrl->getFormAction($this, "updateNewItemGroup"));
498 
499  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
501  $grp = $grp[$a_grp_id];
502 
503  foreach($grp["titles"] as $id => $value)
504  {
505  $field = $form->getItemByPostVar("title_".$id);
506  if($field)
507  {
508  $field->setValue($value);
509  }
510  }
511 
512  $form->addCommandButton("updateNewItemGroup", $this->lng->txt("save"));
513  }
514  $form->addCommandButton("listNewItemGroups", $this->lng->txt("cancel"));
515 
516  return $form;
517  }
This class represents a property form user interface.
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(), array, ilAdministrationSettingsFormHandler\FORM_REPOSITORY, ilRadioOption\setInfo(), ilFormPropertyGUI\setInfo(), ilSelectInputGUI\setOptions(), ilCheckboxInputGUI\setValue(), ilNumberInputGUI\setValue(), and ilRadioGroupInputGUI\setValue().

Referenced by saveSettings(), and view().

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

◆ listModules()

ilObjRepositorySettingsGUI::listModules ( )
protected

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

References object, and setModuleSubTabs().

367  {
368  global $ilAccess;
369 
370  $this->setModuleSubTabs("list_mods");
371 
372  $has_write = $ilAccess->checkAccess('write','',$this->object->getRefId());
373 
374  include_once("./Services/Repository/classes/class.ilModulesTableGUI.php");
375  $comp_table = new ilModulesTableGUI($this, "listModules", $has_write);
376 
377  $this->tpl->setContent($comp_table->getHTML());
378  }
Create new PHPExcel object
obj_idprivate
TableGUI class for module listing.
+ Here is the call graph for this function:

◆ listNewItemGroups()

ilObjRepositorySettingsGUI::listNewItemGroups ( )
protected

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

References object, and setModuleSubTabs().

Referenced by confirmDeleteNewItemGroup(), and deleteNewItemGroup().

439  {
440  global $ilToolbar, $ilAccess;
441 
442  $this->setModuleSubTabs("new_item_groups");
443 
444  $has_write = $ilAccess->checkAccess('write','',$this->object->getRefId());
445 
446  if($has_write)
447  {
448  $ilToolbar->addButton($this->lng->txt("rep_new_item_group_add"),
449  $this->ctrl->getLinkTarget($this, "addNewItemGroup"));
450 
451  $ilToolbar->addButton($this->lng->txt("rep_new_item_group_add_separator"),
452  $this->ctrl->getLinkTarget($this, "addNewItemGroupSeparator"));
453  }
454 
455  include_once("./Services/Repository/classes/class.ilNewItemGroupTableGUI.php");
456  $grp_table = new ilNewItemGroupTableGUI($this, "listNewItemGroups", $has_write);
457 
458  $this->tpl->setContent($grp_table->getHTML());
459  }
TableGUI class for new item groups.
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveCustomIcons()

ilObjRepositorySettingsGUI::saveCustomIcons ( )

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

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

331  {
332  global $ilSetting, $ilAccess;
333 
334  if(!$ilAccess->checkAccess('write','',$this->object->getRefId()))
335  {
336  $this->ctrl->redirect($this, "customIcons");
337  }
338 
339  $form = $this->initCustomIconsForm();
340  if ($form->checkInput())
341  {
342  $ilSetting->set("custom_icons", (int)$form->getInput("custom_icons"));
343  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
344  $this->ctrl->redirect($this, "customIcons");
345  }
346 
347  $form->setValuesByPost();
348  $this->customIcons($form);
349  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
customIcons(ilPropertyFormGUI $a_form=null)
global $ilSetting
Definition: privfeed.php:17
+ Here is the call graph for this function:

◆ saveModules()

ilObjRepositorySettingsGUI::saveModules ( )
protected

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

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

381  {
382  global $ilSetting, $ilCtrl, $lng, $ilAccess;
383 
384  if(!is_array($_POST["obj_grp"]) ||
385  !is_array($_POST["obj_pos"]) ||
386  !$ilAccess->checkAccess('write','',$this->object->getRefId()))
387  {
388  $ilCtrl->redirect($this, "listModules");
389  }
390 
391  $grp_pos_map = array(0 => 9999);
392  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
394  {
395  $grp_pos_map[$item["id"]] = $item["pos"];
396  }
397 
398  $type_pos_map = array();
399  foreach($_POST["obj_pos"] as $obj_type => $pos)
400  {
401  $grp_id = (int)$_POST["obj_grp"][$obj_type];
402  $type_pos_map[$grp_id][$obj_type] = $pos;
403 
404  // enable creation?
405  $ilSetting->set("obj_dis_creation_".$obj_type, !(int)$_POST["obj_enbl_creation"][$obj_type]);
406  }
407 
408  foreach($type_pos_map as $grp_id => $obj_types)
409  {
410  $grp_pos = str_pad($grp_pos_map[$grp_id], 4, "0", STR_PAD_LEFT);
411 
412  asort($obj_types);
413  $pos = 0;
414  foreach(array_keys($obj_types) as $obj_type)
415  {
416  $pos += 10;
417  $type_pos = $grp_pos.str_pad($pos, 4, "0", STR_PAD_LEFT);
418  $ilSetting->set("obj_add_new_pos_".$obj_type, $type_pos);
419  $ilSetting->set("obj_add_new_pos_grp_".$obj_type, $grp_id);
420  }
421  }
422 
423  /*
424  if (count($double) == 0)
425  {
426  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
427  }
428  else
429  {
430  ilUtil::sendInfo($lng->txt("cmps_duplicate_positions")." ".implode($double, ", "), true);
431  }
432  */
433 
434  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
435  $ilCtrl->redirect($this, "listModules");
436  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
global $ilCtrl
Definition: ilias.php:18
Create styles array
The data for the language used.
global $ilSetting
Definition: privfeed.php:17
$_POST["username"]
+ Here is the call graph for this function:

◆ saveNewItemGroup()

ilObjRepositorySettingsGUI::saveNewItemGroup ( )
protected

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

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

530  {
531  $form = $this->initNewItemGroupForm();
532  if($form->checkInput())
533  {
534  $titles = array();
535  foreach($this->lng->getInstalledLanguages() as $lang_id)
536  {
537  $titles[$lang_id] = $form->getInput("title_".$lang_id);
538  }
539 
540  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
542  {
543  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
544  $this->ctrl->redirect($this, "listNewItemGroups");
545  }
546  }
547 
548  $form->setValuesByPost();
549  $this->addNewItemGroup($form);
550  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
Create styles array
The data for the language used.
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 610 of file class.ilObjRepositorySettingsGUI.php.

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

611  {
612  global $ilSetting;
613 
614  if(is_array($_POST["grp_order"]))
615  {
616  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
618 
619  $grp_pos_map = array();
620  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
622  {
623  $grp_pos_map[$item["id"]] = str_pad($item["pos"], 4, "0", STR_PAD_LEFT);
624  }
625 
626  // update order of assigned objects
627  foreach(ilObjRepositorySettings::getNewItemGroupSubItems() as $grp_id => $subitems)
628  {
629  // unassigned objects will always be last
630  if($grp_id)
631  {
632  foreach($subitems as $obj_type)
633  {
634  $old_pos = $ilSetting->get("obj_add_new_pos_".$obj_type);
635  if(strlen($old_pos) == 8)
636  {
637  $new_pos = $grp_pos_map[$grp_id].substr($old_pos, 4);
638  $ilSetting->set("obj_add_new_pos_".$obj_type, $new_pos);
639  }
640  }
641  }
642  }
643 
644  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
645  }
646  $this->ctrl->redirect($this, "listNewItemGroups");
647  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
Create styles array
The data for the language used.
static updateNewItemGroupOrder(array $a_order)
global $ilSetting
Definition: privfeed.php:17
$_POST["username"]
+ Here is the call graph for this function:

◆ saveSettings()

ilObjRepositorySettingsGUI::saveSettings ( )

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

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

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

◆ setModuleSubTabs()

ilObjRepositorySettingsGUI::setModuleSubTabs (   $a_active)
protected

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

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

352  {
353  $this->tabs_gui->activateTab('modules');
354 
355  $this->tabs_gui->addSubTab("list_mods",
356  $this->lng->txt("rep_new_item_menu"),
357  $this->ctrl->getLinkTarget($this, "listModules"));
358 
359  $this->tabs_gui->addSubTab("new_item_groups",
360  $this->lng->txt("rep_new_item_groups"),
361  $this->ctrl->getLinkTarget($this, "listNewItemGroups"));
362 
363  $this->tabs_gui->activateSubTab($a_active);
364  }
+ Here is the caller graph for this function:

◆ updateNewItemGroup()

ilObjRepositorySettingsGUI::updateNewItemGroup ( )
protected

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

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

570  {
571  $grp_id = (int)$_GET["grp_id"];
572  if(!$grp_id)
573  {
574  $this->ctrl->redirect($this, "listNewItemGroups");
575  }
576 
577  $this->ctrl->setParameter($this, "grp_id", $grp_id);
578 
579  $form = $this->initNewItemGroupForm($grp_id);
580  if($form->checkInput())
581  {
582  $titles = array();
583  foreach($this->lng->getInstalledLanguages() as $lang_id)
584  {
585  $titles[$lang_id] = $form->getInput("title_".$lang_id);
586  }
587 
588  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
589  if(ilObjRepositorySettings::updateNewItemGroup($grp_id, $titles))
590  {
591  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
592  $this->ctrl->redirect($this, "listNewItemGroups");
593  }
594  }
595 
596  $form->setValuesByPost();
597  $this->addNewItemGroup($form);
598  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_GET["client_id"]
Create styles array
The data for the language used.
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: