ILIAS  release_4-4 Revision
ilObjCategoryGUI Class Reference

Class ilObjCategoryGUI. More...

+ Inheritance diagram for ilObjCategoryGUI:
+ Collaboration diagram for ilObjCategoryGUI:

Public Member Functions

 ilObjCategoryGUI ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public. More...
 
executeCommand ()
 
 getTabs (&$tabs_gui)
 Get tabs. More...
 
 renderObject ()
 Render category. More...
 
 infoScreenObject ()
 this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed More...
 
 infoScreen ()
 show information screen More...
 
 initEditForm ()
 
 getEditFormValues ()
 
 updateObject ()
 updates object entry in object_data More...
 
 editTranslationsObject ($a_get_post_values=false, $a_add=false)
 Edit title and translations. More...
 
 saveTranslationsObject ()
 Save title and translations. More...
 
 addTranslationObject ()
 Add a translation. More...
 
 deleteTranslationsObject ()
 Remove translation. More...
 
 importCategoriesFormObject ()
 display form for category import More...
 
 _importCategoriesForm ($a_ref_id, &$a_tpl)
 display form for category import (static, also called by RootFolderGUI) More...
 
 importCancelledObject ()
 import cancelled More...
 
 _getImportDir ()
 get user import directory name More...
 
 importCategoriesObject ()
 import categories More...
 
 importCategoriesWithRolObject ()
 import categories with local rol More...
 
 _importCategories ($a_ref_id, $withrol_tmp)
 import categories (static, also called by RootFolderGUI) More...
 
 listUsersObject ($show_delete=false)
 
 performDeleteUsersObject ()
 
 deleteUsersObject ()
 
 assignRolesObject ()
 
 assignSaveObject ()
 
 __getAssignableRoles ()
 
 __checkGlobalRoles ($new_assigned)
 
 __showRolesTable ($a_result_set, $a_from="")
 
 __showUsersTable ($a_result_set, $a_from="", $a_footer=true)
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="", $a_footer=true)
 
__initTableGUI ()
 
 __buildFilterSelect ($a_parent_ids)
 
 _goto ($a_target)
 
 editIconsObject ($a_form=null)
 Edit folder icons. More...
 
 initIconsForm ()
 
 updateIconsObject ()
 update container icons More...
 
- Public Member Functions inherited from ilContainerGUI
 ilContainerGUI ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public. More...
 
executeCommand ()
 execute command note: this method is overwritten in all container objects More...
 
 forwardToStyleSheet ()
 Forward to style object. More...
 
forwardToPageObject ()
 forward command to page object More...
 
 addPageTabs ()
 Add page tabs. More...
 
 getContainerPageHTML ()
 Get container page HTML. More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 showTreeFlatIcon ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 showPossibleSubObjects ()
 show possible sub objects selection list More...
 
 getContentGUI ()
 Get content gui object. More...
 
 renderObject ()
 render the object More...
 
 setContentSubTabs ()
 Set content sub tabs. More...
 
 showAdministrationPanel (&$tpl)
 show administration panel More...
 
 __showTimingsButton (&$tpl)
 
 showPermanentLink (&$tpl)
 show permanent link More...
 
 switchToStdEditorObject ()
 Switch to standard page editor. More...
 
 switchToOldEditorObject ()
 Switch to old page editor. More...
 
 useNewEditorObject ()
 Use new editor (-> delete xhtml content page) More...
 
 editPageFrameObject ()
 show page editor frameset More...
 
 editPageContentObject ()
 edit page content (for repository root node and categories) More...
 
 savePageContentObject ()
 
 cancelPageContentObject ()
 
 renderItemList ($a_type="all")
 
 showLinkListObject ()
 
 clearAdminCommandsDetermination ()
 cleaer administration commands determination More...
 
newBlockTemplate ()
 determin admin commands More...
 
 addHeaderRow (&$a_tpl, $a_type, $a_show_image=true)
 adds a header row to a block template More...
 
 addStandardRow (&$a_tpl, $a_html, $a_item_ref_id="", $a_item_obj_id="", $a_image_type="")
 adds a standard row to a block template More...
 
 addMessageRow (&$a_tpl, $a_message, $a_type)
 add message row More...
 
 resetRowType ()
 
 setPageEditorTabs ()
 Add page editor tabs. More...
 
 addStandardContainerSubTabs ($a_include_view=true)
 Add standar container subtabs for view, manage, oderdering and text/media editor link. More...
 
 getTabs (&$tabs_gui)
 common tabs for all container objects (should be called at the end of child getTabs() method More...
 
 enableAdministrationPanelObject ()
 enable administration panel More...
 
 disableAdministrationPanelObject ()
 enable administration panel More...
 
 editOrderObject ()
 Edit order. More...
 
 isActiveOrdering ()
 Check if ordering is enabled. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
 enableMultiDownloadObject ()
 
 isMultiDownloadEnabled ()
 
 lockObject ()
 
 cutObject ()
 cut object(s) out from a container and write the information to clipboard More...
 
 copyObject ()
 Copy object(s) out from a container and write the information to clipboard It is not possible to copy multiple objects at once. More...
 
 downloadObject ()
 
 linkObject ()
 create an new reference of an object in tree it's like a hard link of unix More...
 
 clearObject ()
 clear clipboard and go back to last object More...
 
 performPasteIntoMultipleObjectsObject ()
 
 initAndDisplayLinkIntoMultipleObjectsObject ()
 
 showPasteTreeObject ()
 Show paste tree. More...
 
 cancelMoveLinkObject ()
 Cancel move|link empty clipboard and return to parent. More...
 
 keepObjectsInClipboardObject ()
 Keep objects in the clipboard. More...
 
 initAndDisplayCopyIntoMultipleObjectsObject ()
 
 initAndDisplayMoveIntoObjectObject ()
 
 pasteObject ()
 paste object from clipboard to current place Depending on the chosen command the object(s) are linked, copied or moved More...
 
 clipboardObject ()
 Copy object(s) out from a container and write the information to clipboard It is not possible to copy multiple objects at once. More...
 
 showCustomIconsEditing ($a_input_colspan=1, ilPropertyFormGUI $a_form=null, $a_as_section=true)
 show edit section of custom icons for container More...
 
 isActiveAdministrationPanel ()
 
 setColumnSettings ($column_gui)
 May be overwritten in subclasses. More...
 
 allowBlocksMoving ()
 Standard is to allow blocks moving. More...
 
 allowBlocksConfigure ()
 Standard is to allow blocks configuration. More...
 
 cloneWizardPageTreeObject ()
 public More...
 
 cloneWizardPageListObject ()
 public More...
 
 cloneWizardPageObject ($a_tree_view=true)
 Show clone wizard page for container objects. More...
 
 cloneAllObject ()
 Clone all object Overwritten method for copying container objects. More...
 
 saveSortingObject ()
 Save Sorting. More...
 
 cloneNodes ($srcRef, $dstRef, &$mapping, $newName=null)
 Recursively clones all nodes of the RBAC tree. More...
 
 modifyItemGUI (&$a_item_list_gui, $a_item_data, $a_show_path)
 Modify Item ListGUI for presentation in container. More...
 
 editStylePropertiesObject ()
 Edit style properties. More...
 
 initStylePropertiesForm ()
 Init style properties form. More...
 
 createStyleObject ()
 Create Style. More...
 
 editStyleObject ()
 Edit Style. More...
 
 deleteStyleObject ()
 Delete Style. More...
 
 saveStyleSettingsObject ()
 Save style settings. More...
 
 getAsynchItemListObject ()
 Get item list command drop down asynchronously. More...
 
 redrawListItemObject ()
 Redraw a list item (ajax) More...
 
 showRepTree ($a_initial_call=false)
 Show tree. More...
 
 trashObject ()
 Show trash content of object. More...
 
 removeFromSystemObject ()
 remove objects from trash bin and all entries therefore every object needs a specific deleteObject() method More...
 
 undeleteObject ()
 Get objects back from trash. More...
 
 confirmRemoveFromSystemObject ()
 confirmation screen remove from system More...
 
- 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...
 

Data Fields

 $ctrl
 
- Data Fields inherited from ilContainerGUI
 $bl_cnt = 1
 
 $multi_download_enabled = false
 
- 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 Member Functions

 initCreationForms ($a_new_type)
 
 afterSave (ilObject $a_new_object)
 
 editInfoObject ()
 Edit extended category settings. More...
 
 updateInfoObject ()
 Update info (extended meta data) More...
 
 initExtendedSettings ()
 build property form for extended category settings More...
 
 setEditTabs ($active_tab="settings_misc")
 
 resetFilterObject ()
 Reset filter (note: this function existed before data table filter has been introduced. More...
 
 applyFilterObject ()
 Apply filter. More...
 
 addUserAutoCompleteObject ()
 Show auto complete results. More...
 
- Protected Member Functions inherited from ilContainerGUI
 getEditFormValues ()
 Get values for edit form. More...
 
 afterUpdate ()
 
 showPasswordInstructionObject ($a_init=true)
 Show webdav password instruction. More...
 
 initFormPasswordInstruction ()
 Init password form. More...
 
 savePasswordObject ()
 Save password. More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add file manager link. More...
 
 fileManagerLaunchObject ()
 Launch jnlp. More...
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 prepareOutput ()
 prepare output More...
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs public More...
 
 setAdminTabs ()
 set admin tabs public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste More...
 
 getTabs (&$tabs_gui)
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings ($column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ilContainerGUI
static _buildPath ($a_ref_id, $a_course_ref_id)
 build path More...
 
- 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...
 

Detailed Description

Member Function Documentation

◆ __buildFilterSelect()

ilObjCategoryGUI::__buildFilterSelect (   $a_parent_ids)

Definition at line 1542 of file class.ilObjCategoryGUI.php.

References $_SESSION, ilLocalUser\_getUserFolderId(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), and ilUtil\formSelect().

1543  {
1544  $action[0] = $this->lng->txt('all_users');
1545  $action[$this->object->getRefId()] = $this->lng->txt('users').
1546  ' ('.ilObject::_lookupTitle(ilObject::_lookupObjId($this->object->getRefId())).')';
1547 
1548  foreach($a_parent_ids as $parent)
1549  {
1550  if($parent == $this->object->getRefId())
1551  {
1552  continue;
1553  }
1554  switch($parent)
1555  {
1557  $action[ilLocalUser::_getUserFolderId()] = $this->lng->txt('global_user');
1558 
1559  break;
1560 
1561  default:
1562  $action[$parent] = $this->lng->txt('users').' ('.ilObject::_lookupTitle(ilObject::_lookupObjId($parent)).')';
1563 
1564  break;
1565  }
1566  }
1567  return ilUtil::formSelect($_SESSION['filtered_users'][$this->object->getRefId()],"filter",$action,false,true);
1568  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
static _lookupTitle($a_id)
lookup object title
static formSelect($selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
static _lookupObjId($a_id)
+ Here is the call graph for this function:

◆ __checkGlobalRoles()

ilObjCategoryGUI::__checkGlobalRoles (   $new_assigned)

Definition at line 1303 of file class.ilObjCategoryGUI.php.

References $_GET, $_REQUEST, $ilUser, ilObjectGUI\checkPermission(), and ilObjectFactory\getInstanceByObjId().

Referenced by assignSaveObject().

1304  {
1305  global $rbacreview,$ilUser;
1306 
1307  $this->checkPermission("cat_administrate_users");
1308 
1309  // return true if it's not a local user
1310  $tmp_obj =& ilObjectFactory::getInstanceByObjId($_REQUEST['obj_id']);
1311  if($tmp_obj->getTimeLimitOwner() != $this->object->getRefId() and
1312  !in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles($ilUser->getId())))
1313  {
1314  return true;
1315  }
1316 
1317  // new assignment by form
1318  $new_assigned = $new_assigned ? $new_assigned : array();
1319  $assigned = $rbacreview->assignedRoles((int) $_GET['obj_id']);
1320 
1321  // all assignable globals
1322  if(!in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles($ilUser->getId())))
1323  {
1324  $ga = $rbacreview->getGlobalAssignableRoles();
1325  }
1326  else
1327  {
1328  $ga = $rbacreview->getGlobalRolesArray();
1329  }
1330  $global_assignable = array();
1331  foreach($ga as $role)
1332  {
1333  $global_assignable[] = $role['obj_id'];
1334  }
1335 
1336  $new_visible_assigned_roles = array_intersect($new_assigned,$global_assignable);
1337  $all_assigned_roles = array_intersect($assigned,$rbacreview->getGlobalRoles());
1338  $main_assigned_roles = array_diff($all_assigned_roles,$global_assignable);
1339 
1340  if(!count($new_visible_assigned_roles) and !count($main_assigned_roles))
1341  {
1342  return false;
1343  }
1344  return true;
1345  }
$_GET["client_id"]
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
global $ilUser
Definition: imgupload.php:15
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __getAssignableRoles()

ilObjCategoryGUI::__getAssignableRoles ( )

Definition at line 1280 of file class.ilObjCategoryGUI.php.

References $_REQUEST, $ilUser, and ilObjectFactory\getInstanceByObjId().

Referenced by assignRolesObject(), and assignSaveObject().

1281  {
1282  global $rbacreview,$ilUser;
1283 
1284  // check local user
1285  $tmp_obj =& ilObjectFactory::getInstanceByObjId($_REQUEST['obj_id']);
1286  // Admin => all roles
1287  if(in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles($ilUser->getId())))
1288  {
1289  $global_roles = $rbacreview->getGlobalRolesArray();
1290  }
1291  elseif($tmp_obj->getTimeLimitOwner() == $this->object->getRefId())
1292  {
1293  $global_roles = $rbacreview->getGlobalAssignableRoles();
1294  }
1295  else
1296  {
1297  $global_roles = array();
1298  }
1299  return $roles = array_merge($global_roles,
1300  $rbacreview->getAssignableChildRoles($this->object->getRefId()));
1301  }
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
global $ilUser
Definition: imgupload.php:15
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __initTableGUI()

& ilObjCategoryGUI::__initTableGUI ( )

Definition at line 1535 of file class.ilObjCategoryGUI.php.

Referenced by __showRolesTable(), and __showUsersTable().

1536  {
1537  include_once "./Services/Table/classes/class.ilTableGUI.php";
1538 
1539  return new ilTableGUI(0,false);
1540  }
Class ilTableGUI.
+ Here is the caller graph for this function:

◆ __setTableGUIBasicData()

ilObjCategoryGUI::__setTableGUIBasicData ( $tbl,
$result_set,
  $a_from = "",
  $a_footer = true 
)

Definition at line 1467 of file class.ilObjCategoryGUI.php.

References $_GET, and $ilUser.

Referenced by __showRolesTable(), and __showUsersTable().

1468  {
1469  global $ilUser;
1470 
1471  switch ($a_from)
1472  {
1473  case "listUsersObject":
1474  $tbl->setOrderColumn($_GET["sort_by"]);
1475  $tbl->setOrderDirection($_GET["sort_order"]);
1476  $tbl->setOffset($_GET["offset"]);
1477  $tbl->setMaxCount($this->all_users_count);
1478  $tbl->setLimit($ilUser->getPref('hits_per_page'));
1479  $tbl->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));
1480  $tbl->setData($result_set);
1481  $tbl->disable('auto_sort');
1482 
1483  return true;
1484 
1485 
1486  case "assignRolesObject":
1487  $offset = $_GET["offset"];
1488  // init sort_by (unfortunatly sort_by is preset with 'title'
1489  if ($_GET["sort_by"] == "title" or empty($_GET["sort_by"]))
1490  {
1491  $_GET["sort_by"] = "login";
1492  }
1493  $order = $_GET["sort_by"];
1494  $direction = $_GET["sort_order"];
1495  break;
1496 
1497  case "clipboardObject":
1498  $offset = $_GET["offset"];
1499  $order = $_GET["sort_by"];
1500  $direction = $_GET["sort_order"];
1501  $tbl->disable("footer");
1502  break;
1503 
1504  default:
1505  $offset = $_GET["offset"];
1506  $order = $_GET["sort_by"];
1507  $direction = $_GET["sort_order"];
1508  break;
1509  }
1510 
1511  $tbl->setOrderColumn($order);
1512  $tbl->setOrderDirection($direction);
1513  $tbl->setOffset($offset);
1514  if($this->set_unlimited)
1515  {
1516  $tbl->setLimit($_GET["limit"]*100);
1517  }
1518  else
1519  {
1520  $tbl->setLimit($_GET['limit']);
1521  }
1522  $tbl->setMaxCount(count($result_set));
1523 
1524  if($a_footer)
1525  {
1526  $tbl->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));
1527  }
1528  else
1529  {
1530  $tbl->disable('footer');
1531  }
1532  $tbl->setData($result_set);
1533  }
$_GET["client_id"]
global $ilUser
Definition: imgupload.php:15
+ Here is the caller graph for this function:

◆ __showRolesTable()

ilObjCategoryGUI::__showRolesTable (   $a_result_set,
  $a_from = "" 
)

Definition at line 1348 of file class.ilObjCategoryGUI.php.

References $_GET, ilObjectGUI\$tpl, __initTableGUI(), __setTableGUIBasicData(), ilObjectGUI\checkPermission(), ilUtil\getImagePath(), and ilObjectFactory\getInstanceByObjId().

Referenced by assignRolesObject().

1349  {
1350  $this->checkPermission("cat_administrate_users");
1351 
1352  $tbl =& $this->__initTableGUI();
1353  $tpl =& $tbl->getTemplateObject();
1354 
1355  // SET FORMAACTION
1356  $tpl->setCurrentBlock("tbl_form_header");
1357 
1358  $this->ctrl->setParameter($this,'obj_id',$_GET['obj_id']);
1359  $tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
1360  $tpl->parseCurrentBlock();
1361 
1362  // SET FOOTER BUTTONS
1363  $tpl->setVariable("COLUMN_COUNTS",4);
1364  $tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.png"));
1365 
1366 // $tpl->setCurrentBlock("tbl_action_button");
1367  $tpl->setVariable("BTN_NAME","assignSave");
1368  $tpl->setVariable("BTN_VALUE",$this->lng->txt("change_assignment"));
1369  $tpl->parseCurrentBlock();
1370 
1371  $tpl->setCurrentBlock("tbl_action_row");
1372  $tpl->setVariable("TPLPATH",$this->tpl->tplPath);
1373  $tpl->parseCurrentBlock();
1374 
1375  $tmp_obj =& ilObjectFactory::getInstanceByObjId($_GET['obj_id']);
1376  $title = $this->lng->txt('role_assignment').' ('.$tmp_obj->getFullname().')';
1377 
1378  $tbl->setTitle($title,"icon_role.png",$this->lng->txt("role_assignment"));
1379  $tbl->setHeaderNames(array('',
1380  $this->lng->txt("title"),
1381  $this->lng->txt('description'),
1382  $this->lng->txt("type")));
1383  $tbl->setHeaderVars(array("",
1384  "title",
1385  "description",
1386  "type"),
1387  array("ref_id" => $this->object->getRefId(),
1388  "cmd" => "assignRoles",
1389  "obj_id" => $_GET['obj_id'],
1390  "cmdClass" => "ilobjcategorygui",
1391  "cmdNode" => $_GET["cmdNode"]));
1392  $tbl->setColumnWidth(array("4%","35%","45%","16%"));
1393 
1394  $this->set_unlimited = true;
1395  $this->__setTableGUIBasicData($tbl,$a_result_set,$a_from,true);
1396  $tbl->render();
1397 
1398  $this->tpl->setVariable("ROLES_TABLE",$tbl->tpl->get());
1399 
1400  return true;
1401  }
$_GET["client_id"]
__setTableGUIBasicData(&$tbl, &$result_set, $a_from="", $a_footer=true)
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __showUsersTable()

ilObjCategoryGUI::__showUsersTable (   $a_result_set,
  $a_from = "",
  $a_footer = true 
)

Definition at line 1403 of file class.ilObjCategoryGUI.php.

References $_GET, ilObjectGUI\$tpl, __initTableGUI(), __setTableGUIBasicData(), ilObjectGUI\checkPermission(), and ilUtil\getImagePath().

1404  {
1405  $this->checkPermission("cat_administrate_users");
1406 
1407  $tbl =& $this->__initTableGUI();
1408  $tpl =& $tbl->getTemplateObject();
1409 
1410  // SET FORMAACTION
1411  $tpl->setCurrentBlock("tbl_form_header");
1412 
1413  $this->ctrl->setParameter($this,'sort_by',$_GET['sort_by']);
1414  $this->ctrl->setParameter($this,'sort_order',$_GET['sort_order']);
1415  $this->ctrl->setParameter($this,'offset',$_GET['offset']);
1416  $tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
1417  $tpl->parseCurrentBlock();
1418 
1419 
1420  if($a_footer)
1421  {
1422  // SET FOOTER BUTTONS
1423  $tpl->setVariable("COLUMN_COUNTS",6);
1424  $tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.png"));
1425 
1426  $tpl->setCurrentBlock("tbl_action_button");
1427  $tpl->setVariable("BTN_NAME","deleteUser");
1428  $tpl->setVariable("BTN_VALUE",$this->lng->txt("delete"));
1429  $tpl->parseCurrentBlock();
1430 
1431  $tpl->setCurrentBlock("tbl_action_row");
1432  $tpl->setVariable("TPLPATH",$this->tpl->tplPath);
1433  $tpl->parseCurrentBlock();
1434 
1435  $tbl->setFormName('cmd');
1436  $tbl->enable('select_all');
1437  }
1438 
1439  $tbl->setTitle($this->lng->txt("users"),"icon_usr.png",$this->lng->txt("users"));
1440  $tbl->setHeaderNames(array('',
1441  $this->lng->txt("username"),
1442  $this->lng->txt("firstname"),
1443  $this->lng->txt("lastname"),
1444  $this->lng->txt('context'),
1445  $this->lng->txt('role_assignment')));
1446  $tbl->setHeaderVars(array("",
1447  "login",
1448  "firstname",
1449  "lastname",
1450  "context",
1451  "role_assignment"),
1452  array("ref_id" => $this->object->getRefId(),
1453  "cmd" => "listUsers",
1454  "cmdClass" => "ilobjcategorygui",
1455  "cmdNode" => $_GET["cmdNode"]));
1456  $tbl->setColumnWidth(array("1px","20%","20%","20%","20%","20%"));
1457  $tbl->setSelectAllCheckbox('user_ids');
1458 
1459  $this->__setTableGUIBasicData($tbl,$a_result_set,$a_from,true);
1460  $tbl->render();
1461 
1462  $this->tpl->setVariable("USERS_TABLE",$tbl->tpl->get());
1463 
1464  return true;
1465  }
$_GET["client_id"]
__setTableGUIBasicData(&$tbl, &$result_set, $a_from="", $a_footer=true)
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:

◆ _getImportDir()

ilObjCategoryGUI::_getImportDir ( )

get user import directory name

Definition at line 946 of file class.ilObjCategoryGUI.php.

References ilUtil\getDataDir().

Referenced by _importCategories().

947  {
948  return ilUtil::getDataDir()."/cat_import";
949  }
static getDataDir()
get data directory (outside webspace)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _goto()

ilObjCategoryGUI::_goto (   $a_target)

Definition at line 1570 of file class.ilObjCategoryGUI.php.

References $ilErr, ilObjectGUI\$lng, ilObjectGUI\_gotoRepositoryNode(), ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), and ilUtil\sendFailure().

Referenced by ilObjCategoryReferenceGUI\_goto().

1571  {
1572  global $ilAccess, $ilErr, $lng;
1573 
1574  if ($ilAccess->checkAccess("read", "", $a_target))
1575  {
1577  }
1578  else if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
1579  {
1580  ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
1581  ilObject::_lookupTitle(ilObject::_lookupObjId($a_target))), true);
1583  }
1584 
1585  $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
1586 
1587  }
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupTitle($a_id)
lookup object title
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
static _lookupObjId($a_id)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _importCategories()

ilObjCategoryGUI::_importCategories (   $a_ref_id,
  $withrol_tmp 
)

import categories (static, also called by RootFolderGUI)

Definition at line 976 of file class.ilObjCategoryGUI.php.

References ilObjectGUI\$lng, _getImportDir(), ilUtil\createDirectory(), ilUtil\moveUploadedFile(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and ilUtil\unzip().

Referenced by ilObjRootFolderGUI\importCategoriesObject(), importCategoriesObject(), ilObjRootFolderGUI\importCategoriesWithRolObject(), and importCategoriesWithRolObject().

977  {
978  global $lng;
979 
980  require_once("./Modules/Category/classes/class.ilCategoryImportParser.php");
981 
982  $import_dir = ilObjCategoryGUI::_getImportDir();
983 
984  // create user import directory if necessary
985  if (!@is_dir($import_dir))
986  {
987  ilUtil::createDirectory($import_dir);
988  }
989 
990  // move uploaded file to user import directory
991 
992  $file_name = $_FILES["importFile"]["name"];
993 
994  // added to prevent empty file names
995  if (!strcmp($file_name,"")) {
996  ilUtil::sendFailure($lng->txt("no_import_file_found"), true);
997  $this->ctrl->redirect($this);
998  }
999 
1000  $parts = pathinfo($file_name);
1001  $full_path = $import_dir."/".$file_name;
1002  //move_uploaded_file($_FILES["importFile"]["tmp_name"], $full_path);
1003  ilUtil::moveUploadedFile($_FILES["importFile"]["tmp_name"], $file_name, $full_path);
1004 
1005  // unzip file
1006  ilUtil::unzip($full_path);
1007 
1008  $subdir = basename($parts["basename"],".".$parts["extension"]);
1009  $xml_file = $import_dir."/".$subdir."/".$subdir.".xml";
1010  // CategoryImportParser
1011  //var_dump($_POST);
1012  $importParser = new ilCategoryImportParser($xml_file, $a_ref_id, $withrol_tmp);
1013  $importParser->startParsing();
1014 
1015  ilUtil::sendSuccess($lng->txt("categories_imported"), true);
1016  $this->ctrl->redirect($this);
1017  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
_getImportDir()
get user import directory name
static unzip($a_file, $overwrite=false, $a_flat=false)
unzip file
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
static createDirectory($a_dir, $a_mod=0755)
create directory
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _importCategoriesForm()

ilObjCategoryGUI::_importCategoriesForm (   $a_ref_id,
$a_tpl 
)

display form for category import (static, also called by RootFolderGUI)

Definition at line 881 of file class.ilObjCategoryGUI.php.

References ilObjectGUI\$lng, ilUtil\formCheckbox(), and ilUtil\switchColor().

Referenced by ilObjRootFolderGUI\importCategoriesFormObject(), and importCategoriesFormObject().

882  {
883  global $lng, $rbacreview;
884 
885  $a_tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl.cat_import_form.html",
886  "Modules/Category");
887 
888  $a_tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
889 
890  $a_tpl->setVariable("TXT_IMPORT_CATEGORIES", $lng->txt("import_categories"));
891  $a_tpl->setVariable("TXT_HIERARCHY_OPTION", $lng->txt("import_cat_localrol"));
892  $a_tpl->setVariable("TXT_IMPORT_FILE", $lng->txt("import_file"));
893  $a_tpl->setVariable("TXT_IMPORT_TABLE", $lng->txt("import_cat_table"));
894 
895  $a_tpl->setVariable("BTN_IMPORT", $lng->txt("import"));
896  $a_tpl->setVariable("BTN_CANCEL", $lng->txt("cancel"));
897 
898  // NEED TO FILL ADOPT_PERMISSIONS HTML FORM....
899  $parent_role_ids = $rbacreview->getParentRoleIds($a_ref_id,true);
900 
901  // sort output for correct color changing
902  ksort($parent_role_ids);
903 
904  foreach ($parent_role_ids as $key => $par)
905  {
906  if ($par["obj_id"] != SYSTEM_ROLE_ID)
907  {
908  $check = ilUtil::formCheckbox(0,"adopt[]",$par["obj_id"],1);
909  $output["adopt"][$key]["css_row_adopt"] = ilUtil::switchColor($key, "tblrow1", "tblrow2");
910  $output["adopt"][$key]["check_adopt"] = $check;
911  $output["adopt"][$key]["role_id"] = $par["obj_id"];
912  $output["adopt"][$key]["type"] = ($par["type"] == 'role' ? 'Role' : 'Template');
913  $output["adopt"][$key]["role_name"] = $par["title"];
914  }
915  }
916 
917  //var_dump($output);
918 
919  // BEGIN ADOPT PERMISSIONS
920  foreach ($output["adopt"] as $key => $value)
921  {
922  $a_tpl->setCurrentBlock("ADOPT_PERM_ROW");
923  $a_tpl->setVariable("CSS_ROW_ADOPT",$value["css_row_adopt"]);
924  $a_tpl->setVariable("CHECK_ADOPT",$value["check_adopt"]);
925  $a_tpl->setVariable("LABEL_ID",$value["role_id"]);
926  $a_tpl->setVariable("TYPE",$value["type"]);
927  $a_tpl->setVariable("ROLE_NAME",$value["role_name"]);
928  $a_tpl->parseCurrentBlock();
929  }
930  }
static switchColor($a_num, $a_css1, $a_css2)
switches style sheets for each even $a_num (used for changing colors of different result rows) ...
static formCheckbox($checked, $varname, $value, $disabled=false)
??? public
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addTranslationObject()

ilObjCategoryGUI::addTranslationObject ( )

Add a translation.

Definition at line 829 of file class.ilObjCategoryGUI.php.

References $_POST, and editTranslationsObject().

830  {
831  if($_POST["title"])
832  {
833  $k = max(array_keys($_POST["title"]));
834  $k++;
835  $_POST["title"][$k] = "";
836  $this->editTranslationsObject(true);
837  }
838  else
839  {
840  $this->editTranslationsObject(false, true);
841  }
842  }
$_POST['username']
Definition: cron.php:12
editTranslationsObject($a_get_post_values=false, $a_add=false)
Edit title and translations.
+ Here is the call graph for this function:

◆ addUserAutoCompleteObject()

ilObjCategoryGUI::addUserAutoCompleteObject ( )
protected

Show auto complete results.

Definition at line 1109 of file class.ilObjCategoryGUI.php.

References $_REQUEST, and exit.

1110  {
1111  include_once './Services/User/classes/class.ilUserAutoComplete.php';
1112  $auto = new ilUserAutoComplete();
1113  $auto->setSearchFields(array('login','firstname','lastname','email'));
1114  $auto->enableFieldSearchableCheck(true);
1115  echo $auto->getList($_REQUEST['term']);
1116  exit();
1117  }
exit
Definition: login.php:54
Auto completion class for user lists.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7

◆ afterSave()

ilObjCategoryGUI::afterSave ( ilObject  $a_new_object)
protected

Definition at line 333 of file class.ilObjCategoryGUI.php.

References $ilUser, ilObjectGUI\$tree, ilObject\_lookupObjId(), ilObjStyleSheet\_lookupStandard(), ilObject\getDescription(), ilObject\getId(), ilObject\getRefId(), ilObject\getTitle(), ilObjStyleSheet\lookupObjectStyle(), ilObjectGUI\redirectToRefId(), ilUtil\sendSuccess(), ilContainerSortingSettings\setSortMode(), ilContainer\SORT_TITLE, and ilObjStyleSheet\writeStyleUsage().

334  {
335  global $ilUser, $tree;
336 
337  // add default translation
338  $a_new_object->addTranslation($a_new_object->getTitle(),
339  $a_new_object->getDescription(), $ilUser->getPref("language"), true);
340 
341  // default: sort by title
342  include_once('Services/Container/classes/class.ilContainerSortingSettings.php');
343  $settings = new ilContainerSortingSettings($a_new_object->getId());
345  $settings->save();
346 
347  // inherit parents content style, if not individual
348  $parent_ref_id = $tree->getParentId($a_new_object->getRefId());
349  $parent_id = ilObject::_lookupObjId($parent_ref_id);
350  include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
351  $style_id = ilObjStyleSheet::lookupObjectStyle($parent_id);
352  if ($style_id > 0)
353  {
354  if (ilObjStyleSheet::_lookupStandard($style_id))
355  {
356  ilObjStyleSheet::writeStyleUsage($a_new_object->getId(), $style_id);
357  }
358  }
359 
360  // always send a message
361  ilUtil::sendSuccess($this->lng->txt("cat_added"),true);
362  $this->ctrl->setParameter($this, "ref_id", $a_new_object->getRefId());
363  $this->redirectToRefId($a_new_object->getRefId(), "");
364  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static lookupObjectStyle($a_obj_id)
Lookup object style.
static writeStyleUsage($a_obj_id, $a_style_id)
Write style usage.
getId()
get object id public
static _lookupObjId($a_id)
getTitle()
get object title public
getDescription()
get object description
_lookupStandard($a_id)
Lookup standard flag.
global $ilUser
Definition: imgupload.php:15
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 sav...
getRefId()
get reference id public
+ Here is the call graph for this function:

◆ applyFilterObject()

ilObjCategoryGUI::applyFilterObject ( )
protected

Apply filter.

Returns

Definition at line 1038 of file class.ilObjCategoryGUI.php.

References listUsersObject(), and ilUserTableGUI\MODE_LOCAL_USER.

1039  {
1040  global $ilTabs;
1041 
1042  include_once("./Services/User/classes/class.ilUserTableGUI.php");
1043  $utab = new ilUserTableGUI($this, "listUsers", ilUserTableGUI::MODE_LOCAL_USER);
1044  $utab->resetOffset();
1045  $utab->writeFilterToSession();
1046  $this->listUsersObject();
1047  }
listUsersObject($show_delete=false)
TableGUI class for user administration.
+ Here is the call graph for this function:

◆ assignRolesObject()

ilObjCategoryGUI::assignRolesObject ( )

Definition at line 1174 of file class.ilObjCategoryGUI.php.

References $_GET, __getAssignableRoles(), __showRolesTable(), ilObjectGUI\checkPermission(), ilUtil\formCheckbox(), ilObjectFactory\getInstanceByObjId(), listUsersObject(), and ilUtil\sendFailure().

Referenced by assignSaveObject().

1175  {
1176  global $rbacreview,$ilTabs;
1177 
1178  $this->checkPermission("cat_administrate_users");
1179 
1180  include_once './Services/User/classes/class.ilLocalUser.php';
1181 
1182  if(!isset($_GET['obj_id']))
1183  {
1184  ilUtil::sendFailure('no_user_selected');
1185  $this->listUsersObject();
1186 
1187  return true;
1188  }
1189 
1190  $ilTabs->clearTargets();
1191  $ilTabs->setBackTarget($this->lng->txt('backto_lua'), $this->ctrl->getLinkTarget($this,'listUsers'));
1192  global $ilHelp;
1193  $ilHelp->setScreenIdComponent("cat");
1194  $ilHelp->setScreenId("administrate_user");
1195  $ilHelp->setSubScreenId("assign_roles");
1196 
1197 
1198  $roles = $this->__getAssignableRoles();
1199 
1200  if(!count($roles))
1201  {
1202  #ilUtil::sendInfo($this->lng->txt('no_roles_user_can_be_assigned_to'));
1203  #$this->listUsersObject();
1204 
1205  #return true;
1206  }
1207 
1208  $this->tpl->addBlockfile('ADM_CONTENT','adm_content','tpl.cat_role_assignment.html',
1209  "Modules/Category");
1210 
1211  $ass_roles = $rbacreview->assignedRoles($_GET['obj_id']);
1212 
1213  $counter = 0;
1214  foreach($roles as $role)
1215  {
1216  $role_obj =& ilObjectFactory::getInstanceByObjId($role['obj_id']);
1217 
1218  $disabled = false;
1219  $f_result[$counter][] = ilUtil::formCheckbox(in_array($role['obj_id'],$ass_roles) ? 1 : 0,
1220  'role_ids[]',
1221  $role['obj_id'],
1222  $disabled);
1223  $f_result[$counter][] = $role_obj->getTitle() ? $role_obj->getTitle() : "";
1224  $f_result[$counter][] = $role_obj->getDescription() ? $role_obj->getDescription() : "";
1225  $f_result[$counter][] = $role['role_type'] == 'global' ?
1226  $this->lng->txt('global') :
1227  $this->lng->txt('local');
1228 
1229  unset($role_obj);
1230  ++$counter;
1231  }
1232  $this->__showRolesTable($f_result,"assignRolesObject");
1233  }
__showRolesTable($a_result_set, $a_from="")
$_GET["client_id"]
listUsersObject($show_delete=false)
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
static formCheckbox($checked, $varname, $value, $disabled=false)
??? public
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ assignSaveObject()

ilObjCategoryGUI::assignSaveObject ( )

Definition at line 1235 of file class.ilObjCategoryGUI.php.

References $_GET, $_POST, $_REQUEST, __checkGlobalRoles(), __getAssignableRoles(), ilLocalUser\_getAllUserIds(), assignRolesObject(), ilObjectGUI\checkPermission(), listUsersObject(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

1236  {
1237  global $rbacreview,$rbacadmin;
1238  $this->checkPermission("cat_administrate_users");
1239 
1240  include_once './Services/User/classes/class.ilLocalUser.php';
1241  // check hack
1242  if(!isset($_GET['obj_id']) or !in_array($_REQUEST['obj_id'],ilLocalUser::_getAllUserIds()))
1243  {
1244  ilUtil::sendFailure('no_user_selected');
1245  $this->listUsersObject();
1246 
1247  return true;
1248  }
1249  $roles = $this->__getAssignableRoles();
1250 
1251  // check minimum one global role
1252  if(!$this->__checkGlobalRoles($_POST['role_ids']))
1253  {
1254  ilUtil::sendFailure($this->lng->txt('no_global_role_left'));
1255  $this->assignRolesObject();
1256 
1257  return false;
1258  }
1259 
1260  $new_role_ids = $_POST['role_ids'] ? $_POST['role_ids'] : array();
1261  $assigned_roles = $rbacreview->assignedRoles((int) $_REQUEST['obj_id']);
1262  foreach($roles as $role)
1263  {
1264  if(in_array($role['obj_id'],$new_role_ids) and !in_array($role['obj_id'],$assigned_roles))
1265  {
1266  $rbacadmin->assignUser($role['obj_id'],(int) $_REQUEST['obj_id']);
1267  }
1268  if(in_array($role['obj_id'],$assigned_roles) and !in_array($role['obj_id'],$new_role_ids))
1269  {
1270  $rbacadmin->deassignUser($role['obj_id'],(int) $_REQUEST['obj_id']);
1271  }
1272  }
1273  ilUtil::sendSuccess($this->lng->txt('role_assignment_updated'));
1274  $this->assignRolesObject();
1275 
1276  return true;
1277  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
__checkGlobalRoles($new_assigned)
$_GET["client_id"]
_getAllUserIds($a_filter=0)
listUsersObject($show_delete=false)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
+ Here is the call graph for this function:

◆ deleteTranslationsObject()

ilObjCategoryGUI::deleteTranslationsObject ( )

Remove translation.

Definition at line 847 of file class.ilObjCategoryGUI.php.

References $_POST, editTranslationsObject(), saveTranslationsObject(), and ilUtil\sendFailure().

848  {
849  foreach($_POST["title"] as $k => $v)
850  {
851  if ($_POST["check"][$k])
852  {
853  // default translation cannot be deleted
854  if($k != $_POST["default"])
855  {
856  unset($_POST["title"][$k]);
857  unset($_POST["desc"][$k]);
858  unset($_POST["lang"][$k]);
859  }
860  else
861  {
862  ilUtil::sendFailure($this->lng->txt("msg_no_default_language"));
863  return $this->editTranslationsObject();
864  }
865  }
866  }
867  $this->saveTranslationsObject();
868  }
$_POST['username']
Definition: cron.php:12
editTranslationsObject($a_get_post_values=false, $a_add=false)
Edit title and translations.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
saveTranslationsObject()
Save title and translations.
+ Here is the call graph for this function:

◆ deleteUsersObject()

ilObjCategoryGUI::deleteUsersObject ( )

Definition at line 1143 of file class.ilObjCategoryGUI.php.

References $_POST, ilObjUser\_lookupName(), ilObjectGUI\checkPermission(), listUsersObject(), and ilUtil\sendFailure().

1144  {
1145  $this->checkPermission("cat_administrate_users");
1146  if(!count($_POST['id']))
1147  {
1148  ilUtil::sendFailure($this->lng->txt('no_users_selected'));
1149  $this->listUsersObject();
1150 
1151  return true;
1152  }
1153 
1154  include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
1155  $confirm = new ilConfirmationGUI();
1156  $confirm->setFormAction($this->ctrl->getFormAction($this));
1157  $confirm->setHeaderText($this->lng->txt('sure_delete_selected_users'));
1158  $confirm->setConfirm($this->lng->txt('delete'), 'performDeleteUsers');
1159  $confirm->setCancel($this->lng->txt('cancel'), 'listUsers');
1160 
1161  foreach($_POST['id'] as $user)
1162  {
1163  $name = ilObjUser::_lookupName($user);
1164 
1165  $confirm->addItem(
1166  'user_ids[]',
1167  $user,
1168  $name['lastname'].', '.$name['firstname'].' ['.$name['login'].']'
1169  );
1170  }
1171  $this->tpl->setContent($confirm->getHTML());
1172  }
static _lookupName($a_user_id)
lookup user name
$_POST['username']
Definition: cron.php:12
listUsersObject($show_delete=false)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
Confirmation screen class.
+ Here is the call graph for this function:

◆ editIconsObject()

ilObjCategoryGUI::editIconsObject (   $a_form = null)

Edit folder icons.

Definition at line 1597 of file class.ilObjCategoryGUI.php.

References ilObjectGUI\$tpl, ilObjectGUI\checkPermission(), and initIconsForm().

Referenced by updateIconsObject().

1598  {
1599  global $tpl;
1600 
1601  $this->checkPermission('write');
1602 
1603  $this->tabs_gui->setTabActive('settings');
1604 
1605  if(!$a_form)
1606  {
1607  $a_form = $this->initIconsForm();
1608  }
1609 
1610  $tpl->setContent($a_form->getHTML());
1611  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ editInfoObject()

ilObjCategoryGUI::editInfoObject ( )
protected

Edit extended category settings.

protected

Definition at line 447 of file class.ilObjCategoryGUI.php.

References ilObjectGUI\checkPermission(), initExtendedSettings(), and setEditTabs().

Referenced by updateInfoObject().

448  {
449  $this->checkPermission("write");
450  $this->setEditTabs();
451  $this->tabs_gui->activateTab('settings');
452  $this->tabs_gui->setSubTabActive('edit_cat_settings');
453 
454  $this->initExtendedSettings();
455  $this->tpl->setContent($this->form->getHTML());
456  }
initExtendedSettings()
build property form for extended category settings
setEditTabs($active_tab="settings_misc")
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ editTranslationsObject()

ilObjCategoryGUI::editTranslationsObject (   $a_get_post_values = false,
  $a_add = false 
)

Edit title and translations.

Definition at line 730 of file class.ilObjCategoryGUI.php.

References $_POST, ilObjectGUI\$data, ilObjectGUI\$tpl, and setEditTabs().

Referenced by addTranslationObject(), deleteTranslationsObject(), and saveTranslationsObject().

731  {
732  global $tpl;
733 
734  $this->ctrl->redirectByClass("ilobjecttranslationgui", "");
735 
736 
737  $this->lng->loadLanguageModule($this->object->getType());
738  $this->setEditTabs("settings_trans");
739 
740  include_once("./Services/Object/classes/class.ilObjectTranslationTableGUI.php");
741  $table = new ilObjectTranslationTableGUI($this, "editTranslations", true,
742  "Translation");
743  if ($a_get_post_values)
744  {
745  $vals = array();
746  foreach($_POST["title"] as $k => $v)
747  {
748  $vals[] = array("title" => $v,
749  "desc" => $_POST["desc"][$k],
750  "lang" => $_POST["lang"][$k],
751  "default" => ($_POST["default"] == $k));
752  }
753  $table->setData($vals);
754  }
755  else
756  {
757  $data = $this->object->getTranslations();
758  foreach($data["Fobject"] as $k => $v)
759  {
760  $data["Fobject"][$k]["default"] = ($k == $data["default_language"]);
761  }
762  if($a_add)
763  {
764  $data["Fobject"][++$k]["title"] = "";
765  }
766  $table->setData($data["Fobject"]);
767  }
768  $tpl->setContent($table->getHTML());
769  }
$_POST['username']
Definition: cron.php:12
setEditTabs($active_tab="settings_misc")
TableGUI class for title/description translations.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

& ilObjCategoryGUI::executeCommand ( )

Definition at line 51 of file class.ilObjCategoryGUI.php.

References $_GET, $cmd, $ilCtrl, $ret, ilObjectGUI\addHeaderAction(), ilObjectGUI\checkPermission(), ilObjectGUI\checkPermissionBool(), ilContainerGUI\forwardToPageObject(), ilContainerGUI\forwardToStyleSheet(), ilObjStyleSheet\getContentStylePath(), ilObjectGUI\getCreationMode(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), infoScreen(), ilObjectGUI\prepareOutput(), renderObject(), setEditTabs(), and ilContainerGUI\showRepTree().

52  {
53  global $rbacsystem, $ilNavigationHistory, $ilAccess, $ilCtrl,$ilTabs;
54 
55  $next_class = $this->ctrl->getNextClass($this);
56  $cmd = $this->ctrl->getCmd();
57 
58  // show repository tree
59  $this->showRepTree(true);
60 
61  switch($next_class)
62  {
63  case "ilobjusergui":
64  include_once('./Services/User/classes/class.ilObjUserGUI.php');
65 
66  $this->tabs_gui->setTabActive('administrate_users');
67  if(!$_GET['obj_id'])
68  {
69  $this->gui_obj = new ilObjUserGUI("",$_GET['ref_id'],true, false);
70  $this->gui_obj->setCreationMode($this->creation_mode);
71  $ret =& $this->ctrl->forwardCommand($this->gui_obj);
72  }
73  else
74  {
75  $this->gui_obj = new ilObjUserGUI("", $_GET['obj_id'],false, false);
76  $this->gui_obj->setCreationMode($this->creation_mode);
77  $ret =& $this->ctrl->forwardCommand($this->gui_obj);
78  }
79 
80  $ilTabs->clearTargets();
81  $ilTabs->setBackTarget($this->lng->txt('backto_lua'), $this->ctrl->getLinkTarget($this,'listUsers'));
82  global $ilHelp;
83  $ilHelp->setScreenIdComponent("cat");
84  $ilHelp->setScreenId("administrate_user");
85  $ilHelp->setSubScreenId($ilCtrl->getCmd());
86  break;
87 
88  case "ilobjuserfoldergui":
89  include_once('./Services/User/classes/class.ilObjUserFolderGUI.php');
90 
91  $this->gui_obj = new ilObjUserFolderGUI("",(int) $_GET['ref_id'],true, false);
92  $this->gui_obj->setUserOwnerId((int) $_GET['ref_id']);
93  $this->gui_obj->setCreationMode($this->creation_mode);
94  $ret =& $this->ctrl->forwardCommand($this->gui_obj);
95 
96  $ilTabs->clearTargets();
97  $ilTabs->setBackTarget($this->lng->txt('backto_lua'), $this->ctrl->getLinkTarget($this,'listUsers'));
98  global $ilHelp;
99  $ilHelp->setScreenIdComponent("cat");
100  $ilHelp->setScreenId("administrate_user");
101  $ilHelp->setSubScreenId($ilCtrl->getCmd());
102  break;
103 
104  case "ilcolumngui":
105  $this->checkPermission("read");
106  $this->prepareOutput();
107  include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
108  $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
109  ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
110  $this->renderObject();
111  break;
112 
113  case 'ilpermissiongui':
114  $this->prepareOutput();
115  $this->tabs_gui->setTabActive('perm_settings');
116  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
117  $perm_gui =& new ilPermissionGUI($this);
118  $ret =& $this->ctrl->forwardCommand($perm_gui);
119  break;
120 
121  case 'ilinfoscreengui':
122  if ($this->info_screen_enabled)
123  {
124  $this->prepareOutput();
125  $this->infoScreen();
126  }
127  break;
128 
129  case 'ilcontainerlinklistgui':
130  include_once("Services/Container/classes/class.ilContainerLinkListGUI.php");
131  $link_list_gui =& new ilContainerLinkListGUI();
132  $ret =& $this->ctrl->forwardCommand($link_list_gui);
133  break;
134 
135  // container page editing
136  case "ilcontainerpagegui":
137  $this->prepareOutput(false);
138  $ret = $this->forwardToPageObject();
139  if ($ret != "")
140  {
141  $this->tpl->setContent($ret);
142  }
143  break;
144 
145  case 'ilobjectcopygui':
146  $this->prepareOutput();
147 
148  include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
149  $cp = new ilObjectCopyGUI($this);
150  $cp->setType('cat');
151  $this->ctrl->forwardCommand($cp);
152  break;
153 
154  case "ilobjstylesheetgui":
155  $this->forwardToStyleSheet();
156  break;
157 
158  case 'ilusertablegui':
159  include_once './Services/User/classes/class.ilUserTableGUI.php';
160  $u_table = new ilUserTableGUI($this, "listUsers");
161  $u_table->initFilter();
162  $this->ctrl->setReturn($this,'listUsers');
163  $this->ctrl->forwardCommand($u_table);
164  break;
165 
166  case "ilcommonactiondispatchergui":
167  $this->prepareOutput();
168  include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
170  $this->ctrl->forwardCommand($gui);
171  break;
172 
173  case 'ildidactictemplategui':
174  $this->ctrl->setReturn($this,'edit');
175  include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';
176  $did = new ilDidacticTemplateGUI($this);
177  $this->ctrl->forwardCommand($did);
178  break;
179 
180  case 'ilexportgui':
181  $this->prepareOutput();
182  $this->tabs_gui->setTabActive('export');
183  include_once './Services/Export/classes/class.ilExportGUI.php';
184  $exp = new ilExportGUI($this);
185  $exp->addFormat('xml');
186  $this->ctrl->forwardCommand($exp);
187  break;
188 
189  case 'ilobjecttranslationgui':
190  $this->checkPermissionBool("write");
191  $this->prepareOutput();
192  //$this->tabs_gui->setTabActive('export');
193  $this->setEditTabs("settings_trans");
194  include_once("./Services/Object/classes/class.ilObjectTranslationGUI.php");
195  $transgui = new ilObjectTranslationGUI($this);
196  $this->ctrl->forwardCommand($transgui);
197  break;
198 
199  default:
200  if ($cmd == "infoScreen")
201  {
202  $this->checkPermission("visible");
203  }
204  else
205  {
206  $this->checkPermission("read");
207  }
208 
209  // add entry to navigation history
210  if (!$this->getCreationMode() &&
211  $ilAccess->checkAccess("read", "", $_GET["ref_id"]))
212  {
213  $ilNavigationHistory->addItem($_GET["ref_id"],
214  $ilCtrl->getLinkTargetByClass("ilrepositorygui", "frameset"), "cat");
215  }
216 
217  $this->prepareOutput();
218  include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
219  if (is_object($this->object))
220  {
221  $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
222  ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
223  }
224 
225  if(!$cmd)
226  {
227  $cmd = "render";
228  }
229  $cmd .= "Object";
230  $this->$cmd();
231 
232  break;
233  }
234 
235  $this->addHeaderAction();
236 
237  return true;
238  }
Class ilContainerLinkListGUI.
infoScreen()
show information screen
GUI class for the workflow of copying objects.
$_GET["client_id"]
$cmd
Definition: sahs_server.php:35
global $ilCtrl
Definition: ilias.php:18
Export User Interface Class.
TableGUI class for user administration.
GUI class for didactic template settings inside repository objects.
forwardToStyleSheet()
Forward to style object.
& forwardToPageObject()
forward command to page object
prepareOutput()
prepare output
renderObject()
Render category.
setEditTabs($active_tab="settings_misc")
getContentStylePath($a_style_id)
get content style path
Class ilObjUserFolderGUI.
getCreationMode()
get creation mode
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
Class ilObjUserGUI.
addHeaderAction()
Add header action menu.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
GUI class for object translation handling.
showRepTree($a_initial_call=false)
Show tree.
+ Here is the call graph for this function:

◆ getEditFormValues()

ilObjCategoryGUI::getEditFormValues ( )

Definition at line 636 of file class.ilObjCategoryGUI.php.

637  {
638  // values are set in initEditForm()
639  }

◆ getTabs()

ilObjCategoryGUI::getTabs ( $tabs_gui)

Get tabs.

Definition at line 243 of file class.ilObjCategoryGUI.php.

References $_GET, ilObjectGUI\$lng, and ilUserAccountSettings\getInstance().

244  {
245  global $rbacsystem, $lng, $ilHelp, $ilAccess;
246 
247  if ($this->ctrl->getCmd() == "editPageContent")
248  {
249  return;
250  }
251  #$this->ctrl->setParameter($this,"ref_id",$this->ref_id);
252 
253  $ilHelp->setScreenIdComponent("cat");
254 
255  if ($rbacsystem->checkAccess('read',$this->ref_id))
256  {
257  $force_active = ($_GET["cmd"] == "" || $_GET["cmd"] == "render")
258  ? true
259  : false;
260  $tabs_gui->addTab("view_content", $lng->txt("content"),
261  $this->ctrl->getLinkTarget($this, ""));
262 
263  //BEGIN ChangeEvent add info tab to category object
264  if ($this->info_screen_enabled)
265  {
266  $force_active = ($this->ctrl->getNextClass() == "ilinfoscreengui"
267  || strtolower($_GET["cmdClass"]) == "ilnotegui")
268  ? true
269  : false;
270  $tabs_gui->addTarget("info_short",
271  $this->ctrl->getLinkTargetByClass(
272  array("ilobjcategorygui", "ilinfoscreengui"), "showSummary"),
273  array("showSummary","", "infoScreen"),
274  "", "", $force_active);
275  }
276  //END ChangeEvent add info tab to category object
277  }
278 
279  if ($rbacsystem->checkAccess('write',$this->ref_id))
280  {
281  $force_active = ($_GET["cmd"] == "edit")
282  ? true
283  : false;
284  $tabs_gui->addTarget("settings",
285  $this->ctrl->getLinkTarget($this, "edit"), "edit", get_class($this)
286  , "", $force_active);
287  }
288 
289  include_once './Services/User/classes/class.ilUserAccountSettings.php';
290  if(
291  ilUserAccountSettings::getInstance()->isLocalUserAdministrationEnabled() and
292  $rbacsystem->checkAccess('cat_administrate_users',$this->ref_id))
293  {
294  $tabs_gui->addTarget("administrate_users",
295  $this->ctrl->getLinkTarget($this, "listUsers"), "listUsers", get_class($this));
296  }
297 
298  if($ilAccess->checkAccess('write','',$this->object->getRefId()))
299  {
300  $tabs_gui->addTarget(
301  'export',
302  $this->ctrl->getLinkTargetByClass('ilexportgui',''),
303  'export',
304  'ilexportgui'
305  );
306  }
307 
308  // parent tabs (all container: edit_permission, clipboard, trash
309  parent::getTabs($tabs_gui);
310 
311  }
$_GET["client_id"]
static getInstance()
Singelton get instance.
+ Here is the call graph for this function:

◆ ilObjCategoryGUI()

ilObjCategoryGUI::ilObjCategoryGUI (   $a_data,
  $a_id,
  $a_call_by_reference = true,
  $a_prepare_output = true 
)

Constructor public.

Definition at line 28 of file class.ilObjCategoryGUI.php.

References $GLOBALS, ilContainer\_lookupContainerSetting(), ilContainerGUI\ilContainerGUI(), and ilObjectServiceSettingsGUI\INFO_TAB_VISIBILITY.

29  {
30  //global $ilCtrl;
31 
32  // CONTROL OPTIONS
33  //$this->ctrl =& $ilCtrl;
34  //$this->ctrl->saveParameter($this,array("ref_id","cmdClass"));
35  $GLOBALS['lng']->loadLanguageModule('cat');
36 
37  $this->type = "cat";
38  $this->ilContainerGUI($a_data,(int) $a_id,$a_call_by_reference,false);
39 
40  if (is_object($this->object))
41  {
42  include_once("./Services/Container/classes/class.ilContainer.php");
43  include_once("./Services/Object/classes/class.ilObjectServiceSettingsGUI.php");
44  $this->info_screen_enabled = ilContainer::_lookupContainerSetting(
45  $this->object->getId(),
47  true);
48  }
49  }
$GLOBALS['ct_recipient']
ilContainerGUI($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Constructor public.
_lookupContainerSetting($a_id, $a_keyword, $a_default_value=NULL)
Lookup a container setting.
+ Here is the call graph for this function:

◆ importCancelledObject()

ilObjCategoryGUI::importCancelledObject ( )

import cancelled

private

Definition at line 938 of file class.ilObjCategoryGUI.php.

939  {
940  $this->ctrl->redirect($this);
941  }

◆ importCategoriesFormObject()

ilObjCategoryGUI::importCategoriesFormObject ( )

display form for category import

Definition at line 873 of file class.ilObjCategoryGUI.php.

References _importCategoriesForm().

874  {
875  ilObjCategoryGUI::_importCategoriesForm($this->ref_id, $this->tpl);
876  }
_importCategoriesForm($a_ref_id, &$a_tpl)
display form for category import (static, also called by RootFolderGUI)
+ Here is the call graph for this function:

◆ importCategoriesObject()

ilObjCategoryGUI::importCategoriesObject ( )

import categories

Definition at line 954 of file class.ilObjCategoryGUI.php.

References $_GET, and _importCategories().

955  {
957  // call to importCategories with $withrol = 0
959  }
$_GET["client_id"]
_importCategories($a_ref_id, $withrol_tmp)
import categories (static, also called by RootFolderGUI)
+ Here is the call graph for this function:

◆ importCategoriesWithRolObject()

ilObjCategoryGUI::importCategoriesWithRolObject ( )

import categories with local rol

Definition at line 964 of file class.ilObjCategoryGUI.php.

References $_GET, and _importCategories().

965  {
966 
967  //echo "entra aqui";
968  // call to importCategories with $withrol = 1
970  }
$_GET["client_id"]
_importCategories($a_ref_id, $withrol_tmp)
import categories (static, also called by RootFolderGUI)
+ Here is the call graph for this function:

◆ infoScreen()

ilObjCategoryGUI::infoScreen ( )

show information screen

Definition at line 381 of file class.ilObjCategoryGUI.php.

References $_GET, $ilCtrl, ilAdvancedMDRecordGUI\MODE_INFO, and ilAdvancedMDRecordGUI\setInfoObject().

Referenced by executeCommand(), and infoScreenObject().

382  {
383  global $ilAccess, $ilCtrl;
384 
385  if (!$ilAccess->checkAccess("visible", "", $this->ref_id))
386  {
387  $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
388  }
389 
390  if (!$this->info_screen_enabled)
391  {
392  return;
393  }
394 
395  // #10986
396  $this->tabs_gui->setTabActive('info_short');
397 
398  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
399  $info = new ilInfoScreenGUI($this);
400 
401  $info->enablePrivateNotes();
402 
403  if ($ilAccess->checkAccess("read", "", $_GET["ref_id"]))
404  {
405  $info->enableNews();
406  }
407 
408  // no news editing for files, just notifications
409  $info->enableNewsEditing(false);
410  if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
411  {
412  $news_set = new ilSetting("news");
413  $enable_internal_rss = $news_set->get("enable_rss_for_internal");
414 
415  if ($enable_internal_rss)
416  {
417  $info->setBlockProperty("news", "settings", true);
418  $info->setBlockProperty("news", "public_notifications_option", true);
419  }
420  }
421 
422  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
423  $record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_INFO,'cat',$this->object->getId());
424  $record_gui->setInfoObject($info);
425  $record_gui->parse();
426 
427 
428  // standard meta data
429  $info->addMetaDataSections($this->object->getId(),0, $this->object->getType());
430 
431  // forward the command
432  if ($ilCtrl->getNextClass() == "ilinfoscreengui")
433  {
434  $ilCtrl->forwardCommand($info);
435  }
436  else
437  {
438  return $ilCtrl->getHTML($info);
439  }
440  }
ILIAS Setting Class.
Class ilInfoScreenGUI.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
setInfoObject($info)
get info sections
redirection script todo: (a better solution should control the processing via a xml file) ...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ infoScreenObject()

ilObjCategoryGUI::infoScreenObject ( )

this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed

Definition at line 371 of file class.ilObjCategoryGUI.php.

References infoScreen().

372  {
373  $this->ctrl->setCmd("showSummary");
374  $this->ctrl->setCmdClass("ilinfoscreengui");
375  $this->infoScreen();
376  }
infoScreen()
show information screen
+ Here is the call graph for this function:

◆ initCreationForms()

ilObjCategoryGUI::initCreationForms (   $a_new_type)
protected

Definition at line 326 of file class.ilObjCategoryGUI.php.

327  {
328  $forms = parent::initCreationForms($a_new_type);
329  //unset($forms[self::CFORM_IMPORT]);
330  return $forms;
331  }

◆ initEditForm()

ilObjCategoryGUI::initEditForm ( )

Definition at line 541 of file class.ilObjCategoryGUI.php.

References ilMDLanguageItem\_getLanguages(), ilObjectServiceSettingsGUI\INFO_TAB_VISIBILITY, ilObjectGUI\initDidacticTemplate(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ilObjectServiceSettingsGUI\NEWS_VISIBILITY, setEditTabs(), ilRadioOption\setInfo(), ilFormPropertyGUI\setInfo(), ilFormPropertyGUI\setRequired(), ilTextAreaInputGUI\setRows(), ilContainer\SORT_MANUAL, ilContainer\SORT_TITLE, and ilObject\TITLE_LENGTH.

Referenced by updateObject().

542  {
543  $this->lng->loadLanguageModule($this->object->getType());
544  $this->setEditTabs();
545 
546  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
547  $form = new ilPropertyFormGUI();
548  $form->setFormAction($this->ctrl->getFormAction($this));
549  $form->setTitle($this->lng->txt($this->object->getType()."_edit"));
550 
551  // title/description
552 
553  $trans = $this->object->getTranslations();
554  $def = $trans["Fobject"][0]; // default
555 
556  $title = new ilTextInputGUI($this->lng->txt("title"), "title");
557  $title->setRequired(true);
558  $title->setSize(min(40, ilObject::TITLE_LENGTH));
559  $title->setMaxLength(ilObject::TITLE_LENGTH);
560  $title->setValue($def["title"]);
561  $form->addItem($title);
562 
563  if(sizeof($trans["Fobject"]) > 1)
564  {
565  include_once('Services/MetaData/classes/class.ilMDLanguageItem.php');
566  $languages = ilMDLanguageItem::_getLanguages();
567 
568  $title->setInfo($this->lng->txt("language").": ".$languages[$def["lang"]].
569  ' <a href="'.$this->ctrl->getLinkTarget($this, "editTranslations").
570  '">&raquo; '.$this->lng->txt("cat_more_translations").'</a>');
571 
572  unset($languages);
573  }
574 
575  $desc = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
576  $desc->setRows(2);
577  $desc->setCols(40);
578  $desc->setValue($def["desc"]);
579  $form->addItem($desc);
580 
581  // Show didactic template type
582  $this->initDidacticTemplate($form);
583 
584  // presentation
585  $pres = new ilFormSectionHeaderGUI();
586  $pres->setTitle($this->lng->txt('obj_presentation'));
587  $form->addItem($pres);
588 
589  // sorting
590  include_once('Services/Container/classes/class.ilContainerSortingSettings.php');
591  $settings = new ilContainerSortingSettings($this->object->getId());
592 
593  $sort = new ilRadioGroupInputGUI($this->lng->txt('sorting_header'), "sorting");
594  $sort_title = new ilRadioOption($this->lng->txt('sorting_title_header'),
596  $sort_title->setInfo($this->lng->txt('sorting_info_title'));
597  $sort->addOption($sort_title);
598 
599  $sort_manual = new ilRadioOption($this->lng->txt('sorting_manual_header'),
601  $sort_manual->setInfo($this->lng->txt('sorting_info_manual'));
602  $sort->addOption($sort_manual);
603 
604  $sort->setValue($settings->getSortMode());
605  $form->addItem($sort);
606 
607  // icon settings
608 // $this->showCustomIconsEditing(1, $form, false);
609 
610  // Edit ecs export settings
611  include_once 'Modules/Category/classes/class.ilECSCategorySettings.php';
612  $ecs = new ilECSCategorySettings($this->object);
613  $ecs->addSettingsToForm($form, 'cat');
614 
615  // services
616  $sh = new ilFormSectionHeaderGUI();
617  $sh->setTitle($this->lng->txt('obj_features'));
618  $form->addItem($sh);
619 
620  include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
622  $this->object->getId(),
623  $form,
624  array(
627  )
628  );
629 
630  $form->addCommandButton("update", $this->lng->txt("save"));
631 // $form->addCommandButton("addTranslation", $this->lng->txt("add_translation"));
632 
633  return $form;
634  }
This class represents an option in a radio group.
This class represents a property form user interface.
const TITLE_LENGTH
max length of object title
This class represents a section header in a property form.
setInfo($a_info)
Set Info.
setInfo($a_info)
Set Information Text.
This class represents a property in a property form.
initDidacticTemplate(ilPropertyFormGUI $form)
Show didactic template types.
This class represents a text property in a property form.
setEditTabs($active_tab="settings_misc")
This class represents a text area property in a property form.
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
Class ilECSCategorySettings.
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initExtendedSettings()

ilObjCategoryGUI::initExtendedSettings ( )
protected

build property form for extended category settings

protected

Definition at line 483 of file class.ilObjCategoryGUI.php.

References ilAdvancedMDRecordGUI\MODE_EDITOR, and ilAdvancedMDRecordGUI\setPropertyForm().

Referenced by editInfoObject().

484  {
485  if(is_object($this->form))
486  {
487  return true;
488  }
489 
490  include_once('Services/Form/classes/class.ilPropertyFormGUI.php');
491  $this->form = new ilPropertyFormGUI();
492  $this->form->setFormAction($this->ctrl->getFormAction($this));
493  $this->form->setTitle($this->lng->txt('ext_cat_settings'));
494  $this->form->addCommandButton('updateInfo',$this->lng->txt('save'));
495  $this->form->addCommandButton('editInfo',$this->lng->txt('cancel'));
496 
497  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
498  $record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_EDITOR,'cat',$this->object->getId());
499  $record_gui->setPropertyForm($this->form);
500  $record_gui->parse();
501 
502  return true;
503  }
This class represents a property form user interface.
setPropertyForm($form)
set property form object
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initIconsForm()

ilObjCategoryGUI::initIconsForm ( )

Definition at line 1613 of file class.ilObjCategoryGUI.php.

References setEditTabs(), and ilContainerGUI\showCustomIconsEditing().

Referenced by editIconsObject(), and updateIconsObject().

1614  {
1615  $this->setEditTabs("icons");
1616 
1617  include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
1618  $form = new ilPropertyFormGUI();
1619  $form->setFormAction($this->ctrl->getFormAction($this));
1620 
1621  $this->showCustomIconsEditing(1, $form);
1622 
1623  // $form->setTitle($this->lng->txt('edit_grouping'));
1624  $form->addCommandButton('updateIcons', $this->lng->txt('save'));
1625 
1626  return $form;
1627  }
This class represents a property form user interface.
showCustomIconsEditing($a_input_colspan=1, ilPropertyFormGUI $a_form=null, $a_as_section=true)
show edit section of custom icons for container
setEditTabs($active_tab="settings_misc")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listUsersObject()

ilObjCategoryGUI::listUsersObject (   $show_delete = false)

Definition at line 1050 of file class.ilObjCategoryGUI.php.

References $ilUser, ilUserTableGUI\MODE_LOCAL_USER, and ilUtil\sendInfo().

Referenced by applyFilterObject(), assignRolesObject(), assignSaveObject(), deleteUsersObject(), performDeleteUsersObject(), and resetFilterObject().

1051  {
1052  global $ilUser,$rbacreview, $ilToolbar;
1053 
1054  include_once './Services/User/classes/class.ilLocalUser.php';
1055  include_once './Services/User/classes/class.ilObjUserGUI.php';
1056 
1057  global $rbacsystem,$rbacreview;
1058 
1059  if(!$rbacsystem->checkAccess("cat_administrate_users",$this->object->getRefId()))
1060  {
1061  $this->ilias->raiseError($this->lng->txt("msg_no_perm_admin_users"),$this->ilias->error_obj->MESSAGE);
1062  }
1063  $this->tabs_gui->setTabActive('administrate_users');
1064 
1065 
1066 
1067  $this->tpl->addBlockfile('ADM_CONTENT','adm_content','tpl.cat_admin_users.html',
1068  "Modules/Category");
1069 
1070  if(count($rbacreview->getGlobalAssignableRoles()) or in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles($ilUser->getId())))
1071  {
1072  $ilToolbar->addButton(
1073  $this->lng->txt('add_user'),
1074  $this->ctrl->getLinkTargetByClass('ilobjusergui','create')
1075  );
1076 
1077  $ilToolbar->addButton(
1078  $this->lng->txt('import_users'),
1079  $this->ctrl->getLinkTargetByClass('ilobjuserfoldergui','importUserForm')
1080  );
1081  }
1082  else
1083  {
1084  ilUtil::sendInfo($this->lng->txt('no_roles_user_can_be_assigned_to'));
1085  }
1086 
1087  if($show_delete)
1088  {
1089  $this->tpl->setCurrentBlock("confirm_delete");
1090  $this->tpl->setVariable("CONFIRM_FORMACTION",$this->ctrl->getFormAction($this));
1091  $this->tpl->setVariable("TXT_CANCEL",$this->lng->txt('cancel'));
1092  $this->tpl->setVariable("CONFIRM_CMD",'performDeleteUsers');
1093  $this->tpl->setVariable("TXT_CONFIRM",$this->lng->txt('delete'));
1094  $this->tpl->parseCurrentBlock();
1095  }
1096 
1097  $this->lng->loadLanguageModule('user');
1098 
1099  include_once("./Services/User/classes/class.ilUserTableGUI.php");
1100  $utab = new ilUserTableGUI($this, 'listUsers',ilUserTableGUI::MODE_LOCAL_USER);
1101  $this->tpl->setVariable('USERS_TABLE',$utab->getHTML());
1102 
1103  return true;
1104  }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
TableGUI class for user administration.
redirection script todo: (a better solution should control the processing via a xml file) ...
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ performDeleteUsersObject()

ilObjCategoryGUI::performDeleteUsersObject ( )

Definition at line 1120 of file class.ilObjCategoryGUI.php.

References $_POST, ilLocalUser\_getAllUserIds(), ilObjectGUI\checkPermission(), ilObjectFactory\getInstanceByObjId(), listUsersObject(), and ilUtil\sendSuccess().

1121  {
1122  include_once './Services/User/classes/class.ilLocalUser.php';
1123  $this->checkPermission("cat_administrate_users");
1124 
1125  foreach($_POST['user_ids'] as $user_id)
1126  {
1127  if(!in_array($user_id,ilLocalUser::_getAllUserIds($this->object->getRefId())))
1128  {
1129  die('user id not valid');
1130  }
1131  if(!$tmp_obj =& ilObjectFactory::getInstanceByObjId($user_id,false))
1132  {
1133  continue;
1134  }
1135  $tmp_obj->delete();
1136  }
1137  ilUtil::sendSuccess($this->lng->txt('deleted_users'));
1138  $this->listUsersObject();
1139 
1140  return true;
1141  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
_getAllUserIds($a_filter=0)
listUsersObject($show_delete=false)
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:

◆ renderObject()

ilObjCategoryGUI::renderObject ( )

Render category.

Definition at line 316 of file class.ilObjCategoryGUI.php.

References $ret.

Referenced by executeCommand().

317  {
318  global $ilTabs;
319 
320  $ilTabs->activateTab("view_content");
321  $ret = parent::renderObject();
322  return $ret;
323 
324  }
+ Here is the caller graph for this function:

◆ resetFilterObject()

ilObjCategoryGUI::resetFilterObject ( )
protected

Reset filter (note: this function existed before data table filter has been introduced.

Definition at line 1023 of file class.ilObjCategoryGUI.php.

References listUsersObject(), and ilUserTableGUI\MODE_LOCAL_USER.

1024  {
1025  include_once("./Services/User/classes/class.ilUserTableGUI.php");
1026  $utab = new ilUserTableGUI($this, "listUsers",ilUserTableGUI::MODE_LOCAL_USER);
1027  $utab->resetOffset();
1028  $utab->resetFilter();
1029 
1030  // from "old" implementation
1031  $this->listUsersObject();
1032  }
listUsersObject($show_delete=false)
TableGUI class for user administration.
+ Here is the call graph for this function:

◆ saveTranslationsObject()

ilObjCategoryGUI::saveTranslationsObject ( )

Save title and translations.

Definition at line 774 of file class.ilObjCategoryGUI.php.

References $_POST, ilObjectGUI\checkPermissionBool(), editTranslationsObject(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and ilUtil\stripSlashes().

Referenced by deleteTranslationsObject().

775  {
776  if (!$this->checkPermissionBool("write"))
777  {
778  $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
779  }
780 
781  // default language set?
782  if (!isset($_POST["default"]))
783  {
784  ilUtil::sendFailure($this->lng->txt("msg_no_default_language"));
785  return $this->editTranslationsObject(true);
786  }
787 
788  // all languages set?
789  if (array_key_exists("",$_POST["lang"]))
790  {
791  ilUtil::sendFailure($this->lng->txt("msg_no_language_selected"));
792  return $this->editTranslationsObject(true);
793  }
794 
795  // no single language is selected more than once?
796  if (count(array_unique($_POST["lang"])) < count($_POST["lang"]))
797  {
798  ilUtil::sendFailure($this->lng->txt("msg_multi_language_selected"));
799  return $this->editTranslationsObject(true);
800  }
801 
802  // save the stuff
803  $this->object->removeTranslations();
804  foreach($_POST["title"] as $k => $v)
805  {
806  // update object data if default
807  $is_default = ($_POST["default"] == $k);
808  if($is_default)
809  {
810  $this->object->setTitle(ilUtil::stripSlashes($v));
811  $this->object->setDescription(ilUtil::stripSlashes($_POST["desc"][$k]));
812  $this->object->update();
813  }
814 
815  $this->object->addTranslation(
817  ilUtil::stripSlashes($_POST["desc"][$k]),
818  ilUtil::stripSlashes($_POST["lang"][$k]),
819  $is_default);
820  }
821 
822  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
823  $this->ctrl->redirect($this, "editTranslations");
824  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
editTranslationsObject($a_get_post_values=false, $a_add=false)
Edit title and translations.
redirection script todo: (a better solution should control the processing via a xml file) ...
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setEditTabs()

ilObjCategoryGUI::setEditTabs (   $active_tab = "settings_misc")
protected

Definition at line 505 of file class.ilObjCategoryGUI.php.

References $ilSetting, and ilAdvancedMDRecord\_getActivatedObjTypes().

Referenced by editInfoObject(), editTranslationsObject(), executeCommand(), initEditForm(), initIconsForm(), and updateObject().

506  {
507  global $ilSetting, $ilTabs;
508 
509  $this->tabs_gui->addSubTab("settings_misc",
510  $this->lng->txt("settings"),
511  $this->ctrl->getLinkTarget($this, "edit"));
512 
513  /*$this->tabs_gui->addSubTab("settings_trans",
514  $this->lng->txt("title_and_translations"),
515  $this->ctrl->getLinkTarget($this, "editTranslations"));*/
516 
517  $this->tabs_gui->addSubTab("settings_trans",
518  $this->lng->txt("obj_multilinguality"),
519  $this->ctrl->getLinkTargetByClass("ilobjecttranslationgui", ""));
520 
521  // custom icon
522  if ($ilSetting->get("custom_icons"))
523  {
524  $this->tabs_gui->addSubTab("icons",
525  $this->lng->txt("icon_settings"),
526  $this->ctrl->getLinkTarget($this,'editIcons'));
527  }
528 
529  $this->tabs_gui->activateTab("settings");
530  $this->tabs_gui->activateSubTab($active_tab);
531 
532  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php');
533  if(in_array('cat',ilAdvancedMDRecord::_getActivatedObjTypes()))
534  {
535  $this->tabs_gui->addSubTabTarget("edit_cat_settings",
536  $this->ctrl->getLinkTarget($this,'editInfo'),
537  "editInfo", get_class($this));
538  }
539  }
global $ilSetting
Definition: privfeed.php:40
static _getActivatedObjTypes()
get activated obj types
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateIconsObject()

ilObjCategoryGUI::updateIconsObject ( )

update container icons

Definition at line 1632 of file class.ilObjCategoryGUI.php.

References $_POST, ilObjectGUI\checkPermission(), editIconsObject(), initIconsForm(), and ilUtil\sendSuccess().

1633  {
1634  $this->checkPermission('write');
1635 
1636  $form = $this->initIconsForm();
1637  if($form->checkInput())
1638  {
1639  //save custom icons
1640  if ($this->ilias->getSetting("custom_icons"))
1641  {
1642  if($_POST["cont_big_icon_delete"])
1643  {
1644  $this->object->removeBigIcon();
1645  }
1646  if($_POST["cont_small_icon_delete"])
1647  {
1648  $this->object->removeSmallIcon();
1649  }
1650  if($_POST["cont_tiny_icon_delete"])
1651  {
1652  $this->object->removeTinyIcon();
1653  }
1654  $this->object->saveIcons($_FILES["cont_big_icon"]['tmp_name'],
1655  $_FILES["cont_small_icon"]['tmp_name'], $_FILES["cont_tiny_icon"]['tmp_name']);
1656 
1657  }
1658  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"),true);
1659  $this->ctrl->redirect($this,"editIcons");
1660  }
1661 
1662  $form->setValuesByPost();
1663  $this->editIconsObject($form);
1664  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
editIconsObject($a_form=null)
Edit folder icons.
redirection script todo: (a better solution should control the processing via a xml file) ...
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:

◆ updateInfoObject()

ilObjCategoryGUI::updateInfoObject ( )
protected

Update info (extended meta data)

protected

Definition at line 463 of file class.ilObjCategoryGUI.php.

References ilObjectGUI\checkPermission(), editInfoObject(), ilAdvancedMDRecordGUI\loadFromPost(), ilAdvancedMDRecordGUI\MODE_EDITOR, and ilUtil\sendSuccess().

464  {
465  $this->checkPermission("write");
466  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
468  'cat',$this->object->getId());
469  $record_gui->loadFromPost();
470  $record_gui->saveValues();
471 
472  ilUtil::sendSuccess($this->lng->txt("settings_saved"));
473  $this->editInfoObject();
474  return true;
475  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
editInfoObject()
Edit extended category settings.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
loadFromPost()
Load values from post.
+ Here is the call graph for this function:

◆ updateObject()

ilObjCategoryGUI::updateObject ( )

updates object entry in object_data

public

Definition at line 646 of file class.ilObjCategoryGUI.php.

References $ilUser, $lang, ilChangeEvent\_catchupWriteEvents(), ilChangeEvent\_recordWriteEvent(), ilContainerGUI\afterUpdate(), ilObjectGUI\checkPermissionBool(), ilObjectServiceSettingsGUI\INFO_TAB_VISIBILITY, initEditForm(), ilObjectServiceSettingsGUI\NEWS_VISIBILITY, setEditTabs(), ilContainerSortingSettings\setSortMode(), and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

647  {
648  if (!$this->checkPermissionBool("write"))
649  {
650  $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
651  }
652  else
653  {
654  $form = $this->initEditForm();
655  if($form->checkInput())
656  {
657  $title = $form->getInput("title");
658  $desc = $form->getInput("desc");
659  $lang = $this->object->getTranslations();
660  $lang = $lang["Fobject"][0]["lang"];
661  $this->object->deleteTranslation($lang);
662  $this->object->addTranslation($title, $desc, $lang, true);
663  $this->object->setTitle($title);
664  $this->object->setDescription($desc);
665  $this->object->update();
666 
667  include_once('Services/Container/classes/class.ilContainerSortingSettings.php');
668  $settings = new ilContainerSortingSettings($this->object->getId());
669  $settings->setSortMode($form->getInput("sorting"));
670  $settings->update();
671 
672  // save custom icons
673 /* if ($this->ilias->getSetting("custom_icons"))
674  {
675  if($form->getItemByPostVar("cont_big_icon")->getDeletionFlag())
676  {
677  $this->object->removeBigIcon();
678  }
679  if($form->getItemByPostVar("cont_small_icon")->getDeletionFlag())
680  {
681  $this->object->removeSmallIcon();
682  }
683  if($form->getItemByPostVar("cont_tiny_icon")->getDeletionFlag())
684  {
685  $this->object->removeTinyIcon();
686  }
687 
688  $this->object->saveIcons($_FILES["cont_big_icon"]['tmp_name'],
689  $_FILES["cont_small_icon"]['tmp_name'],
690  $_FILES["cont_tiny_icon"]['tmp_name']);
691  }*/
692 
693  // BEGIN ChangeEvent: Record update
694  global $ilUser;
695  require_once('Services/Tracking/classes/class.ilChangeEvent.php');
696  ilChangeEvent::_recordWriteEvent($this->object->getId(), $ilUser->getId(), 'update');
697  ilChangeEvent::_catchupWriteEvents($this->object->getId(), $ilUser->getId());
698  // END ChangeEvent: Record update
699 
700  // services
701  include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
703  $this->object->getId(),
704  $form,
705  array(
708  )
709  );
710 
711  // Update ecs export settings
712  include_once 'Modules/Category/classes/class.ilECSCategorySettings.php';
713  $ecs = new ilECSCategorySettings($this->object);
714  if($ecs->handleSettingsUpdate())
715  {
716  return $this->afterUpdate();
717  }
718  }
719 
720  // display form to correct errors
721  $this->setEditTabs();
722  $form->setValuesByPost();
723  $this->tpl->setContent($form->getHTML());
724  }
725  }
redirection script todo: (a better solution should control the processing via a xml file) ...
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
setEditTabs($active_tab="settings_misc")
global $ilUser
Definition: imgupload.php:15
Class ilECSCategorySettings.
_catchupWriteEvents($obj_id, $usr_id, $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
_recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilObjCategoryGUI::$ctrl

Definition at line 22 of file class.ilObjCategoryGUI.php.


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