ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups 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 ()
 execute command
 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.
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not)
 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
 getCreationMode ()
 get creation mode
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder
 getHTML ()
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled
 cancelDeleteObject ()
 cancel deletion of object
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public
 createObject ()
 create new object form
 cancelCreation ()
 cancel create action and go back to repository parent
 saveObject ()
 save object
 editObject ()
 edit object
 updateObject ()
 updates object entry in object_data
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g.
 isVisible ($a_ref_id, $a_type)
 viewObject ()
 list childs of current object
 deleteObject ($a_error=false)
 Display deletion confirmation screen.
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI.

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
 setTitleAndDescription ()
 called by prepare output
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu.
 insertHeaderAction ($a_list_gui)
 Insert header action into main template.
 addHeaderAction ()
 Add header action menu.
 redrawHeaderActionObject ()
 Ajax call: redraw action header only.
 showMountWebfolderIcon ()
 setTabs ()
 set admin tabs public
 setAdminTabs ()
 set admin tabs public
 setLocator ()
 set Locator
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 omitLocator ($a_omit=true)
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded)
 initCreationForms ($a_new_type)
 Init creation froms.
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion)
 initCreateForm ($a_new_type)
 Init object creation form.
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types.
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates.
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen.
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position.
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook.
 initEditForm ()
 Init object edit form.
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form.
 getEditFormValues ()
 Get values for edit form.
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields.
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object.
 afterUpdate ()
 Post (successful) object update hook.
 initImportForm ($a_new_type)
 Init object import form.
 importFileObject ($parent_id=null)
 Import.
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook.
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g.
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g.
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu)
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl.
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste
 getTabs (&$tabs_gui)
 get tabs abstract method.
 __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
 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
 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.
 getCenterColumnHTML ()
 Get center column.
 getRightColumnHTML ()
 Display right column.
 setColumnSettings ($column_gui)
 May be overwritten in subclasses.
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error.
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission.
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files.
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting.

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root.
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root.
- 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

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

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

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

References ilObjectGUI\ilObjectGUI().

{
parent::ilObjectGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
$this->type = 'reps';
$this->lng->loadLanguageModule('rep');
$this->lng->loadLanguageModule('cmps');
}

+ Here is the call graph for this function:

Member Function Documentation

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

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

References initNewItemGroupForm().

Referenced by saveNewItemGroup(), and updateNewItemGroup().

{
if(!$a_form)
{
$a_form = $this->initNewItemGroupForm();
}
$this->tpl->setContent($a_form->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjRepositorySettingsGUI::addNewItemGroupSeparator ( )
protected

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

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

{
include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
{
ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
}
$this->ctrl->redirect($this, "listNewItemGroups");
}

+ Here is the call graph for this function:

ilObjRepositorySettingsGUI::addToExternalSettingsForm (   $a_form_id)

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

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

{
switch($a_form_id)
{
require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
$fields = array('trac_repository_changes' => array(ilChangeEvent::_isActive(), ilAdministrationSettingsFormHandler::VALUE_BOOL));
return array(array("view", $fields));
}
}

+ Here is the call graph for this function:

ilObjRepositorySettingsGUI::confirmDeleteNewItemGroup ( )
protected

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

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

{
if(!is_array($_POST["grp_id"]))
{
ilUtil::sendFailure($this->lng->txt("select_one"));
return $this->listNewItemGroups();
}
$this->setModuleSubTabs("new_item_groups");
include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
$cgui = new ilConfirmationGUI();
$cgui->setHeaderText($this->lng->txt("rep_new_item_group_delete_sure"));
$cgui->setFormAction($this->ctrl->getFormAction($this));
$cgui->setCancel($this->lng->txt("cancel"), "listNewItemGroups");
$cgui->setConfirm($this->lng->txt("confirm"), "deleteNewItemGroup");
include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
foreach ($_POST["grp_id"] as $grp_id)
{
$cgui->addItem("grp_id[]", $grp_id, $groups[$grp_id]["title"]);
}
$this->tpl->setContent($cgui->getHTML());
}

+ Here is the call graph for this function:

ilObjRepositorySettingsGUI::customIcons ( ilPropertyFormGUI  $a_form = null)

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

References initCustomIconsForm().

Referenced by saveCustomIcons().

{
$this->tabs_gui->activateTab("icons");
if(!$a_form)
{
$a_form = $this->initCustomIconsForm();
}
$this->tpl->setContent($a_form->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjRepositorySettingsGUI::deleteNewItemGroup ( )
protected

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

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

{
if(!is_array($_POST["grp_id"]))
{
return $this->listNewItemGroups();
}
include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
foreach($_POST["grp_id"] as $grp_id)
{
}
ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
$this->ctrl->redirect($this, "listNewItemGroups");
}

+ Here is the call graph for this function:

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

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

References $_GET, and initNewItemGroupForm().

{
$grp_id = (int)$_GET["grp_id"];
if(!$grp_id)
{
$this->ctrl->redirect($this, "listNewItemGroups");
}
if(!$a_form)
{
$this->ctrl->setParameter($this, "grp_id", $grp_id);
$a_form = $this->initNewItemGroupForm($grp_id);
}
$this->tpl->setContent($a_form->getHTML());
}

+ Here is the call graph for this function:

ilObjRepositorySettingsGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

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

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

{
global $ilErr, $ilAccess;
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
$this->prepareOutput();
if(!$ilAccess->checkAccess('write', '', $this->object->getRefId()))
{
$ilErr->raiseError($this->lng->txt('no_permission'), $ilErr->WARNING);
}
switch($next_class)
{
case 'ilpermissiongui':
$this->tabs_gui->setTabActive('perm_settings');
include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
$perm_gui =& new ilPermissionGUI($this);
$this->ctrl->forwardCommand($perm_gui);
break;
default:
$this->$cmd();
break;
}
return true;
}

+ Here is the call graph for this function:

ilObjRepositorySettingsGUI::getAdminTabs ( )

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

{
global $rbacsystem;
$this->tabs_gui->addTab("settings",
$this->lng->txt("settings"),
$this->ctrl->getLinkTarget($this, "view"));
$this->tabs_gui->addTab("icons",
$this->lng->txt("rep_custom_icons"),
$this->ctrl->getLinkTarget($this, "customIcons"));
$this->tabs_gui->addTab("modules",
$this->lng->txt("cmps_repository_object_types"),
$this->ctrl->getLinkTarget($this, "listModules"));
if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
{
$this->tabs_gui->addTab("perm_settings",
$this->lng->txt("perm_settings"),
$this->ctrl->getLinkTargetByClass('ilpermissiongui',"perm"));
}
}
ilObjRepositorySettingsGUI::initCustomIconsForm ( )
protected

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

References $ilSetting, and ilFormPropertyGUI\setInfo().

Referenced by customIcons().

{
global $ilSetting;
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
include_once "Services/Form/classes/class.ilCombinationInputGUI.php";
$form = new ilPropertyFormGUI();
$form->setTitle($this->lng->txt("rep_custom_icons"));
$form->setFormAction($this->ctrl->getFormAction($this, 'saveCustomIcons'));
$cb = new ilCheckboxInputGUI($this->lng->txt("enable_custom_icons"), "custom_icons");
$cb->setInfo($this->lng->txt("enable_custom_icons_info"));
$cb->setChecked($ilSetting->get("custom_icons"));
$form->addItem($cb);
$size_big = new ilCombinationInputGUI($this->lng->txt("custom_icon_size_big"));
$form->addItem($size_big);
$width = new ilNumberInputGUI("", "custom_icon_big_width");
$width->setSize(3);
$width->setValue($ilSetting->get("custom_icon_big_width"));
$size_big->addCombinationItem("bgw", $width, $this->lng->txt("width"));
$height = new ilNumberInputGUI("", "custom_icon_big_height");
$height->setSize(3);
$height->setValue($ilSetting->get("custom_icon_big_height"));
$size_big->addCombinationItem("bgh", $height, $this->lng->txt("height"));
$size_small = new ilCombinationInputGUI($this->lng->txt("custom_icon_size_standard"));
$form->addItem($size_small);
$width = new ilNumberInputGUI("", "custom_icon_small_width");
$width->setSize(3);
$width->setValue($ilSetting->get("custom_icon_small_width"));
$size_small->addCombinationItem("smw", $width, $this->lng->txt("width"));
$height = new ilNumberInputGUI("", "custom_icon_small_height");
$height->setSize(3);
$height->setValue($ilSetting->get("custom_icon_small_height"));
$size_small->addCombinationItem("smh", $height, $this->lng->txt("height"));
$size_tiny = new ilCombinationInputGUI($this->lng->txt("custom_icon_size_tiny"));
$form->addItem($size_tiny);
$width = new ilNumberInputGUI("", "custom_icon_tiny_width");
$width->setSize(3);
$width->setValue($ilSetting->get("custom_icon_tiny_width"));
$size_tiny->addCombinationItem("tnw", $width, $this->lng->txt("width"));
$height = new ilNumberInputGUI("", "custom_icon_tiny_height");
$height->setSize(3);
$height->setValue($ilSetting->get("custom_icon_tiny_height"));
$size_tiny->addCombinationItem("tnh", $height, $this->lng->txt("height"));
$form->addCommandButton('saveCustomIcons', $this->lng->txt('save'));
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

{
$this->setModuleSubTabs("new_item_groups");
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$this->lng->loadLanguageModule("meta");
$def_lng = $this->lng->getDefaultLanguage();
$title = new ilTextInputGUI($this->lng->txt("title"), "title_".$def_lng);
$title->setInfo($this->lng->txt("meta_l_".$def_lng).
" (".$this->lng->txt("default_language").")");
$title->setRequired(true);
$form->addItem($title);
foreach($this->lng->getInstalledLanguages() as $lang_id)
{
if($lang_id != $def_lng)
{
$title = new ilTextInputGUI($this->lng->txt("translation"), "title_".$lang_id);
$title->setInfo($this->lng->txt("meta_l_".$lang_id));
$form->addItem($title);
}
}
if(!$a_grp_id)
{
$form->setTitle($this->lng->txt("rep_new_item_group_add"));
$form->setFormAction($this->ctrl->getFormAction($this, "saveNewItemGroup"));
$form->addCommandButton("saveNewItemGroup", $this->lng->txt("save"));
}
else
{
$form->setTitle($this->lng->txt("rep_new_item_group_edit"));
$form->setFormAction($this->ctrl->getFormAction($this, "updateNewItemGroup"));
include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
$grp = $grp[$a_grp_id];
foreach($grp["titles"] as $id => $value)
{
$field = $form->getItemByPostVar("title_".$id);
if($field)
{
$field->setValue($value);
}
}
$form->addCommandButton("updateNewItemGroup", $this->lng->txt("save"));
}
$form->addCommandButton("listNewItemGroups", $this->lng->txt("cancel"));
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

{
global $ilSetting;
include_once('Services/Form/classes/class.ilPropertyFormGUI.php');
$form = new ilPropertyFormGUI();
$form->setTitle($this->lng->txt("settings"));
$form->setFormAction($this->ctrl->getFormAction($this, 'saveSettings'));
// default repository view
$options = array(
"flat" => $this->lng->txt("flatview"),
"tree" => $this->lng->txt("treeview")
);
$si = new ilSelectInputGUI($this->lng->txt("def_repository_view"), "default_rep_view");
$si->setInfo($this->lng->txt(""));
if ($ilSetting->get("default_repository_view") == "tree")
{
$si->setValue("tree");
}
else
{
$si->setValue("flat");
}
$form->addItem($si);
//
$options = array(
"" => $this->lng->txt("adm_rep_tree_only_container"),
"tree" => $this->lng->txt("adm_all_resource_types")
);
// repository tree
$radg = new ilRadioGroupInputGUI($this->lng->txt("adm_rep_tree_presentation"), "tree_pres");
$radg->setValue($ilSetting->get("repository_tree_pres"));
$op1 = new ilRadioOption($this->lng->txt("adm_rep_tree_only_cntr"), "",
$this->lng->txt("adm_rep_tree_only_cntr_info"));
$radg->addOption($op1);
$op2 = new ilRadioOption($this->lng->txt("adm_rep_tree_all_types"), "all_types",
$this->lng->txt("adm_rep_tree_all_types_info"));
// limit tree in courses and groups
$cb = new ilCheckboxInputGUI($this->lng->txt("adm_rep_tree_limit_grp_crs"), "rep_tree_limit_grp_crs");
$cb->setChecked($ilSetting->get("rep_tree_limit_grp_crs"));
$cb->setInfo($this->lng->txt("adm_rep_tree_limit_grp_crs_info"));
$op2->addSubItem($cb);
$radg->addOption($op2);
$form->addItem($radg);
/* OBSOLETE
// synchronize repository tree with main view
$cb = new ilCheckboxInputGUI($this->lng->txt("adm_synchronize_rep_tree"), "rep_tree_synchronize");
$cb->setInfo($this->lng->txt("adm_synchronize_rep_tree_info"));
$cb->setChecked($ilSetting->get("rep_tree_synchronize"));
$form->addItem($cb);
*/
/* DISABLED
// repository access check
$options = array(
0 => "0",
10 => "10",
30 => "30",
60 => "60",
120 => "120"
);
$si = new ilSelectInputGUI($this->lng->txt("adm_repository_cache_time"), "rep_cache");
$si->setOptions($options);
$si->setValue($ilSetting->get("rep_cache"));
$si->setInfo($this->lng->txt("adm_repository_cache_time_info")." ".
$this->lng->txt("adm_repository_cache_time_info2"));
$form->addItem($si);
*/
// trash
$cb = new ilCheckboxInputGUI($this->lng->txt("enable_trash"), "enable_trash");
$cb->setInfo($this->lng->txt("enable_trash_info"));
if ($ilSetting->get("enable_trash"))
{
$cb->setChecked(true);
}
$form->addItem($cb);
// change event
require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
$this->lng->loadLanguageModule("trac");
$event = new ilCheckboxInputGUI($this->lng->txt('trac_repository_changes'), 'change_event_tracking');
$form->addItem($event);
include_once "Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php";
$form,
$this
);
// object lists
$lists = new ilFormSectionHeaderGUI();
$lists->setTitle($this->lng->txt("rep_object_lists"));
$form->addItem($lists);
$sdesc = new ilCheckboxInputGUI($this->lng->txt("adm_rep_shorten_description"), "rep_shorten_description");
$sdesc->setInfo($this->lng->txt("adm_rep_shorten_description_info"));
$sdesc->setChecked($ilSetting->get("rep_shorten_description"));
$form->addItem($sdesc);
$sdesclen = new ilTextInputGUI($this->lng->txt("adm_rep_shorten_description_length"), "rep_shorten_description_length");
$sdesclen->setValue($ilSetting->get("rep_shorten_description_length"));
$sdesclen->setSize(3);
$sdesc->addSubItem($sdesclen);
// load action commands asynchronously
$cb = new ilCheckboxInputGUI($this->lng->txt("adm_item_cmd_asynch"), "item_cmd_asynch");
$cb->setInfo($this->lng->txt("adm_item_cmd_asynch_info"));
$cb->setChecked($ilSetting->get("item_cmd_asynch"));
$form->addItem($cb);
// notes/comments/tagging
$pl = new ilCheckboxInputGUI($this->lng->txt('adm_show_comments_tagging_in_lists'),'comments_tagging_in_lists');
$pl->setValue(1);
$pl->setChecked($ilSetting->get('comments_tagging_in_lists'));
$form->addItem($pl);
$form->addCommandButton('saveSettings', $this->lng->txt('save'));
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjRepositorySettingsGUI::listModules ( )
protected

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

References setModuleSubTabs().

{
$this->setModuleSubTabs("list_mods");
include_once("./Services/Repository/classes/class.ilModulesTableGUI.php");
$comp_table = new ilModulesTableGUI($this, "listModules");
$this->tpl->setContent($comp_table->getHTML());
}

+ Here is the call graph for this function:

ilObjRepositorySettingsGUI::listNewItemGroups ( )
protected

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

References setModuleSubTabs().

Referenced by confirmDeleteNewItemGroup(), and deleteNewItemGroup().

{
global $ilToolbar;
$this->setModuleSubTabs("new_item_groups");
$ilToolbar->addButton($this->lng->txt("rep_new_item_group_add"),
$this->ctrl->getLinkTarget($this, "addNewItemGroup"));
$ilToolbar->addButton($this->lng->txt("rep_new_item_group_add_separator"),
$this->ctrl->getLinkTarget($this, "addNewItemGroupSeparator"));
include_once("./Services/Repository/classes/class.ilNewItemGroupTableGUI.php");
$grp_table = new ilNewItemGroupTableGUI($this, "listNewItemGroups");
$this->tpl->setContent($grp_table->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjRepositorySettingsGUI::saveCustomIcons ( )

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

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

{
global $ilSetting;
$form = $this->initSettingsForm();
if ($form->checkInput())
{
$ilSetting->set("custom_icons", (int)$form->getInput("custom_icons"));
$ilSetting->set("custom_icon_big_width", (int)$form->getInput("custom_icon_big_width"));
$ilSetting->set("custom_icon_big_height", (int)$form->getInput("custom_icon_big_height"));
$ilSetting->set("custom_icon_small_width", (int)$form->getInput("custom_icon_small_width"));
$ilSetting->set("custom_icon_small_height", (int)$form->getInput("custom_icon_small_height"));
$ilSetting->set("custom_icon_tiny_width", (int)$form->getInput("custom_icon_tiny_width"));
$ilSetting->set("custom_icon_tiny_height", (int)$form->getInput("custom_icon_tiny_height"));
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
$this->ctrl->redirect($this, "customIcons");
}
$form->setValuesByPost();
$this->customIcons($form);
}

+ Here is the call graph for this function:

ilObjRepositorySettingsGUI::saveModules ( )
protected

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

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

{
if(!is_array($_POST["obj_grp"]) ||
!is_array($_POST["obj_pos"]))
{
$ilCtrl->redirect($this, "listModules");
}
$grp_pos_map = array(0 => 9999);
include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
{
$grp_pos_map[$item["id"]] = $item["pos"];
}
$type_pos_map = array();
foreach($_POST["obj_pos"] as $obj_type => $pos)
{
$grp_id = (int)$_POST["obj_grp"][$obj_type];
$type_pos_map[$grp_id][$obj_type] = $pos;
// enable creation?
$ilSetting->set("obj_dis_creation_".$obj_type, !(int)$_POST["obj_enbl_creation"][$obj_type]);
}
foreach($type_pos_map as $grp_id => $obj_types)
{
$grp_pos = str_pad($grp_pos_map[$grp_id], 4, "0", STR_PAD_LEFT);
asort($obj_types);
$pos = 0;
foreach(array_keys($obj_types) as $obj_type)
{
$pos += 10;
$type_pos = $grp_pos.str_pad($pos, 4, "0", STR_PAD_LEFT);
$ilSetting->set("obj_add_new_pos_".$obj_type, $type_pos);
$ilSetting->set("obj_add_new_pos_grp_".$obj_type, $grp_id);
}
}
/*
if (count($double) == 0)
{
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
}
else
{
ilUtil::sendInfo($lng->txt("cmps_duplicate_positions")." ".implode($double, ", "), true);
}
*/
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
$ilCtrl->redirect($this, "listModules");
}

+ Here is the call graph for this function:

ilObjRepositorySettingsGUI::saveNewItemGroup ( )
protected

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

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

{
$form = $this->initNewItemGroupForm();
if($form->checkInput())
{
$titles = array();
foreach($this->lng->getInstalledLanguages() as $lang_id)
{
$titles[$lang_id] = $form->getInput("title_".$lang_id);
}
include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
{
ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
$this->ctrl->redirect($this, "listNewItemGroups");
}
}
$form->setValuesByPost();
$this->addNewItemGroup($form);
}

+ Here is the call graph for this function:

ilObjRepositorySettingsGUI::saveNewItemGroupOrder ( )
protected

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

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

{
global $ilSetting;
if(is_array($_POST["grp_order"]))
{
include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
$grp_pos_map = array();
include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
{
$grp_pos_map[$item["id"]] = str_pad($item["pos"], 4, "0", STR_PAD_LEFT);
}
// update order of assigned objects
foreach(ilObjRepositorySettings::getNewItemGroupSubItems() as $grp_id => $subitems)
{
// unassigned objects will always be last
if($grp_id)
{
foreach($subitems as $obj_type)
{
$old_pos = $ilSetting->get("obj_add_new_pos_".$obj_type);
if(strlen($old_pos) == 8)
{
$new_pos = $grp_pos_map[$grp_id].substr($old_pos, 4);
$ilSetting->set("obj_add_new_pos_".$obj_type, $new_pos);
}
}
}
}
ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
}
$this->ctrl->redirect($this, "listNewItemGroups");
}

+ Here is the call graph for this function:

ilObjRepositorySettingsGUI::saveSettings ( )

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

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

{
global $ilSetting;
$form = $this->initSettingsForm();
if ($form->checkInput())
{
$ilSetting->set("default_repository_view", $_POST["default_rep_view"]);
$ilSetting->set("repository_tree_pres", $_POST["tree_pres"]);
if ($_POST["tree_pres"] == "")
{
$_POST["rep_tree_limit_grp_crs"] = "";
}
if ($_POST["rep_tree_limit_grp_crs"] && !$ilSetting->get("rep_tree_limit_grp_crs"))
{
$_POST["rep_tree_synchronize"] = true;
}
else if (!$_POST["rep_tree_synchronize"] && $ilSetting->get("rep_tree_synchronize"))
{
$_POST["rep_tree_limit_grp_crs"] = false;
}
$ilSetting->set("rep_tree_limit_grp_crs", $_POST["rep_tree_limit_grp_crs"]);
// $ilSetting->set('rep_cache',(int) $_POST['rep_cache']);
// $ilSetting->set("rep_tree_synchronize", $_POST["rep_tree_synchronize"]);
$ilSetting->set("enable_trash", $_POST["enable_trash"]);
$ilSetting->set("rep_shorten_description", $form->getInput('rep_shorten_description'));
$ilSetting->set("rep_shorten_description_length", (int)$form->getInput('rep_shorten_description_length'));
$ilSetting->set('item_cmd_asynch',(int) $_POST['item_cmd_asynch']);
$ilSetting->set('comments_tagging_in_lists',(int) $_POST['comments_tagging_in_lists']);
require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
if ($form->getInput('change_event_tracking'))
{
}
else
{
}
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
$this->ctrl->redirect($this, "view");
}
$form->setValuesByPost();
$this->view($form);
}

+ Here is the call graph for this function:

ilObjRepositorySettingsGUI::setModuleSubTabs (   $a_active)
protected

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

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

{
$this->tabs_gui->activateTab('modules');
$this->tabs_gui->addSubTab("list_mods",
$this->lng->txt("rep_new_item_menu"),
$this->ctrl->getLinkTarget($this, "listModules"));
$this->tabs_gui->addSubTab("new_item_groups",
$this->lng->txt("rep_new_item_groups"),
$this->ctrl->getLinkTarget($this, "listNewItemGroups"));
$this->tabs_gui->activateSubTab($a_active);
}

+ Here is the caller graph for this function:

ilObjRepositorySettingsGUI::updateNewItemGroup ( )
protected

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

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

{
$grp_id = (int)$_GET["grp_id"];
if(!$grp_id)
{
$this->ctrl->redirect($this, "listNewItemGroups");
}
$this->ctrl->setParameter($this, "grp_id", $grp_id);
$form = $this->initNewItemGroupForm($grp_id);
if($form->checkInput())
{
$titles = array();
foreach($this->lng->getInstalledLanguages() as $lang_id)
{
$titles[$lang_id] = $form->getInput("title_".$lang_id);
}
include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
{
ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
$this->ctrl->redirect($this, "listNewItemGroups");
}
}
$form->setValuesByPost();
$this->addNewItemGroup($form);
}

+ Here is the call graph for this function:

ilObjRepositorySettingsGUI::view ( ilPropertyFormGUI  $a_form = null)

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

References initSettingsForm().

Referenced by saveSettings().

{
$this->tabs_gui->activateTab("settings");
if(!$a_form)
{
$a_form = $this->initSettingsForm();
}
$this->tpl->setContent($a_form->getHTML());
}

+ 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: