ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
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...
 
 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)
 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 544 of file class.ilObjRepositorySettingsGUI.php.

References initNewItemGroupForm().

Referenced by saveNewItemGroup(), and updateNewItemGroup().

545  {
546  if(!$a_form)
547  {
548  $a_form = $this->initNewItemGroupForm();
549  }
550 
551  $this->tpl->setContent($a_form->getHTML());
552  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addNewItemGroupSeparator()

ilObjRepositorySettingsGUI::addNewItemGroupSeparator ( )
protected

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

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

626  {
627  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
629  {
630  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
631  }
632  $this->ctrl->redirect($this, "listNewItemGroups");
633  }
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 720 of file class.ilObjRepositorySettingsGUI.php.

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

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

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

675  {
676  if(!is_array($_POST["grp_id"]))
677  {
678  ilUtil::sendFailure($this->lng->txt("select_one"));
679  return $this->listNewItemGroups();
680  }
681 
682  $this->setModuleSubTabs("new_item_groups");
683 
684  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
685  $cgui = new ilConfirmationGUI();
686  $cgui->setHeaderText($this->lng->txt("rep_new_item_group_delete_sure"));
687 
688  $cgui->setFormAction($this->ctrl->getFormAction($this));
689  $cgui->setCancel($this->lng->txt("cancel"), "listNewItemGroups");
690  $cgui->setConfirm($this->lng->txt("confirm"), "deleteNewItemGroup");
691 
692  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
694 
695  foreach ($_POST["grp_id"] as $grp_id)
696  {
697  $cgui->addItem("grp_id[]", $grp_id, $groups[$grp_id]["title"]);
698  }
699 
700  $this->tpl->setContent($cgui->getHTML());
701  }
$_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 287 of file class.ilObjRepositorySettingsGUI.php.

References initCustomIconsForm().

Referenced by saveCustomIcons().

288  {
289  $this->tabs_gui->activateTab("icons");
290 
291  if(!$a_form)
292  {
293  $a_form = $this->initCustomIconsForm();
294  }
295 
296  $this->tpl->setContent($a_form->getHTML());
297  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deleteNewItemGroup()

ilObjRepositorySettingsGUI::deleteNewItemGroup ( )
protected

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

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

704  {
705  if(!is_array($_POST["grp_id"]))
706  {
707  return $this->listNewItemGroups();
708  }
709 
710  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
711  foreach($_POST["grp_id"] as $grp_id)
712  {
714  }
715 
716  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
717  $this->ctrl->redirect($this, "listNewItemGroups");
718  }
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 577 of file class.ilObjRepositorySettingsGUI.php.

References $_GET, and initNewItemGroupForm().

578  {
579  $grp_id = (int)$_GET["grp_id"];
580  if(!$grp_id)
581  {
582  $this->ctrl->redirect($this, "listNewItemGroups");
583  }
584 
585  if(!$a_form)
586  {
587  $this->ctrl->setParameter($this, "grp_id", $grp_id);
588  $a_form = $this->initNewItemGroupForm($grp_id);
589  }
590 
591  $this->tpl->setContent($a_form->getHTML());
592  }
$_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 299 of file class.ilObjRepositorySettingsGUI.php.

References $ilSetting, and ilFormPropertyGUI\setInfo().

Referenced by customIcons().

300  {
301  global $ilSetting;
302 
303  include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
304  include_once "Services/Form/classes/class.ilCombinationInputGUI.php";
305  $form = new ilPropertyFormGUI();
306  $form->setTitle($this->lng->txt("rep_custom_icons"));
307  $form->setFormAction($this->ctrl->getFormAction($this, 'saveCustomIcons'));
308 
309  $cb = new ilCheckboxInputGUI($this->lng->txt("enable_custom_icons"), "custom_icons");
310  $cb->setInfo($this->lng->txt("enable_custom_icons_info"));
311  $cb->setChecked($ilSetting->get("custom_icons"));
312  $form->addItem($cb);
313 
314  /*
315  $size_big = new ilCombinationInputGUI($this->lng->txt("custom_icon_size_big"));
316  $form->addItem($size_big);
317 
318  $width = new ilNumberInputGUI("", "custom_icon_big_width");
319  $width->setSize(3);
320  $width->setValue($ilSetting->get("custom_icon_big_width"));
321  $size_big->addCombinationItem("bgw", $width, $this->lng->txt("width"));
322 
323  $height = new ilNumberInputGUI("", "custom_icon_big_height");
324  $height->setSize(3);
325  $height->setValue($ilSetting->get("custom_icon_big_height"));
326  $size_big->addCombinationItem("bgh", $height, $this->lng->txt("height"));
327 
328 
329  $size_small = new ilCombinationInputGUI($this->lng->txt("custom_icon_size_standard"));
330  $form->addItem($size_small);
331 
332  $width = new ilNumberInputGUI("", "custom_icon_small_width");
333  $width->setSize(3);
334  $width->setValue($ilSetting->get("custom_icon_small_width"));
335  $size_small->addCombinationItem("smw", $width, $this->lng->txt("width"));
336 
337  $height = new ilNumberInputGUI("", "custom_icon_small_height");
338  $height->setSize(3);
339  $height->setValue($ilSetting->get("custom_icon_small_height"));
340  $size_small->addCombinationItem("smh", $height, $this->lng->txt("height"));
341 
342 
343  $size_tiny = new ilCombinationInputGUI($this->lng->txt("custom_icon_size_tiny"));
344  $form->addItem($size_tiny);
345 
346  $width = new ilNumberInputGUI("", "custom_icon_tiny_width");
347  $width->setSize(3);
348  $width->setValue($ilSetting->get("custom_icon_tiny_width"));
349  $size_tiny->addCombinationItem("tnw", $width, $this->lng->txt("width"));
350 
351  $height = new ilNumberInputGUI("", "custom_icon_tiny_height");
352  $height->setSize(3);
353  $height->setValue($ilSetting->get("custom_icon_tiny_height"));
354  $size_tiny->addCombinationItem("tnh", $height, $this->lng->txt("height"));
355  */
356 
357  $form->addCommandButton('saveCustomIcons', $this->lng->txt('save'));
358 
359  return $form;
360  }
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: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 486 of file class.ilObjRepositorySettingsGUI.php.

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

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

487  {
488  $this->setModuleSubTabs("new_item_groups");
489 
490  include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
491  $form = new ilPropertyFormGUI();
492 
493  $this->lng->loadLanguageModule("meta");
494  $def_lng = $this->lng->getDefaultLanguage();
495 
496  $title = new ilTextInputGUI($this->lng->txt("title"), "title_".$def_lng);
497  $title->setInfo($this->lng->txt("meta_l_".$def_lng).
498  " (".$this->lng->txt("default_language").")");
499  $title->setRequired(true);
500  $form->addItem($title);
501 
502  foreach($this->lng->getInstalledLanguages() as $lang_id)
503  {
504  if($lang_id != $def_lng)
505  {
506  $title = new ilTextInputGUI($this->lng->txt("translation"), "title_".$lang_id);
507  $title->setInfo($this->lng->txt("meta_l_".$lang_id));
508  $form->addItem($title);
509  }
510  }
511 
512  if(!$a_grp_id)
513  {
514  $form->setTitle($this->lng->txt("rep_new_item_group_add"));
515  $form->setFormAction($this->ctrl->getFormAction($this, "saveNewItemGroup"));
516 
517  $form->addCommandButton("saveNewItemGroup", $this->lng->txt("save"));
518  }
519  else
520  {
521  $form->setTitle($this->lng->txt("rep_new_item_group_edit"));
522  $form->setFormAction($this->ctrl->getFormAction($this, "updateNewItemGroup"));
523 
524  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
526  $grp = $grp[$a_grp_id];
527 
528  foreach($grp["titles"] as $id => $value)
529  {
530  $field = $form->getItemByPostVar("title_".$id);
531  if($field)
532  {
533  $field->setValue($value);
534  }
535  }
536 
537  $form->addCommandButton("updateNewItemGroup", $this->lng->txt("save"));
538  }
539  $form->addCommandButton("listNewItemGroups", $this->lng->txt("cancel"));
540 
541  return $form;
542  }
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(), ilCheckboxInputGUI\setValue(), ilNumberInputGUI\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 ilNumberInputGUI($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  $pltags = new ilCheckboxInputGUI($this->lng->txt('adm_show_comments_tagging_in_lists_tags'),'comments_tagging_in_lists_tags');
224  $pltags->setValue(1);
225  $pltags->setChecked($ilSetting->get('comments_tagging_in_lists_tags'));
226  $pl->addSubItem($pltags);
227 
228 
229  $form->addCommandButton('saveSettings', $this->lng->txt('save'));
230 
231  return $form;
232  }
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.
setChecked($a_checked)
Set Checked.
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.
global $ilSetting
Definition: privfeed.php:40
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 401 of file class.ilObjRepositorySettingsGUI.php.

References setModuleSubTabs().

402  {
403  $this->setModuleSubTabs("list_mods");
404 
405  include_once("./Services/Repository/classes/class.ilModulesTableGUI.php");
406  $comp_table = new ilModulesTableGUI($this, "listModules");
407 
408  $this->tpl->setContent($comp_table->getHTML());
409  }
TableGUI class for module listing.
+ Here is the call graph for this function:

◆ listNewItemGroups()

ilObjRepositorySettingsGUI::listNewItemGroups ( )
protected

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

References setModuleSubTabs().

Referenced by confirmDeleteNewItemGroup(), and deleteNewItemGroup().

469  {
470  global $ilToolbar;
471 
472  $this->setModuleSubTabs("new_item_groups");
473 
474  $ilToolbar->addButton($this->lng->txt("rep_new_item_group_add"),
475  $this->ctrl->getLinkTarget($this, "addNewItemGroup"));
476 
477  $ilToolbar->addButton($this->lng->txt("rep_new_item_group_add_separator"),
478  $this->ctrl->getLinkTarget($this, "addNewItemGroupSeparator"));
479 
480  include_once("./Services/Repository/classes/class.ilNewItemGroupTableGUI.php");
481  $grp_table = new ilNewItemGroupTableGUI($this, "listNewItemGroups");
482 
483  $this->tpl->setContent($grp_table->getHTML());
484  }
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 362 of file class.ilObjRepositorySettingsGUI.php.

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

363  {
364  global $ilSetting;
365 
366  $form = $this->initSettingsForm();
367  if ($form->checkInput())
368  {
369  $ilSetting->set("custom_icons", (int)$form->getInput("custom_icons"));
370  /*
371  $ilSetting->set("custom_icon_big_width", (int)$form->getInput("custom_icon_big_width"));
372  $ilSetting->set("custom_icon_big_height", (int)$form->getInput("custom_icon_big_height"));
373  $ilSetting->set("custom_icon_small_width", (int)$form->getInput("custom_icon_small_width"));
374  $ilSetting->set("custom_icon_small_height", (int)$form->getInput("custom_icon_small_height"));
375  $ilSetting->set("custom_icon_tiny_width", (int)$form->getInput("custom_icon_tiny_width"));
376  $ilSetting->set("custom_icon_tiny_height", (int)$form->getInput("custom_icon_tiny_height"));
377  */
378  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
379  $this->ctrl->redirect($this, "customIcons");
380  }
381 
382  $form->setValuesByPost();
383  $this->customIcons($form);
384  }
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 411 of file class.ilObjRepositorySettingsGUI.php.

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

412  {
413  global $ilSetting, $ilCtrl, $lng;
414 
415  if(!is_array($_POST["obj_grp"]) ||
416  !is_array($_POST["obj_pos"]))
417  {
418  $ilCtrl->redirect($this, "listModules");
419  }
420 
421  $grp_pos_map = array(0 => 9999);
422  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
424  {
425  $grp_pos_map[$item["id"]] = $item["pos"];
426  }
427 
428  $type_pos_map = array();
429  foreach($_POST["obj_pos"] as $obj_type => $pos)
430  {
431  $grp_id = (int)$_POST["obj_grp"][$obj_type];
432  $type_pos_map[$grp_id][$obj_type] = $pos;
433 
434  // enable creation?
435  $ilSetting->set("obj_dis_creation_".$obj_type, !(int)$_POST["obj_enbl_creation"][$obj_type]);
436  }
437 
438  foreach($type_pos_map as $grp_id => $obj_types)
439  {
440  $grp_pos = str_pad($grp_pos_map[$grp_id], 4, "0", STR_PAD_LEFT);
441 
442  asort($obj_types);
443  $pos = 0;
444  foreach(array_keys($obj_types) as $obj_type)
445  {
446  $pos += 10;
447  $type_pos = $grp_pos.str_pad($pos, 4, "0", STR_PAD_LEFT);
448  $ilSetting->set("obj_add_new_pos_".$obj_type, $type_pos);
449  $ilSetting->set("obj_add_new_pos_grp_".$obj_type, $grp_id);
450  }
451  }
452 
453  /*
454  if (count($double) == 0)
455  {
456  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
457  }
458  else
459  {
460  ilUtil::sendInfo($lng->txt("cmps_duplicate_positions")." ".implode($double, ", "), true);
461  }
462  */
463 
464  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
465  $ilCtrl->redirect($this, "listModules");
466  }
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 554 of file class.ilObjRepositorySettingsGUI.php.

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

555  {
556  $form = $this->initNewItemGroupForm();
557  if($form->checkInput())
558  {
559  $titles = array();
560  foreach($this->lng->getInstalledLanguages() as $lang_id)
561  {
562  $titles[$lang_id] = $form->getInput("title_".$lang_id);
563  }
564 
565  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
567  {
568  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
569  $this->ctrl->redirect($this, "listNewItemGroups");
570  }
571  }
572 
573  $form->setValuesByPost();
574  $this->addNewItemGroup($form);
575  }
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 635 of file class.ilObjRepositorySettingsGUI.php.

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

636  {
637  global $ilSetting;
638 
639  if(is_array($_POST["grp_order"]))
640  {
641  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
643 
644  $grp_pos_map = array();
645  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
647  {
648  $grp_pos_map[$item["id"]] = str_pad($item["pos"], 4, "0", STR_PAD_LEFT);
649  }
650 
651  // update order of assigned objects
652  foreach(ilObjRepositorySettings::getNewItemGroupSubItems() as $grp_id => $subitems)
653  {
654  // unassigned objects will always be last
655  if($grp_id)
656  {
657  foreach($subitems as $obj_type)
658  {
659  $old_pos = $ilSetting->get("obj_add_new_pos_".$obj_type);
660  if(strlen($old_pos) == 8)
661  {
662  $new_pos = $grp_pos_map[$grp_id].substr($old_pos, 4);
663  $ilSetting->set("obj_add_new_pos_".$obj_type, $new_pos);
664  }
665  }
666  }
667  }
668 
669  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
670  }
671  $this->ctrl->redirect($this, "listNewItemGroups");
672  }
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 234 of file class.ilObjRepositorySettingsGUI.php.

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

235  {
236  global $ilSetting;
237 
238  $form = $this->initSettingsForm();
239  if ($form->checkInput())
240  {
241  $ilSetting->set("default_repository_view", $_POST["default_rep_view"]);
242 
243  $ilSetting->set("repository_tree_pres", $_POST["tree_pres"]);
244  if ($_POST["tree_pres"] == "")
245  {
246  $_POST["rep_tree_limit_grp_crs"] = "";
247  }
248  if ($_POST["rep_tree_limit_grp_crs"] && !$ilSetting->get("rep_tree_limit_grp_crs"))
249  {
250  $_POST["rep_tree_synchronize"] = true;
251  }
252  else if (!$_POST["rep_tree_synchronize"] && $ilSetting->get("rep_tree_synchronize"))
253  {
254  $_POST["rep_tree_limit_grp_crs"] = false;
255  }
256  $ilSetting->set("rep_tree_limit_grp_crs", $_POST["rep_tree_limit_grp_crs"]);
257 
258  // $ilSetting->set('rep_cache',(int) $_POST['rep_cache']);
259  // $ilSetting->set("rep_tree_synchronize", $_POST["rep_tree_synchronize"]);
260 
261  $ilSetting->set("enable_trash", $_POST["enable_trash"]);
262 
263  $ilSetting->set("rep_shorten_description", $form->getInput('rep_shorten_description'));
264  $ilSetting->set("rep_shorten_description_length", (int)$form->getInput('rep_shorten_description_length'));
265  $ilSetting->set('item_cmd_asynch',(int) $_POST['item_cmd_asynch']);
266  $ilSetting->set('comments_tagging_in_lists',(int) $_POST['comments_tagging_in_lists']);
267  $ilSetting->set('comments_tagging_in_lists_tags',(int) $_POST['comments_tagging_in_lists_tags']);
268 
269  require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
270  if ($form->getInput('change_event_tracking'))
271  {
273  }
274  else
275  {
277  }
278 
279  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
280  $this->ctrl->redirect($this, "view");
281  }
282 
283  $form->setValuesByPost();
284  $this->view($form);
285  }
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 386 of file class.ilObjRepositorySettingsGUI.php.

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

387  {
388  $this->tabs_gui->activateTab('modules');
389 
390  $this->tabs_gui->addSubTab("list_mods",
391  $this->lng->txt("rep_new_item_menu"),
392  $this->ctrl->getLinkTarget($this, "listModules"));
393 
394  $this->tabs_gui->addSubTab("new_item_groups",
395  $this->lng->txt("rep_new_item_groups"),
396  $this->ctrl->getLinkTarget($this, "listNewItemGroups"));
397 
398  $this->tabs_gui->activateSubTab($a_active);
399  }
+ Here is the caller graph for this function:

◆ updateNewItemGroup()

ilObjRepositorySettingsGUI::updateNewItemGroup ( )
protected

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

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

595  {
596  $grp_id = (int)$_GET["grp_id"];
597  if(!$grp_id)
598  {
599  $this->ctrl->redirect($this, "listNewItemGroups");
600  }
601 
602  $this->ctrl->setParameter($this, "grp_id", $grp_id);
603 
604  $form = $this->initNewItemGroupForm($grp_id);
605  if($form->checkInput())
606  {
607  $titles = array();
608  foreach($this->lng->getInstalledLanguages() as $lang_id)
609  {
610  $titles[$lang_id] = $form->getInput("title_".$lang_id);
611  }
612 
613  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
614  if(ilObjRepositorySettings::updateNewItemGroup($grp_id, $titles))
615  {
616  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
617  $this->ctrl->redirect($this, "listNewItemGroups");
618  }
619  }
620 
621  $form->setValuesByPost();
622  $this->addNewItemGroup($form);
623  }
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: