ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilContainerGUI Class Reference

Class ilContainerGUI. More...

+ Inheritance diagram for ilContainerGUI:
+ Collaboration diagram for ilContainerGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor @access 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...
 
 getAllNestedCategories ($ref_id)
 
 __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 ()
 
 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 ()
 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...
 
 isActiveItemOrdering ()
 Check if item 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 ()
 show clipboard 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 (ilColumnGUI $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 ()
 @access public More...
 
 cloneWizardPageListObject ()
 @access 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 list gui for presentation in container @global type $lng. 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 ()
 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...
 
 setSideColumnReturn ()
 Set return point for side column actions. More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page @access public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 addToDeskObject ()
 Add desktop item @access public. More...
 
 removeFromDeskObject ()
 Remove from desktop @access public. More...
 

Static Public Member Functions

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

Data Fields

 $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

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

Private Member Functions

 getAllNestedFiles ($ref_id)
 Get all files that are nested in the category whose ref_id is passed to this function or are nested in its subcategories Required for fixing mantis bug 0021272. More...
 
 downloadMultipleObjects ($a_ref_ids)
 

Static Private Member Functions

static recurseFolder ($refid, $title, $tmpdir)
 private functions which iterates through all folders and files and create an according file structure in a temporary directory. More...
 
static copyFile ($obj_id, $title, $tmpdir)
 

Additional Inherited Members

- Protected Attributes inherited from ilObjectGUI
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

Detailed Description

Class ilContainerGUI.

This is a base GUI class for all container objects in ILIAS: root folder, course, group, category, folder

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Stefan Hecken stefa.nosp@m.n.he.nosp@m.cken@.nosp@m.conc.nosp@m.epts-.nosp@m.and-.nosp@m.train.nosp@m.ing..nosp@m.de
Version
$Id$

Definition at line 20 of file class.ilContainerGUI.php.

Constructor & Destructor Documentation

◆ __construct()

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

Constructor @access public.

Reimplemented in ilObjGroupGUI, ilObjCategoryGUI, ilObjRootFolderGUI, and ilObjFolderGUI.

Definition at line 29 of file class.ilContainerGUI.php.

30 {
31 global $rbacsystem, $lng;
32
33 $this->rbacsystem = $rbacsystem;
34
35 $lng->loadLanguageModule("cntr");
36 $lng->loadLanguageModule('cont');
37
38 //parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
39
40 // Activate tree cache when rendering the container to improve performance
41 //$tree->useCache(false);
42
43 // prepare output things should generally be made in executeCommand
44 // method (maybe dependent on current class/command
45 parent::__construct($a_data, $a_id, $a_call_by_reference, false);
46 }

References ilObjectGUI\$lng.

Member Function Documentation

◆ __showTimingsButton()

ilContainerGUI::__showTimingsButton ( $tpl)

Definition at line 791 of file class.ilContainerGUI.php.

792 {
793 global $tree;
794
795 if(!$tree->checkForParentType($this->object->getRefId(),'crs'))
796 {
797 return false;
798 }
799 $tpl->setCurrentBlock("custom_button");
800 $tpl->setVariable("ADMIN_MODE_LINK",$this->ctrl->getLinkTargetByClass('ilcoursecontentgui','editTimings'));
801 $tpl->setVariable("TXT_ADMIN_MODE",$this->lng->txt('timings_edit'));
802 $tpl->parseCurrentBlock();
803 return true;
804 }

References ilObjectGUI\$tpl, and ilObjectGUI\$tree.

◆ _buildPath()

static ilContainerGUI::_buildPath (   $a_ref_id,
  $a_course_ref_id 
)
static

build path

Definition at line 3231 of file class.ilContainerGUI.php.

3232 {
3233 global $tree;
3234
3235 $path_arr = $tree->getPathFull($a_ref_id, $a_course_ref_id);
3236 $counter = 0;
3237 foreach($path_arr as $data)
3238 {
3239 if($counter++)
3240 {
3241 $path .= " > ";
3242 }
3243 $path .= $data['title'];
3244 }
3245
3246 return $path;
3247 }
$path
Definition: aliased.php:25
$counter

References $counter, ilObjectGUI\$data, $path, and ilObjectGUI\$tree.

◆ addHeaderRow()

ilContainerGUI::addHeaderRow ( $a_tpl,
  $a_type,
  $a_show_image = true 
)

adds a header row to a block template

Parameters
object$a_tplblock template
string$a_typeobject type @access private

Definition at line 1087 of file class.ilContainerGUI.php.

1088 {
1089 $icon = ilUtil::getImagePath("icon_".$a_type.".svg");
1090 $title = $this->lng->txt("objs_".$a_type);
1091
1092 if ($a_show_image)
1093 {
1094 $a_tpl->setCurrentBlock("container_header_row_image");
1095 $a_tpl->setVariable("HEADER_IMG", $icon);
1096 $a_tpl->setVariable("HEADER_ALT", $title);
1097 }
1098 else
1099 {
1100 $a_tpl->setCurrentBlock("container_header_row");
1101 }
1102
1103 $a_tpl->setVariable("BLOCK_HEADER_CONTENT", $title);
1104 $a_tpl->parseCurrentBlock();
1105 $a_tpl->touchBlock("container_row");
1106 }
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
$a_type
Definition: workflow.php:93

References $a_type, $title, and ilUtil\getImagePath().

+ Here is the call graph for this function:

◆ addMessageRow()

ilContainerGUI::addMessageRow ( $a_tpl,
  $a_message,
  $a_type 
)

add message row

Definition at line 1178 of file class.ilContainerGUI.php.

1179 {
1180 $this->cur_row_type = ($this->cur_row_type == "row_type_1")
1181 ? "row_type_2"
1182 : "row_type_1";
1183
1184 $a_tpl->touchBlock($this->cur_row_type);
1185
1186 $type = $this->lng->txt("obj_".$a_type);
1187 $a_message = str_replace("[type]", $type, $a_message);
1188
1189 $a_tpl->setVariable("ROW_NBSP", " ");
1190
1191 $a_tpl->setCurrentBlock("container_standard_row");
1192 $a_tpl->setVariable("BLOCK_ROW_CONTENT",
1193 $a_message);
1194 $a_tpl->parseCurrentBlock();
1195 $a_tpl->touchBlock("container_row");
1196 }

References $a_type.

◆ addPageTabs()

ilContainerGUI::addPageTabs ( )

Add page tabs.

Definition at line 275 of file class.ilContainerGUI.php.

276 {
277 global $ilTabs, $ilCtrl;
278
279 $ilTabs->addTarget("obj_sty",
280 $ilCtrl->getLinkTarget($this, 'editStyleProperties'), "editStyleProperties");
281 }
global $ilCtrl
Definition: ilias.php:18

References $ilCtrl.

◆ addStandardContainerSubTabs()

ilContainerGUI::addStandardContainerSubTabs (   $a_include_view = true)

Add standar container subtabs for view, manage, oderdering and text/media editor link.

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

1236 {
1237 global $ilTabs, $ilAccess, $lng, $ilCtrl, $ilUser, $ilSetting;
1238
1239 if (!is_object($this->object))
1240 {
1241 return;
1242 }
1243
1244 if ($a_include_view && $ilAccess->checkAccess("read", "", $this->object->getRefId()))
1245 {
1246 if (!$this->isActiveAdministrationPanel())
1247 {
1248 $ilTabs->addSubTab("view_content", $lng->txt("view"), $ilCtrl->getLinkTarget($this, "view"));
1249 }
1250 else
1251 {
1252 $ilTabs->addSubTab("view_content", $lng->txt("view"), $ilCtrl->getLinkTarget($this, "disableAdministrationPanel"));
1253 }
1254 }
1255
1256 if ( $ilUser->getId() != ANONYMOUS_USER_ID &&
1257 ($this->adminCommands ||
1258 (is_object($this->object) &&
1259 ($ilAccess->checkAccess("write", "", $this->object->getRefId())))
1260 ||
1261 (is_object($this->object) &&
1262 ($this->object->getHiddenFilesFound())) ||
1263 $_SESSION["clipboard"]
1264 )
1265 )
1266 {
1267 if ($this->isActiveAdministrationPanel())
1268 {
1269 $ilTabs->addSubTab("manage", $lng->txt("cntr_manage"), $ilCtrl->getLinkTarget($this, ""));
1270 }
1271 else
1272 {
1273 $ilTabs->addSubTab("manage", $lng->txt("cntr_manage"), $ilCtrl->getLinkTarget($this, "enableAdministrationPanel"));
1274 }
1275 }
1276 if ($ilUser->getId() != ANONYMOUS_USER_ID &&
1277 is_object($this->object) &&
1278 $ilAccess->checkAccess("write", "", $this->object->getRefId()) /* &&
1279 $this->object->getOrderType() == ilContainer::SORT_MANUAL */ // always on because of custom block order
1280 )
1281 {
1282 $ilTabs->addSubTab("ordering", $lng->txt("cntr_ordering"), $ilCtrl->getLinkTarget($this, "editOrder"));
1283 }
1284 if ($ilUser->getId() != ANONYMOUS_USER_ID &&
1285 is_object($this->object) &&
1286 $ilAccess->checkAccess("write", "", $this->object->getRefId())
1287 )
1288 {
1289 if ($ilSetting->get("enable_cat_page_edit"))
1290 {
1291 $ilTabs->addSubTab("page_editor", $lng->txt("cntr_text_media_editor"), $ilCtrl->getLinkTarget($this, "editPageFrame"),
1292 ilFrameTargetInfo::_getFrame("MainContent"));
1293 }
1294 }
1295 }
$_SESSION["AccountId"]
static _getFrame($a_class, $a_type='')
Get content frame name.
global $ilSetting
Definition: privfeed.php:17
$ilUser
Definition: imgupload.php:18

References $_SESSION, $ilCtrl, $ilSetting, $ilUser, ilObjectGUI\$lng, ilFrameTargetInfo\_getFrame(), and isActiveAdministrationPanel().

Referenced by ilObjCourseGUI\setContentSubTabs(), ilObjOrgUnitGUI\setContentSubTabs(), and setContentSubTabs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addStandardRow()

ilContainerGUI::addStandardRow ( $a_tpl,
  $a_html,
  $a_item_ref_id = "",
  $a_item_obj_id = "",
  $a_image_type = "" 
)

adds a standard row to a block template

Parameters
object$a_tplblock template
string$a_htmlhtml code @access private

Definition at line 1115 of file class.ilContainerGUI.php.

1117 {
1118 $this->cur_row_type = ($this->cur_row_type == "row_type_1")
1119 ? "row_type_2"
1120 : "row_type_1";
1121
1122 $a_tpl->touchBlock($this->cur_row_type);
1123
1124 $nbsp = true;
1125 if ($this->ilias->getSetting("icon_position_in_lists") == "item_rows")
1126 {
1127 $icon = ilUtil::getImagePath("icon_".$a_image_type.".svg");
1128 $alt = $this->lng->txt("obj_".$a_image_type);
1129
1130 // custom icon
1131 if ($this->ilias->getSetting("custom_icons") &&
1132 in_array($a_image_type, array("cat","grp","crs")))
1133 {
1134 require_once("./Services/Container/classes/class.ilContainer.php");
1135 if (($path = ilContainer::_lookupIconPath($a_item_obj_id, "small")) != "")
1136 {
1137 $icon = $path;
1138 }
1139 }
1140
1141 $a_tpl->setCurrentBlock("block_row_image");
1142 $a_tpl->setVariable("ROW_IMG", $icon);
1143 $a_tpl->setVariable("ROW_ALT", $alt);
1144 $a_tpl->parseCurrentBlock();
1145 $nbsp = false;
1146 }
1147
1148 if ($this->isActiveAdministrationPanel())
1149 {
1150 $a_tpl->setCurrentBlock("block_row_check");
1151 $a_tpl->setVariable("ITEM_ID", $a_item_ref_id);
1152 $a_tpl->parseCurrentBlock();
1153 $nbsp = false;
1154 }
1155 include_once('Services/Container/classes/class.ilContainerSortingSettings.php');
1156 if($this->isActiveAdministrationPanel() &&
1158 {
1159 $a_tpl->setCurrentBlock('block_position');
1160 $a_tpl->setVariable('POS_TYPE',$a_image_type);
1161 $a_tpl->setVariable('POS_ID',$a_item_ref_id);
1162 $a_tpl->setVariable('POSITION',sprintf('%.1f',$this->current_position++));
1163 $a_tpl->parseCurrentBlock();
1164 }
1165 if ($nbsp)
1166 {
1167 $a_tpl->setVariable("ROW_NBSP", " ");
1168 }
1169 $a_tpl->setCurrentBlock("container_standard_row");
1170 $a_tpl->setVariable("BLOCK_ROW_CONTENT", $a_html);
1171 $a_tpl->parseCurrentBlock();
1172 $a_tpl->touchBlock("container_row");
1173 }
sprintf('%.4f', $callTime)
static _lookupSortMode($a_obj_id)
lookup sort mode
static _lookupIconPath($a_id, $a_size="big")
lookup icon path
redirection script todo: (a better solution should control the processing via a xml file)

References $path, ilContainer\_lookupIconPath(), ilContainerSortingSettings\_lookupSortMode(), ilUtil\getImagePath(), isActiveAdministrationPanel(), ilContainer\SORT_MANUAL, and sprintf.

+ Here is the call graph for this function:

◆ addToDeskObject()

ilContainerGUI::addToDeskObject ( )
See also
ilDesktopItemHandling::addToDesk()

Implements ilDesktopItemHandling.

Definition at line 1389 of file class.ilContainerGUI.php.

1390 {
1391 global $ilSetting, $lng;
1392
1393 if((int)$ilSetting->get('disable_my_offers'))
1394 {
1395 return $this->renderObject();
1396 }
1397
1398 include_once './Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
1400 ilUtil::sendSuccess($lng->txt("added_to_desktop"));
1401 $this->renderObject();
1402 }
renderObject()
render the object
static addToDesktop()
Add desktop item @access public.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.

References $ilSetting, ilObjectGUI\$lng, ilDesktopItemGUI\addToDesktop(), renderObject(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ afterUpdate()

ilContainerGUI::afterUpdate ( )
protected

Post (successful) object update hook.

Reimplemented from ilObjectGUI.

Definition at line 106 of file class.ilContainerGUI.php.

107 {
108 // check if template is changed
109 include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
111 $this->object->getRefId()
112 );
113 $new_tpl_id = (int) $this->getDidacticTemplateVar('dtpl');
114
115 if($new_tpl_id != $current_tpl_id)
116 {
117 $_REQUEST['tplid'] = $new_tpl_id;
118
119 // redirect to didactic template confirmation
120 include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';
121 $this->ctrl->setReturn($this,'edit');
122 $this->ctrl->setCmdClass('ildidactictemplategui');
123 $this->ctrl->setCmd('confirmTemplateSwitch');
124 $dtpl_gui = new ilDidacticTemplateGUI($this);
125 return $this->ctrl->forwardCommand($dtpl_gui);
126 }
127 parent::afterUpdate();
128 }
GUI class for didactic template settings inside repository objects.
static lookupTemplateId($a_ref_id)
Lookup template id @global ilDB $ilDB.
getDidacticTemplateVar($a_type)
Get didactic template setting from creation screen.

References ilObjectGUI\getDidacticTemplateVar(), and ilDidacticTemplateObjSettings\lookupTemplateId().

Referenced by ilObjCategoryGUI\updateObject(), and ilObjCourseGUI\updateObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ allowBlocksConfigure()

ilContainerGUI::allowBlocksConfigure ( )

Standard is to allow blocks configuration.

Definition at line 2923 of file class.ilContainerGUI.php.

2924 {
2925 return true;
2926 }

◆ allowBlocksMoving()

ilContainerGUI::allowBlocksMoving ( )

Standard is to allow blocks moving.

Definition at line 2915 of file class.ilContainerGUI.php.

2916 {
2917 return true;
2918 }

◆ cancelMoveLinkObject()

ilContainerGUI::cancelMoveLinkObject ( )

Cancel move|link empty clipboard and return to parent.

Definition at line 2283 of file class.ilContainerGUI.php.

2284 {
2285 unset($_SESSION['clipboard']);
2286 $GLOBALS['ilCtrl']->returnToParent($this);
2287 }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.

References $_SESSION, and $GLOBALS.

◆ cancelPageContentObject()

ilContainerGUI::cancelPageContentObject ( )

Definition at line 983 of file class.ilContainerGUI.php.

984 {
985 $this->ctrl->redirect($this, "");
986 }

◆ clearAdminCommandsDetermination()

ilContainerGUI::clearAdminCommandsDetermination ( )

cleaer administration commands determination

Definition at line 1040 of file class.ilContainerGUI.php.

1041 {
1042 $this->adminCommands = false;
1043 }

◆ clearObject()

ilContainerGUI::clearObject ( )

clear clipboard and go back to last object

@access public

Definition at line 1859 of file class.ilContainerGUI.php.

1860 {
1861 unset($_SESSION["clipboard"]);
1862 unset($_SESSION["il_rep_clipboard"]);
1863
1864 //var_dump($this->getReturnLocation("clear",$this->ctrl->getLinkTarget($this)),get_class($this));
1865
1866 // only redirect if clipboard was cleared
1867 if (isset($_POST["cmd"]["clear"]))
1868 {
1869 ilUtil::sendSuccess($this->lng->txt("msg_clear_clipboard"),true);
1870 // fixed mantis 0018474: Clear Clipboard redirects to Subtab View, instead of Subtab "Edit Multiple"
1871 $this->ctrl->redirect($this, 'render');
1872 }
1873 }
$_POST["username"]

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

Referenced by pasteObject(), and performPasteIntoMultipleObjectsObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clipboardObject()

ilContainerGUI::clipboardObject ( )

show clipboard

Definition at line 2680 of file class.ilContainerGUI.php.

2681 {
2682 global $ilErr, $ilLog, $ilTabs, $tpl, $ilToolbar, $ilCtrl, $lng;
2683
2684 $ilTabs->activateTab("clipboard");
2685
2686 // function should not be called if clipboard is empty
2687 if (empty($_SESSION['clipboard']) or !is_array($_SESSION['clipboard']))
2688 {
2689 $message = sprintf('%s::clipboardObject(): Illegal access. Clipboard variable is empty!', get_class($this));
2690 $ilLog->write($message,$ilLog->FATAL);
2691 $ilErr->raiseError($this->lng->txt("permission_denied"),$ilErr->WARNING);
2692 }
2693
2694 $data = array();
2695 foreach($_SESSION["clipboard"]["ref_ids"] as $ref_id)
2696 {
2697 if(!$tmp_obj = ilObjectFactory::getInstanceByRefId($ref_id,false))
2698 {
2699 continue;
2700 }
2701
2702 $data[] = array(
2703 "type" => $tmp_obj->getType(),
2704 "type_txt" => $this->lng->txt("obj_".$tmp_obj->getType()),
2705 "title" => $tmp_obj->getTitle(),
2706 "cmd" => ($_SESSION["clipboard"]["cmd"] == "cut") ? $this->lng->txt("move") :$this->lng->txt($_SESSION["clipboard"]["cmd"]),
2707 "ref_id" => $ref_id,
2708 "obj_id" => $tmp_obj->getId()
2709 );
2710
2711 unset($tmp_obj);
2712 }
2713
2714 include_once("./Services/Object/classes/class.ilObjClipboardTableGUI.php");
2715 $tab = new ilObjClipboardTableGUI($this, "clipboard");
2716 $tab->setData($data);
2717 $tpl->setContent($tab->getHTML());
2718
2719 if (count($data) > 0)
2720 {
2721 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
2722 $ilToolbar->addFormButton($lng->txt("insert_object_here"),
2723 "paste");
2724 $ilToolbar->addFormButton($lng->txt("clear_clipboard"),
2725 "clear");
2726 }
2727
2728 return true;
2729 }
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
global $ilErr
Definition: raiseError.php:16

References $_SESSION, ilObjectGUI\$data, $ilCtrl, $ilErr, $ilLog, ilObjectGUI\$lng, ilObjectGUI\$ref_id, $tab, ilObjectGUI\$tpl, ilObjectFactory\getInstanceByRefId(), and sprintf.

+ Here is the call graph for this function:

◆ cloneAllObject()

ilContainerGUI::cloneAllObject ( )

Clone all object Overwritten method for copying container objects.

@access public

Reimplemented from ilObjectGUI.

Definition at line 3083 of file class.ilContainerGUI.php.

3084 {
3085 global $ilLog, $ilCtrl;
3086
3087 include_once('./Services/Link/classes/class.ilLink.php');
3088 include_once('Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
3089
3090 global $ilAccess,$ilErr,$rbacsystem,$tree,$ilUser;
3091
3092 $new_type = $_REQUEST['new_type'];
3093 $ref_id = (int) $_GET['ref_id'];
3094 $clone_source = (int) $_REQUEST['clone_source'];
3095
3096 if(!$rbacsystem->checkAccess('create', $ref_id,$new_type))
3097 {
3098 $ilErr->raiseError($this->lng->txt('permission_denied'));
3099 }
3100 if(!$clone_source)
3101 {
3102 ilUtil::sendFailure($this->lng->txt('select_one'));
3103 $this->createObject();
3104 return false;
3105 }
3106 if(!$ilAccess->checkAccess('write','', $clone_source,$new_type))
3107 {
3108 $ilErr->raiseError($this->lng->txt('permission_denied'));
3109 }
3110
3111 $options = $_POST['cp_options'] ? $_POST['cp_options'] : array();
3113 $result = $orig->cloneAllObject($_COOKIE['PHPSESSID'], $_COOKIE['ilClientId'], $new_type, $ref_id, $clone_source, $options);
3114
3115 include_once './Services/CopyWizard/classes/class.ilCopyWizardOptions.php';
3117 {
3118 ilUtil::sendSuccess($this->lng->txt("object_duplicated"),true);
3119 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $result['ref_id']);
3120 $ilCtrl->redirectByClass("ilrepositorygui", "");
3121 }
3122 else
3123 {
3124 ilUtil::sendInfo($this->lng->txt("object_copy_in_progress"),true);
3125 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $ref_id);
3126 $ilCtrl->redirectByClass("ilrepositorygui", "");
3127 }
3128 }
$_COOKIE['ilClientId']
Definition: BPMN2Parser.php:15
$result
$_GET["client_id"]
static _isFinished($a_copy_id)
check if copy is finished
createObject()
create new object form
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
if(!is_array($argv)) $options

References $_COOKIE, $_GET, $_POST, $ilCtrl, $ilErr, $ilLog, $ilUser, $options, $orig, ilObjectGUI\$ref_id, $result, ilObjectGUI\$tree, ilCopyWizardOptions\_isFinished(), ilObjectGUI\createObject(), ilObjectFactory\getInstanceByRefId(), ilUtil\sendFailure(), ilUtil\sendInfo(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ cloneNodes()

ilContainerGUI::cloneNodes (   $srcRef,
  $dstRef,
$mapping,
  $newName = null 
)

Recursively clones all nodes of the RBAC tree.

@access private

Parameters
integerref_id of source object
integerref_id of destination object
arraymapping new_ref_id => old_ref_id
stringthe new name of the copy (optional).
Returns
The ref_id pointing to the cloned object.

Definition at line 3162 of file class.ilContainerGUI.php.

3163 {
3164 global $tree;
3165 global $ilias;
3166
3167 // clone the source node
3168 $srcObj =& $ilias->obj_factory->getInstanceByRefId($srcRef);
3169 error_log(__METHOD__.' cloning srcRef='.$srcRef.' dstRef='.$dstRef.'...');
3170 $newRef = $srcObj->cloneObject($dstRef)->getRefId();
3171 error_log(__METHOD__.' ...cloning... newRef='.$newRef.'...');
3172
3173 // We must immediately apply a new name to the object, to
3174 // prevent confusion of WebDAV clients about having two objects with identical
3175 // name in the repository.
3176 if (! is_null($newName))
3177 {
3178 $newObj =& $ilias->obj_factory->getInstanceByRefId($newRef);
3179 $newObj->setTitle($newName);
3180 $newObj->update();
3181 unset($newObj);
3182 }
3183 unset($srcObj);
3184 $mapping[$newRef] = $srcRef;
3185
3186 // clone all children of the source node
3187 $children = $tree->getChilds($srcRef);
3188 foreach ($tree->getChilds($srcRef) as $child)
3189 {
3190 // Don't clone role folders, because it does not make sense to clone local roles
3191 // FIXME - Maybe it does make sense (?)
3192 if ($child["type"] != 'rolf')
3193 {
3194 $this->cloneNodes($child["ref_id"],$newRef,$mapping);
3195 }
3196 else
3197 {
3198 if (count($rolf = $tree->getChildsByType($newRef,"rolf")))
3199 {
3200 $mapping[$rolf[0]["ref_id"]] = $child["ref_id"];
3201 }
3202 }
3203 }
3204 error_log(__METHOD__.' ...cloned srcRef='.$srcRef.' dstRef='.$dstRef.' newRef='.$newRef);
3205 return $newRef;
3206 }
cloneNodes($srcRef, $dstRef, &$mapping, $newName=null)
Recursively clones all nodes of the RBAC tree.

References ilObjectGUI\$ilias, ilObjectGUI\$tree, cloneNodes(), and Monolog\Handler\error_log().

Referenced by cloneNodes(), and performPasteIntoMultipleObjectsObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cloneWizardPageListObject()

ilContainerGUI::cloneWizardPageListObject ( )

@access public

Parameters

Definition at line 2947 of file class.ilContainerGUI.php.

2948 {
2949 $this->cloneWizardPageObject(false);
2950 }
cloneWizardPageObject($a_tree_view=true)
Show clone wizard page for container objects.

References cloneWizardPageObject().

+ Here is the call graph for this function:

◆ cloneWizardPageObject()

ilContainerGUI::cloneWizardPageObject (   $a_tree_view = true)

Show clone wizard page for container objects.

@access public

Definition at line 2958 of file class.ilContainerGUI.php.

2959 {
2960 include_once('Services/CopyWizard/classes/class.ilCopyWizardPageFactory.php');
2961
2962 global $ilObjDataCache,$tree;
2963
2964 if(!$_REQUEST['clone_source'])
2965 {
2966 ilUtil::sendFailure($this->lng->txt('select_one'));
2967 if(isset($_SESSION['wizard_search_title']))
2968 {
2969 $this->searchCloneSourceObject();
2970 }
2971 else
2972 {
2973 $this->createObject();
2974 }
2975 return false;
2976 }
2977 $source_id = $_REQUEST['clone_source'];
2978 $new_type = $_REQUEST['new_type'];
2979 $this->ctrl->setParameter($this,'clone_source',(int) $_REQUEST['clone_source']);
2980 $this->ctrl->setParameter($this,'new_type',$new_type);
2981
2982
2983 // Generell JavaScript
2984 $this->tpl->addJavaScript('./Services/CopyWizard/js/ilContainer.js');
2985 $this->tpl->setVariable('BODY_ATTRIBUTES','onload="ilDisableChilds(\'cmd\');"');
2986
2987
2988 $this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.container_wizard_page.html',
2989 "Services/Container");
2990 $this->tpl->setVariable('FORMACTION',$this->ctrl->getFormAction($this));
2991 $this->tpl->setVariable('TYPE_IMG',ilUtil::getImagePath('icon_'.$new_type.'.svg'));
2992 $this->tpl->setVariable('ALT_IMG',$this->lng->txt('obj_'.$new_type));
2993 $this->tpl->setVariable('TXT_DUPLICATE',$this->lng->txt($new_type.'_wizard_page'));
2994 $this->tpl->setVariable('INFO_DUPLICATE',$this->lng->txt($new_type.'_copy_threads_info'));
2995 $this->tpl->setVariable('BTN_COPY',$this->lng->txt('obj_'.$new_type.'_duplicate'));
2996 $this->tpl->setVariable('BTN_BACK',$this->lng->txt('btn_back'));
2997 if(isset($_SESSION['wizard_search_title']))
2998 {
2999 $this->tpl->setVariable('CMD_BACK','searchCloneSource');
3000 }
3001 else
3002 {
3003 $this->tpl->setVariable('CMD_BACK','create');
3004 }
3005
3006 $this->tpl->setVariable('BTN_TREE',$this->lng->txt('treeview'));
3007 $this->tpl->setVariable('BTN_LIST',$this->lng->txt('flatview'));
3008
3009 // Fill item rows
3010 // tree view
3011 if($a_tree_view)
3012 {
3013 $first = true;
3014 $has_items = false;
3015 foreach($subnodes = $tree->getSubtree($source_node = $tree->getNodeData($source_id),true) as $node)
3016 {
3017 if($first == true)
3018 {
3019 $first = false;
3020 continue;
3021 }
3022
3023 if($node['type'] == 'rolf')
3024 {
3025 continue;
3026 }
3027
3028 $has_items = true;
3029
3030 for($i = $source_node['depth'];$i < $node['depth']; $i++)
3031 {
3032 $this->tpl->touchBlock('padding');
3033 $this->tpl->touchBlock('end_padding');
3034 }
3035 // fill options
3036 $copy_wizard_page = ilCopyWizardPageFactory::_getInstanceByType($source_id,$node['type']);
3037 $copy_wizard_page->fillTreeSelection($node['ref_id'],$node['type'],$node['depth']);
3038
3039 $this->tpl->setCurrentBlock('tree_row');
3040 $this->tpl->setVariable('TREE_IMG',ilUtil::getImagePath('icon_'.$node['type'].'.svg'));
3041 $this->tpl->setVariable('TREE_ALT_IMG',$this->lng->txt('obj_'.$node['type']));
3042 $this->tpl->setVariable('TREE_TITLE',$node['title']);
3043 $this->tpl->parseCurrentBlock();
3044 }
3045 if(!$has_items)
3046 {
3047 $this->tpl->setCurrentBlock('no_content');
3048 $this->tpl->setVariable('TXT_NO_CONTENT',$this->lng->txt('container_no_items'));
3049 $this->tpl->parseCurrentBlock();
3050 }
3051 else
3052 {
3053 $this->tpl->setCurrentBlock('tree_footer');
3054 $this->tpl->setVariable('TXT_COPY_ALL',$this->lng->txt('copy_all'));
3055 $this->tpl->setVariable('TXT_LINK_ALL',$this->lng->txt('link_all'));
3056 $this->tpl->setVariable('TXT_OMIT_ALL',$this->lng->txt('omit_all'));
3057 $this->tpl->parseCurrentBlock();
3058
3059 }
3060 }
3061 else
3062 {
3063 foreach($tree->getSubTreeTypes($source_id,array('rolf','crs')) as $type)
3064 {
3065 $copy_wizard_page = ilCopyWizardPageFactory::_getInstanceByType($source_id,$type);
3066 if(strlen($html = $copy_wizard_page->getWizardPageBlockHTML()))
3067 {
3068 $this->tpl->setCurrentBlock('obj_row');
3069 $this->tpl->setVariable('ITEM_BLOCK',$html);
3070 $this->tpl->parseCurrentBlock();
3071 }
3072 }
3073 }
3074 }
static _getInstanceByType($a_source_id, $a_item_type)
Get instance by type.
$html
Definition: example_001.php:87

References $_SESSION, $html, ilObjectGUI\$tree, ilCopyWizardPageFactory\_getInstanceByType(), ilObjectGUI\createObject(), ilUtil\getImagePath(), and ilUtil\sendFailure().

Referenced by cloneWizardPageListObject(), and cloneWizardPageTreeObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cloneWizardPageTreeObject()

ilContainerGUI::cloneWizardPageTreeObject ( )

@access public

Parameters

Definition at line 2935 of file class.ilContainerGUI.php.

2936 {
2937 $this->cloneWizardPageObject(true);
2938 }

References cloneWizardPageObject().

+ Here is the call graph for this function:

◆ confirmRemoveFromSystemObject()

ilContainerGUI::confirmRemoveFromSystemObject ( )

confirmation screen remove from system

Definition at line 3954 of file class.ilContainerGUI.php.

3955 {
3956 global $lng;
3957 include_once("./Services/Repository/classes/class.ilRepUtilGUI.php");
3958
3959 if(!isset($_POST["trash_id"]))
3960 {
3961 ilUtil::sendFailure($lng->txt("no_checkbox"), true);
3962 $this->ctrl->redirect($this, "trash");
3963 }
3964
3965 $ru = new ilRepUtilGUI($this);
3966 $ru->confirmRemoveFromSystemObject($_POST["trash_id"]);
3967 }
Repository GUI Utilities.

References $_POST, ilObjectGUI\$lng, and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ copyFile()

static ilContainerGUI::copyFile (   $obj_id,
  $title,
  $tmpdir 
)
staticprivate

Definition at line 1767 of file class.ilContainerGUI.php.

1768 {
1769 $newFilename = $tmpdir . DIRECTORY_SEPARATOR . ilUtil::getASCIIFilename($title);
1770
1771 // copy to temporary directory
1773 if (!copy($oldFilename, $newFilename))
1774 throw new ilFileException("Could not copy ".$oldFilename." to ".$newFilename);
1775
1776 touch($newFilename, filectime($oldFilename));
1777 }
Class to report exception.
static _lookupAbsolutePath($obj_id, $a_version=null)
return absolute path for version
static getASCIIFilename($a_filename)
convert utf8 to ascii filename

References ilObjectGUI\$obj_id, $title, ilObjFile\_lookupAbsolutePath(), and ilUtil\getASCIIFilename().

Referenced by downloadMultipleObjects(), and recurseFolder().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ copyObject()

ilContainerGUI::copyObject ( )

Copy object(s) out from a container and write the information to clipboard It is not possible to copy multiple objects at once.

@access public

Definition at line 1545 of file class.ilContainerGUI.php.

1546 {
1547 global $rbacsystem, $ilCtrl, $objDefinition;
1548
1549 if ($_GET["item_ref_id"] != "")
1550 {
1551 $_POST["id"] = array($_GET["item_ref_id"]);
1552 }
1553
1554 if (!isset($_POST["id"]))
1555 {
1556 $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
1557 }
1558
1559 // FOR ALL OBJECTS THAT SHOULD BE COPIED
1560 $containers = 0;
1561 foreach ($_POST["id"] as $ref_id)
1562 {
1563 // GET COMPLETE NODE_DATA OF ALL SUBTREE NODES
1564 $node_data = $this->tree->getNodeData($ref_id);
1565
1566 // count containers
1567 if ($objDefinition->isContainer($node_data["type"]))
1568 {
1569 $containers++;
1570 }
1571
1572 $subtree_nodes = $this->tree->getSubTree($node_data);
1573
1574 $all_node_data[] = $node_data;
1575 $all_subtree_nodes[] = $subtree_nodes;
1576
1577 // CHECK COPY PERMISSION OF ALL OBJECTS IN ACTUAL SUBTREE
1578 foreach ($subtree_nodes as $node)
1579 {
1580 if($node['type'] == 'rolf')
1581 {
1582 continue;
1583 }
1584
1585 if (!$rbacsystem->checkAccess('visible,read,copy',$node["ref_id"]))
1586 {
1587 $no_copy[] = $node["ref_id"];
1588 }
1589 }
1590 }
1591
1592 if ($containers > 0 && count($_POST["id"]) > 1)
1593 {
1594 $this->ilias->raiseError($this->lng->txt("cntr_container_only_on_their_own"), $this->ilias->error_obj->MESSAGE);
1595 }
1596
1597 // IF THERE IS ANY OBJECT WITH NO PERMISSION TO 'delete'
1598 if (count($no_copy))
1599 {
1600 $titles = array();
1601 foreach((array) $no_copy as $copy_id)
1602 {
1603 $titles[] = ilObject::_lookupTitle(ilObject::_lookupObjId($copy_id));
1604 }
1605 $this->ilias->raiseError(
1606 $this->lng->txt("msg_no_perm_copy") . " " . implode(',',$titles),
1607 $this->ilias->error_obj->MESSAGE);
1608 }
1609
1610 // if we have a single container, set it as source id and redirect to ilObjectCopyGUI
1611 if (count($_POST["id"]) == 1)
1612 {
1613 $ilCtrl->setParameterByClass("ilobjectcopygui", "source_id", $_POST["id"][0]);
1614 $ilCtrl->redirectByClass("ilobjectcopygui", "initTargetSelection");
1615 }
1616 else
1617 {
1618 $ilCtrl->setParameterByClass("ilobjectcopygui", "source_ids", implode($_POST["id"],"_"));
1619 $ilCtrl->redirectByClass("ilobjectcopygui", "initTargetSelection");
1620 }
1621
1622 $_SESSION["clipboard"]["parent"] = $_GET["ref_id"];
1623 $_SESSION["clipboard"]["cmd"] = $ilCtrl->getCmd();
1624 $_SESSION["clipboard"]["ref_ids"] = $_POST["id"];
1625
1626 ilUtil::sendInfo($this->lng->txt("msg_copy_clipboard"), true);
1627
1629 } // END COPY
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title

References $_GET, $_POST, $_SESSION, $ilCtrl, ilObjectGUI\$objDefinition, ilObjectGUI\$ref_id, ilObject\_lookupObjId(), ilObject\_lookupTitle(), initAndDisplayCopyIntoMultipleObjectsObject(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ createStyleObject()

ilContainerGUI::createStyleObject ( )

Create Style.

Definition at line 3371 of file class.ilContainerGUI.php.

3372 {
3373 global $ilCtrl;
3374
3375 $ilCtrl->redirectByClass("ilobjstylesheetgui", "create");
3376 }

References $ilCtrl.

◆ cutObject()

ilContainerGUI::cutObject ( )

cut object(s) out from a container and write the information to clipboard

@access public

Definition at line 1476 of file class.ilContainerGUI.php.

1477 {
1478 global $rbacsystem, $ilCtrl;
1479
1480 if ($_GET["item_ref_id"] != "")
1481 {
1482 $_POST["id"] = array($_GET["item_ref_id"]);
1483 }
1484
1485 //$this->ilias->raiseError("move operation does not work at the moment and is disabled",$this->ilias->error_obj->MESSAGE);
1486
1487 if (!isset($_POST["id"]))
1488 {
1489 $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
1490 }
1491
1492 // FOR ALL OBJECTS THAT SHOULD BE COPIED
1493 foreach ($_POST["id"] as $ref_id)
1494 {
1495 // GET COMPLETE NODE_DATA OF ALL SUBTREE NODES
1496 $node_data = $this->tree->getNodeData($ref_id);
1497 $subtree_nodes = $this->tree->getSubTree($node_data);
1498
1499 $all_node_data[] = $node_data;
1500 $all_subtree_nodes[] = $subtree_nodes;
1501
1502 // CHECK DELETE PERMISSION OF ALL OBJECTS IN ACTUAL SUBTREE
1503 foreach ($subtree_nodes as $node)
1504 {
1505 if($node['type'] == 'rolf')
1506 {
1507 continue;
1508 }
1509
1510 if (!$rbacsystem->checkAccess('delete',$node["ref_id"]))
1511 {
1512 $no_cut[] = $node["ref_id"];
1513 }
1514 }
1515 }
1516 // IF THERE IS ANY OBJECT WITH NO PERMISSION TO 'delete'
1517 if (count($no_cut))
1518 {
1519 $titles = array();
1520 foreach((array) $no_cut as $cut_id)
1521 {
1522 $titles[] = ilObject::_lookupTitle(ilObject::_lookupObjId($cut_id));
1523 }
1524 $this->ilias->raiseError(
1525 $this->lng->txt("msg_no_perm_cut")." ".implode(',',(array) $titles),
1526 $this->ilias->error_obj->MESSAGE
1527 );
1528 }
1529 $_SESSION["clipboard"]["parent"] = $_GET["ref_id"];
1530 $_SESSION["clipboard"]["cmd"] = $ilCtrl->getCmd();
1531 $_SESSION["clipboard"]["ref_ids"] = $_POST["id"];
1532
1533 ilUtil::sendInfo($this->lng->txt("msg_cut_clipboard"),true);
1534
1535 return $this->initAndDisplayMoveIntoObjectObject();
1536 } // END CUT

References $_GET, $_POST, $_SESSION, $ilCtrl, ilObjectGUI\$ref_id, ilObject\_lookupObjId(), ilObject\_lookupTitle(), initAndDisplayMoveIntoObjectObject(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ deleteStyleObject()

ilContainerGUI::deleteStyleObject ( )

Delete Style.

Definition at line 3391 of file class.ilContainerGUI.php.

3392 {
3393 global $ilCtrl;
3394
3395 $ilCtrl->redirectByClass("ilobjstylesheetgui", "delete");
3396 }

References $ilCtrl.

◆ disableAdministrationPanelObject()

ilContainerGUI::disableAdministrationPanelObject ( )

enable administration panel

Definition at line 1344 of file class.ilContainerGUI.php.

1345 {
1346 $_SESSION["il_cont_admin_panel"] = false;
1347 $this->ctrl->redirect($this, "render");
1348 }

References $_SESSION.

◆ downloadMultipleObjects()

ilContainerGUI::downloadMultipleObjects (   $a_ref_ids)
private

Definition at line 1683 of file class.ilContainerGUI.php.

1684 {
1685 global $lng, $rbacsystem, $ilAccess;
1686
1687 include_once 'Modules/Folder/classes/class.ilObjFolder.php';
1688 include_once 'Modules/File/classes/class.ilObjFile.php';
1689 include_once 'Modules/File/classes/class.ilFileException.php';
1690
1691 // create temporary file to download
1692 $zip = PATH_TO_ZIP;
1693 $tmpdir = ilUtil::ilTempnam();
1694 ilUtil::makeDir($tmpdir);
1695
1696 try
1697 {
1698 // copy each selected object
1699 foreach ($a_ref_ids as $ref_id)
1700 {
1701 if (!$ilAccess->checkAccess("read", "", $ref_id))
1702 continue;
1703
1705 continue;
1706
1707 // get object
1708 $object =& $this->ilias->obj_factory->getInstanceByRefId($ref_id);
1709 $obj_type = $object->getType();
1710 if ($obj_type == "fold")
1711 {
1712 // copy folder to temp directory
1713 self::recurseFolder($ref_id, $object->getTitle(), $tmpdir);
1714 }
1715 else if ($obj_type == "file")
1716 {
1717 // copy file to temp directory
1718 self::copyFile($object->getId(), $object->getTitle(), $tmpdir);
1719 }
1720 }
1721
1722 // compress the folder
1723 $deliverFilename = ilUtil::getAsciiFilename($this->object->getTitle()) . ".zip";
1724 $tmpzipfile = ilUtil::ilTempnam() . ".zip";
1725 ilUtil::zip($tmpdir, $tmpzipfile, true);
1726 ilUtil::delDir($tmpdir);
1727 ilUtil::deliverFile($tmpzipfile, $deliverFilename, '', false, true, true);
1728 }
1729 catch (ilFileException $e)
1730 {
1731 ilUtil::sendInfo($e->getMessage(), true);
1732 }
1733 }
static copyFile($obj_id, $title, $tmpdir)
static recurseFolder($refid, $title, $tmpdir)
private functions which iterates through all folders and files and create an according file structure...
static _isInTrash($a_ref_id)
checks wether object is in trash
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
static zip($a_dir, $a_file, $compress_content=false)
static ilTempnam($a_temp_path=null)
Create a temporary file in an ILIAS writable directory.
static deliverFile($a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...

References ilObjectGUI\$lng, ilObjectGUI\$object, ilObjectGUI\$ref_id, ilObject\_isInTrash(), copyFile(), ilUtil\delDir(), ilUtil\deliverFile(), ilUtil\ilTempnam(), ilUtil\makeDir(), recurseFolder(), ilUtil\sendInfo(), and ilUtil\zip().

Referenced by downloadObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ downloadObject()

ilContainerGUI::downloadObject ( )

Definition at line 1631 of file class.ilContainerGUI.php.

1632 {
1633 global $rbacsystem, $ilCtrl;
1634
1635 if ($_GET["item_ref_id"] != "")
1636 {
1637 $_POST["id"] = array($_GET["item_ref_id"]);
1638 }
1639
1640 if (!isset($_POST["id"]))
1641 {
1642 $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
1643 }
1644
1645 // FOR ALL OBJECTS THAT SHOULD BE DOWNLOADED
1646 foreach ($_POST["id"] as $ref_id)
1647 {
1648 $object =& $this->ilias->obj_factory->getInstanceByRefId($ref_id);
1649 $obj_type = $object->getType();
1650 if (!in_array($obj_type, array("fold", "file")))
1651 {
1652 $no_download[] = $object->getType();
1653 }
1654 else if (!$rbacsystem->checkAccess('read', $ref_id))
1655 {
1656 $no_perm[] = $ref_id;
1657 }
1658 }
1659
1660 // IF THERE IS ANY OBJECT THAT CANNOT BE DOWNLOADED
1661 if (count($no_download))
1662 {
1663 $no_download = array_unique($no_download);
1664 foreach ($no_download as $type)
1665 {
1666 $txt_objs[] = $this->lng->txt("objs_".$type);
1667 }
1668 $this->ilias->raiseError(implode(', ',$txt_objs)." ".$this->lng->txt("msg_obj_no_download"),$this->ilias->error_obj->MESSAGE);
1669 }
1670
1671 // NO ACCESS
1672 if (count($no_perm))
1673 {
1674 $this->ilias->raiseError(
1675 $this->lng->txt("msg_obj_perm_download")." ".implode(',',$no_perm),
1676 $this->ilias->error_obj->MESSAGE);
1677 }
1678
1679 // download the objects
1680 $this->downloadMultipleObjects($_POST["id"]);
1681 }
downloadMultipleObjects($a_ref_ids)

References $_GET, $_POST, $ilCtrl, ilObjectGUI\$object, ilObjectGUI\$ref_id, and downloadMultipleObjects().

+ Here is the call graph for this function:

◆ editOrderObject()

ilContainerGUI::editOrderObject ( )

Edit order.

Definition at line 1353 of file class.ilContainerGUI.php.

1354 {
1355 global $ilTabs;
1356
1357 $this->edit_order = true;
1358 $_SESSION["il_cont_admin_panel"] = false;
1359 $this->renderObject();
1360
1361 $ilTabs->activateSubTab("ordering");
1362 }

References $_SESSION, and renderObject().

+ Here is the call graph for this function:

◆ editPageContentObject()

ilContainerGUI::editPageContentObject ( )

edit page content (for repository root node and categories)

@access public

Definition at line 888 of file class.ilContainerGUI.php.

889 {
890 global $rbacsystem, $tpl, $lng, $ilCtrl;
891
892 if (!$rbacsystem->checkAccess("write", $this->ref_id))
893 {
894 $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
895 }
896
897 $xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
898 "xhtml_page");
899 if ($xpage_id > 0)
900 {
901 include_once("Services/XHTMLPage/classes/class.ilXHTMLPage.php");
902 $xpage = new ilXHTMLPage($xpage_id);
903 $content = $xpage->getContent();
904 }
905
906 // get template
907 $tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.container_edit_page_content.html",
908 "Services/Container");
909 $tpl->setVariable("VAL_CONTENT", ilUtil::prepareFormOutput($content));
910 $tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
911 $tpl->setVariable("TXT_EDIT_PAGE_CONTENT",
912 $this->lng->txt("edit_page_content"));
913 $tpl->setVariable("TXT_SAVE", $this->lng->txt("save"));
914 $tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
915 $tpl->setVariable("TXT_MIGRATION_INFO", $lng->txt("cntr_old_editor_warning"));
916 $tpl->setVariable("TXT_MIGRATION_OPEN_STD_EDITOR", $lng->txt("cntr_old_editor_open_standard_editor"));
917 $tpl->setVariable("IMG_WARNING", ilUtil::getImagePath("icon_alert.svg"));
918 $tpl->setVariable("HREF_OPEN_STD_EDITOR", $ilCtrl->getLinkTarget($this, "switchToStdEditor"));
919 $tpl->setVariable("ALT_WARNING", $lng->txt("warning"));
920
921 include_once("./Services/Form/classes/class.ilFormPropertyGUI.php");
922 include_once("./Services/Form/classes/class.ilTextAreaInputGUI.php");
923 //$ta = new ilTextAreaInputGUI();
924 //$tags = $ta->getRteTagSet("extended_table_img");
925
926 // add rte support
927 include_once "./Services/RTE/classes/class.ilRTE.php";
928 $rtestring = ilRTE::_getRTEClassname();
929 include_once "./Services/RTE/classes/class.$rtestring.php";
930 $rte = new $rtestring();
931 //$rte->addPlugin("latex");
932 include_once "./Services/Object/classes/class.ilObject.php";
934 $obj_type = ilObject::_lookupType($_GET["ref_id"], TRUE);
935 $rte->addRTESupport($obj_id, $obj_type);
936 //$rte->setStyleSelect(true);
937 //$rte->addCustomRTESupport($obj_id, $obj_type, $tags);
938 }
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=NULL)
Lookup a container setting.
static _lookupObjectId($a_ref_id)
lookup object id
static _lookupType($a_id, $a_reference=false)
lookup object type
static _getRTEClassname()
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public
XHTML Page class.

References $_GET, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$obj_id, ilObjectGUI\$tpl, ilRTE\_getRTEClassname(), ilContainer\_lookupContainerSetting(), ilObject\_lookupObjectId(), ilObject\_lookupType(), ilUtil\getImagePath(), and ilUtil\prepareFormOutput().

+ Here is the call graph for this function:

◆ editPageFrameObject()

ilContainerGUI::editPageFrameObject ( )

show page editor frameset

Definition at line 868 of file class.ilContainerGUI.php.

869 {
870 // old tiny stuff
871 $xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
872 "xhtml_page");
873 if ($xpage_id > 0 && $_SESSION["il_cntr_editor"] != "std")
874 {
875 $this->ctrl->redirect($this, "editPageContent");
876 }
877 else
878 {
879 $this->ctrl->redirectByClass(array("ilcontainerpagegui"), "edit");
880 }
881 }

References $_SESSION, and ilContainer\_lookupContainerSetting().

+ Here is the call graph for this function:

◆ editStyleObject()

ilContainerGUI::editStyleObject ( )

Edit Style.

Definition at line 3381 of file class.ilContainerGUI.php.

3382 {
3383 global $ilCtrl;
3384
3385 $ilCtrl->redirectByClass("ilobjstylesheetgui", "edit");
3386 }

References $ilCtrl.

◆ editStylePropertiesObject()

ilContainerGUI::editStylePropertiesObject ( )

Edit style properties.

Definition at line 3256 of file class.ilContainerGUI.php.

3257 {
3258 global $ilTabs, $tpl;
3259
3260 $this->checkPermission("write");
3261
3262 $this->initStylePropertiesForm();
3263 $tpl->setContent($this->form->getHTML());
3264
3265 $ilTabs->activateTab("obj_sty");
3266 }
initStylePropertiesForm()
Init style properties form.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.

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

+ Here is the call graph for this function:

◆ enableAdministrationPanelObject()

ilContainerGUI::enableAdministrationPanelObject ( )

enable administration panel

Definition at line 1335 of file class.ilContainerGUI.php.

1336 {
1337 $_SESSION["il_cont_admin_panel"] = true;
1338 $this->ctrl->redirect($this, "render");
1339 }

References $_SESSION.

◆ enableMultiDownloadObject()

ilContainerGUI::enableMultiDownloadObject ( )

Definition at line 1422 of file class.ilContainerGUI.php.

1423 {
1424 $this->multi_download_enabled = true;
1425 $this->renderObject();
1426 }

References renderObject().

+ Here is the call graph for this function:

◆ executeCommand()

ilContainerGUI::executeCommand ( )

execute command note: this method is overwritten in all container objects

Reimplemented from ilObjectGUI.

Reimplemented in ilObjCategoryGUI, ilObjCourseGUI, ilObjFolderGUI, ilObjGroupGUI, ilObjOrgUnitGUI, ilObjRootFolderGUI, ilObjStudyProgrammeGUI, and ilObjRecoveryFolderGUI.

Definition at line 52 of file class.ilContainerGUI.php.

53 {
54 global $tpl;
55
56 $next_class = $this->ctrl->getNextClass();
57 $cmd = $this->ctrl->getCmd("render");
58
59 switch($next_class)
60 {
61 // page editing
62 case "ilcontainerpagegui":
63 if ($_GET["redirectSource"] != "ilinternallinkgui")
64 {
65 $ret = $this->forwardToPageObject();
66 $tpl->setContent($ret);
67 }
68 else
69 {
70 return "";
71 }
72 break;
73
74 case "ilobjstylesheetgui":
75 $this->forwardToStyleSheet();
76 break;
77
78 default:
79 $this->prepareOutput();
80 $cmd .= "Object";
81 $this->$cmd();
82 break;
83 }
84 return true;
85 }
& forwardToPageObject()
forward command to page object
prepareOutput($a_show_subobjects=true)
prepare output
forwardToStyleSheet()
Forward to style object.
$ret
Definition: parser.php:6
$cmd
Definition: sahs_server.php:35

References $_GET, $cmd, $ret, ilObjectGUI\$tpl, forwardToPageObject(), forwardToStyleSheet(), and prepareOutput().

+ Here is the call graph for this function:

◆ fileManagerLaunchObject()

ilContainerGUI::fileManagerLaunchObject ( )
protected

Launch jnlp.

Definition at line 3621 of file class.ilContainerGUI.php.

3622 {
3623 global $ilUser;
3624
3625 $tpl = new ilTemplate('tpl.fm_launch_ws.html',false,false,'Services/WebServices/FileManager');
3626 $tpl->setVariable('JNLP_URL',ILIAS_HTTP_PATH.'/Services/WebServices/FileManager/lib/dist/FileManager.jnlp');
3627 $tpl->setVariable('SESSION_ID', $_COOKIE['PHPSESSID'].'::'.CLIENT_ID);
3628 $tpl->setVariable('UID',$ilUser->getId());
3629 $tpl->setVariable('REF_ID', $this->object->getRefId());
3630 $tpl->setVariable('WSDL_URI', ILIAS_HTTP_PATH.'/webservice/soap/server.php?wsdl');
3631 $tpl->setVariable('LOCAL_FRAME', ilFMSettings::getInstance()->isLocalFSEnabled() ? 1 : 0);
3632 $tpl->setVariable('REST_URI',ILIAS_HTTP_PATH.'/Services/WebServices/Rest/server.php');
3633 $tpl->setVariable('FILE_LOCKS',0);
3634 $tpl->setVariable('UPLOAD_FILESIZE', ilFMSettings::getInstance()->getMaxFileSize());
3635
3636 include_once("./Modules/SystemFolder/classes/class.ilObjSystemFolder.php");
3637 $header_top_title = ilObjSystemFolder::_getHeaderTitle();
3638 $tpl->setVariable('HEADER_TITLE',$header_top_title ? $header_top_title : '');
3639 echo $tpl->get();
3640 exit;
3641 }
static getInstance()
Get singleton instance.
special template class to simplify handling of ITX/PEAR

References $_COOKIE, $ilUser, ilObjectGUI\$tpl, exit, and ilFMSettings\getInstance().

+ Here is the call graph for this function:

◆ forwardToPageObject()

& ilContainerGUI::forwardToPageObject ( )

forward command to page object

Definition at line 171 of file class.ilContainerGUI.php.

172 {
173 global $lng, $ilTabs, $ilCtrl;
174
175 $cmd = $ilCtrl->getCmd();
176
177 if (in_array($cmd, array("displayMediaFullscreen", "downloadFile", "displayMedia")))
178 {
179 $this->checkPermission("read");
180 }
181 else
182 {
183 $this->checkPermission("write");
184 }
185
186 $ilTabs->clearTargets();
187
188 if ($_GET["redirectSource"] == "ilinternallinkgui")
189 {
190 exit;
191 }
192
193 $xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
194 "xhtml_page");
195 if ($xpage_id > 0)
196 {
197 $ilTabs->setBackTarget($lng->txt("cntr_back_to_old_editor"),
198 $ilCtrl->getLinkTarget($this, "switchToOldEditor"), "_top");
199 }
200 else
201 {
202 $ilTabs->setBackTarget($lng->txt("back"), "./goto.php?target=".$this->object->getType()."_".
203 $this->object->getRefId(), "_top");
204 }
205
206 // page object
207 include_once("./Services/Container/classes/class.ilContainerPage.php");
208 include_once("./Services/Container/classes/class.ilContainerPageGUI.php");
209
210 $lng->loadLanguageModule("content");
211
212 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
213 $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
214 ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
215 $this->tpl->setCurrentBlock("SyntaxStyle");
216 $this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
218 $this->tpl->parseCurrentBlock();
219
220 if (!ilContainerPage::_exists("cont",
221 $this->object->getId()))
222 {
223 // doesn't exist -> create new one
224 $new_page_object = new ilContainerPage();
225 $new_page_object->setParentId($this->object->getId());
226 $new_page_object->setId($this->object->getId());
227 $new_page_object->createFromXML();
228 }
229
230 // get page object
231 $this->ctrl->setReturnByClass("ilcontainerpagegui", "edit");
232 $page_gui = new ilContainerPageGUI($this->object->getId());
233 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
235 $this->object->getStyleSheetId(), $this->object->getType()));
236
237 $page_gui->setTemplateTargetVar("ADM_CONTENT");
238 $page_gui->setFileDownloadLink("");
239 $page_gui->setFullscreenLink($this->ctrl->getLinkTarget($this, "showMediaFullscreen"));
240 //$page_gui->setLinkParams($this->ctrl->getUrlParameterString()); // todo
241 $page_gui->setPresentationTitle("");
242 $page_gui->setTemplateOutput(false);
243
244 // old editor information text
245 $xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
246 "xhtml_page");
247 if ($xpage_id > 0)
248 {
249 $wtpl = new ilTemplate("tpl.cntr_old_editor_message.html", true,
250 true, "Services/Container");
251 $wtpl->setVariable("ALT_WARNING", $lng->txt("warning"));
252 $wtpl->setVariable("IMG_WARNING",
253 ilUtil::getImagePath("icon_alert.svg"));
254 $wtpl->setVariable("TXT_MIGRATION_INFO", $lng->txt("cntr_switch_to_new_editor_message"));
255 $wtpl->setVariable("TXT_MIGRATION_INFO", $lng->txt("cntr_switch_to_new_editor_message"));
256 $wtpl->setVariable("HREF_SWITCH_TO_NEW_EDITOR",
257 $ilCtrl->getLinkTarget($this, "useNewEditor"));
258 $wtpl->setVariable("TXT_MIGRATION_SWITCH",
259 $lng->txt("cntr_switch_to_new_editor_cmd"));
260 $page_gui->setPrependingHtml($wtpl->get());
261 }
262
263 // style tab
264 $page_gui->setTabHook($this, "addPageTabs");
265
266 $ret = $this->ctrl->forwardCommand($page_gui);
267
268 //$ret =& $page_gui->executeCommand();
269 return $ret;
270 }
Container page GUI class.
Container page object.
static getSyntaxStylePath()
get syntax style path
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
static getContentStylePath($a_style_id)
get content style path
static _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.

References $_GET, $cmd, $ilCtrl, ilObjectGUI\$lng, $ret, ilPageObject\_exists(), ilContainer\_lookupContainerSetting(), ilObjectGUI\checkPermission(), exit, ilObjStyleSheet\getContentStylePath(), ilObjStyleSheet\getEffectiveContentStyleId(), ilUtil\getImagePath(), and ilObjStyleSheet\getSyntaxStylePath().

Referenced by ilObjCategoryGUI\executeCommand(), ilObjCourseGUI\executeCommand(), ilObjFolderGUI\executeCommand(), ilObjGroupGUI\executeCommand(), ilObjRootFolderGUI\executeCommand(), and executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ forwardToStyleSheet()

ilContainerGUI::forwardToStyleSheet ( )

Forward to style object.

Definition at line 134 of file class.ilContainerGUI.php.

135 {
136 global $ilCtrl, $ilTabs;
137
138 $ilTabs->clearTargets();
139
140 $cmd = $ilCtrl->getCmd();
141 include_once ("./Services/Style/Content/classes/class.ilObjStyleSheetGUI.php");
142 $this->ctrl->setReturn($this, "editStyleProperties");
143 $style_gui = new ilObjStyleSheetGUI("", $this->object->getStyleSheetId(), false, false);
144 $style_gui->omitLocator();
145 if ($cmd == "create" || $_GET["new_type"]=="sty")
146 {
147 $style_gui->setCreationMode(true);
148 }
149
150 if ($cmd == "confirmedDelete")
151 {
152 $this->object->setStyleSheetId(0);
153 $this->object->update();
154 }
155
156 $ret = $this->ctrl->forwardCommand($style_gui);
157
158 if ($cmd == "save" || $cmd == "copyStyle" || $cmd == "importStyle")
159 {
160 $style_id = $ret;
161 $this->object->setStyleSheetId($style_id);
162 $this->object->update();
163 $this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
164 }
165 }
Class ilObjStyleSheetGUI.

References $_GET, $cmd, $ilCtrl, and $ret.

Referenced by ilObjCategoryGUI\executeCommand(), ilObjCourseGUI\executeCommand(), ilObjFolderGUI\executeCommand(), ilObjGroupGUI\executeCommand(), ilObjRootFolderGUI\executeCommand(), and executeCommand().

+ Here is the caller graph for this function:

◆ getAllNestedCategories()

ilContainerGUI::getAllNestedCategories (   $ref_id)

Definition at line 766 of file class.ilContainerGUI.php.

767 {
768 $categories = $this->tree->getChildsByType($ref_id, "cat");
769 // outsourcing to a variable to enable increasing the value when elements are added during iteration
770 $num_categories = count($categories);
771 // using a for loop instead of a foreach loop to enable adding elements during iteration by increasing the comparison value (num_categories)
772 for ($i = 0; $i < $num_categories; $i ++)
773 {
774 $category_ref_id = $categories[$i]["ref_id"];
775 // determining if there are categories directly nested within the current category
776 $new_categories = $this->tree->getChildsByType($category_ref_id, "cat");
777 if ($new_categories != NULL)
778 {
779 foreach ($new_categories as $new_category)
780 {
781 // adding the newly found categories to the end of the array so that they may be searched for directly nested categories too
782 array_push($categories, $new_category);
783 // recounting the amount of elements in the category array so that the iteration can continue despite elements being added
784 $num_categories = count($categories);
785 }
786 }
787 }
788 return $categories;
789 }

References ilObjectGUI\$ref_id.

Referenced by getAllNestedFiles().

+ Here is the caller graph for this function:

◆ getAllNestedFiles()

ilContainerGUI::getAllNestedFiles (   $ref_id)
private

Get all files that are nested in the category whose ref_id is passed to this function or are nested in its subcategories Required for fixing mantis bug 0021272.

Parameters
int$ref_id
Returns
array

Definition at line 736 of file class.ilContainerGUI.php.

736 {
737 $files = array();
738 // get sibling files
739 $sibling_files = $this->tree->getChildsByType($ref_id, "file");
740 // add sibling files to file array
741 foreach ($sibling_files as $sibling_course)
742 {
743 array_push($files, $sibling_course);
744 }
745 // get child files (nested inside directories)
746 $categories = $this->getAllNestedCategories($ref_id);
747 foreach ($categories as $category)
748 {
749 $category_ref_id = $category["ref_id"];
750 $nested_files = $this->tree->getChildsByType($category_ref_id, "file");
751 // add nested files to file array
752 foreach ($nested_files as $nested_course)
753 {
754 array_push($files, $nested_course);
755 }
756 }
757 return $files;
758 }
$files
Definition: add-vimline.php:18

References $files, ilObjectGUI\$ref_id, and getAllNestedCategories().

Referenced by showAdministrationPanel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAsynchItemListObject()

ilContainerGUI::getAsynchItemListObject ( )

Get item list command drop down asynchronously.

Definition at line 3420 of file class.ilContainerGUI.php.

3421 {
3422 global $ilCtrl;
3423
3424 $ref_id = $_GET["cmdrefid"];
3427
3428 // this should be done via container-object->getSubItem in the future
3429 $data = array("child" => $ref_id, "ref_id" => $ref_id, "obj_id" => $obj_id,
3430 "type" => $type);
3431 include_once 'Services/Object/classes/class.ilObjectListGUIFactory.php';
3432 $item_list_gui = ilObjectListGUIFactory::_getListGUIByType($type);
3433 $item_list_gui->setContainerObject($this);
3434
3435 $item_list_gui->enableComments(true);
3436 $item_list_gui->enableNotes(true);
3437 $item_list_gui->enableTags(true);
3438
3439 $this->modifyItemGUI($item_list_gui, $data, false);
3440 $html = $item_list_gui->getListItemHTML($ref_id,
3441 $obj_id, "", "", true, true);
3442
3443 // include plugin slot for async item list
3444 global $ilPluginAdmin;
3445 $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
3446 foreach ($pl_names as $pl)
3447 {
3448 $ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
3449 $gui_class = $ui_plugin->getUIClassInstance();
3450 $resp = $gui_class->getHTML("Services/Container", "async_item_list", array("html" => $html));
3451 if ($resp["mode"] != ilUIHookPluginGUI::KEEP)
3452 {
3453 $html = $gui_class->modifyHTML($html, $resp);
3454 }
3455 }
3456
3457 echo $html;
3458 exit;
3459 }
const IL_COMP_SERVICE
modifyItemGUI($a_item_list_gui, $a_item_data, $a_show_path)
Modify list gui for presentation in container @global type $lng.
static _getListGUIByType($a_type, $a_context=ilObjectListGUI::CONTEXT_REPOSITORY)
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.

References $_GET, ilObjectGUI\$data, $html, $ilCtrl, ilObjectGUI\$obj_id, ilObjectGUI\$ref_id, ilObjectListGUIFactory\_getListGUIByType(), ilObject\_lookupObjId(), ilObject\_lookupType(), exit, ilPluginAdmin\getPluginObject(), IL_COMP_SERVICE, ilUIHookPluginGUI\KEEP, and modifyItemGUI().

+ Here is the call graph for this function:

◆ getContainerPageHTML()

ilContainerGUI::getContainerPageHTML ( )

Get container page HTML.

Definition at line 286 of file class.ilContainerGUI.php.

287 {
288 global $ilSetting, $ilUser;
289
290 if (!$ilSetting->get("enable_cat_page_edit"))
291 {
292 return;
293 }
294
295 // old page editor content
296 $xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
297 "xhtml_page");
298 if ($xpage_id > 0)
299 {
300 include_once("Services/XHTMLPage/classes/class.ilXHTMLPage.php");
301 $xpage = new ilXHTMLPage($xpage_id);
302 return $xpage->getContent();
303 }
304
305
306 // page object
307
308
309 // if page does not exist, return nothing
310 include_once("./Services/COPage/classes/class.ilPageUtil.php");
312 $this->object->getId()))
313 {
314 return "";
315 }
316 include_once("./Services/Container/classes/class.ilContainerPage.php");
317 include_once("./Services/Container/classes/class.ilContainerPageGUI.php");
318
319 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
320 $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
321 ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
322 $this->tpl->setCurrentBlock("SyntaxStyle");
323 $this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
325 $this->tpl->parseCurrentBlock();
326
327 // get page object
328 include_once("./Services/Object/classes/class.ilObjectTranslation.php");
329 $ot = ilObjectTranslation::getInstance($this->object->getId());
330 $lang = $ot->getEffectiveContentLang($ilUser->getCurrentLanguage(), "cont");
331 $page_gui = new ilContainerPageGUI($this->object->getId(), 0, $lang);
332 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
334 $this->object->getStyleSheetId(), $this->object->getType()));
335
336 $page_gui->setPresentationTitle("");
337 $page_gui->setTemplateOutput(false);
338 $page_gui->setHeader("");
339 $ret = $page_gui->showPage();
340
341 //$ret = "<div style='background-color: white; padding:5px; margin-bottom: 30px;'>".$ret."</div>";
342
343 //$ret =& $page_gui->executeCommand();
344 return $ret;
345 }
static getInstance($a_obj_id)
Get instance.
static _existsAndNotEmpty($a_parent_type, $a_id, $a_lang="-")
checks whether page exists and is not empty (may return true on some empty pages)
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
Definition: langwiz.php:349

References $ilSetting, $ilUser, $lang, $ret, ilPageUtil\_existsAndNotEmpty(), ilContainer\_lookupContainerSetting(), ilObjStyleSheet\getContentStylePath(), ilObjStyleSheet\getEffectiveContentStyleId(), ilObjectTranslation\getInstance(), and ilObjStyleSheet\getSyntaxStylePath().

+ Here is the call graph for this function:

◆ getContentGUI()

ilContainerGUI::getContentGUI ( )

Get content gui object.

Parameters

return

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

439 {
440 switch ($this->object->getViewMode())
441 {
442 // all items in one block
444 include_once("./Services/Container/classes/class.ilContainerSimpleContentGUI.php");
445 $container_view = new ilContainerSimpleContentGUI($this);
446 break;
447
449 include_once('./Services/Container/classes/class.ilContainerObjectiveGUI.php');
450 $container_view = new ilContainerObjectiveGUI($this);
451 break;
452
453 // all items in one block
455 case IL_CRS_VIEW_TIMING: // not nice this workaround
456 include_once("./Services/Container/classes/class.ilContainerSessionsContentGUI.php");
457 $container_view = new ilContainerSessionsContentGUI($this);
458 break;
459
460 // all items in one block
462 default:
463 include_once("./Services/Container/classes/class.ilContainerByTypeContentGUI.php");
464 $container_view = new ilContainerByTypeContentGUI($this);
465 break;
466 }
467
468 return $container_view;
469 }
const IL_CRS_VIEW_TIMING
GUI class for course objective view.

References IL_CRS_VIEW_TIMING, ilContainer\VIEW_BY_TYPE, ilContainer\VIEW_OBJECTIVE, ilContainer\VIEW_SESSIONS, and ilContainer\VIEW_SIMPLE.

Referenced by redrawListItemObject(), and renderObject().

+ Here is the caller graph for this function:

◆ getEditFormValues()

ilContainerGUI::getEditFormValues ( )
protected

Get values for edit form.

Returns
array

Reimplemented from ilObjectGUI.

Reimplemented in ilObjCategoryGUI, ilObjCourseGUI, and ilObjRootFolderGUI.

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

93 {
94 $values = parent::getEditFormValues();
95
96 include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
97 $values['didactic_type'] =
98 'dtpl_'.ilDidacticTemplateObjSettings::lookupTemplateId($this->object->getRefId());
99
100 return $values;
101 }

Referenced by ilObjFolderGUI\editObject().

+ Here is the caller graph for this function:

◆ getTabs()

ilContainerGUI::getTabs ( )

common tabs for all container objects (should be called at the end of child getTabs() method

Reimplemented from ilObjectGUI.

Reimplemented in ilObjCategoryGUI, ilObjCourseGUI, ilObjFolderGUI, ilObjGroupGUI, ilObjOrgUnitGUI, ilObjRootFolderGUI, and ilObjStudyProgrammeGUI.

Definition at line 1302 of file class.ilContainerGUI.php.

1303 {
1304 global $rbacsystem, $ilCtrl;
1305
1306 // edit permissions
1307 if ($rbacsystem->checkAccess('edit_permission',$this->ref_id))
1308 {
1309 $this->tabs_gui->addTarget("perm_settings",
1310 $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"),
1311 array("perm","info","owner"), 'ilpermissiongui');
1312 if ($ilCtrl->getNextClass() == "ilpermissiongui")
1313 {
1314 $this->tabs_gui->activateTab("perm_settings");
1315 }
1316 }
1317
1318 // show clipboard
1319 if (strtolower($_GET["baseClass"]) == "ilrepositorygui" && !empty($_SESSION["clipboard"]))
1320 {
1321 $this->tabs_gui->addTarget("clipboard",
1322 $this->ctrl->getLinkTarget($this, "clipboard"), "clipboard", get_class($this));
1323 }
1324
1325 }

References $_GET, $_SESSION, and $ilCtrl.

◆ getTreeSelectorGUI()

ilContainerGUI::getTreeSelectorGUI (   $cmd)
protected
Parameters
$cmdstring
Returns
ilTreeExplorerGUI

Reimplemented in ilObjOrgUnitGUI.

Definition at line 3973 of file class.ilContainerGUI.php.

3974 {
3975 include_once("./Services/Repository/classes/class.ilRepositorySelectorExplorerGUI.php");
3976 $exp = new ilRepositorySelectorExplorerGUI($this, "showPasteTree");
3977 // TODO: The study programme 'prg' is not included here, as the
3978 // ilRepositorySelectorExplorerGUI only handles static rules for
3979 // parent-child-relations and not the dynamic relationsships
3980 // required for the SP (see #16909).
3981 $exp->setTypeWhiteList(array("root", "cat", "grp", "crs", "fold"));
3982 if ($cmd == "link") {
3983 $exp->setSelectMode("nodes", true);
3984 return $exp;
3985 } else {
3986 $exp->setSelectMode("nodes[]", false);
3987 return $exp;
3988 }
3989 }
Explorer for selecting repository items.

References $cmd.

Referenced by showPasteTreeObject().

+ Here is the caller graph for this function:

◆ initAndDisplayCopyIntoMultipleObjectsObject()

ilContainerGUI::initAndDisplayCopyIntoMultipleObjectsObject ( )

Definition at line 2299 of file class.ilContainerGUI.php.

2300 {
2301 global $tree;
2302
2303 // empty session on init
2304 $_SESSION['paste_copy_repexpand'] = array();
2305
2306 // copy opend nodes from repository explorer
2307 $_SESSION['paste_copy_repexpand'] = is_array($_SESSION['repexpand']) ? $_SESSION['repexpand'] : array();
2308
2309 // open current position
2310 $path = $tree->getPathId((int)$_GET['ref_id']);
2311 foreach((array)$path as $node_id)
2312 {
2313 if(!in_array($node_id, $_SESSION['paste_copy_repexpand']))
2314 $_SESSION['paste_copy_repexpand'][] = $node_id;
2315 }
2316
2317 return $this->showPasteTreeObject();
2318 }
showPasteTreeObject()
Show paste tree.

References $_GET, $_SESSION, $path, ilObjectGUI\$tree, and showPasteTreeObject().

Referenced by copyObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initAndDisplayLinkIntoMultipleObjectsObject()

ilContainerGUI::initAndDisplayLinkIntoMultipleObjectsObject ( )

Definition at line 2151 of file class.ilContainerGUI.php.

2152 {
2153 global $tree;
2154
2155 // empty session on init
2156 $_SESSION['paste_linked_repexpand'] = array();
2157
2158 // copy opend nodes from repository explorer
2159 $_SESSION['paste_linked_repexpand'] = is_array($_SESSION['repexpand']) ? $_SESSION['repexpand'] : array();
2160
2161 // open current position
2162 $path = $tree->getPathId((int)$_GET['ref_id']);
2163 foreach((array)$path as $node_id)
2164 {
2165 if(!in_array($node_id, $_SESSION['paste_linked_repexpand']))
2166 $_SESSION['paste_linked_repexpand'][] = $node_id;
2167 }
2168
2169 return $this->showPasteTreeObject();
2170 }

References $_GET, $_SESSION, $path, ilObjectGUI\$tree, and showPasteTreeObject().

Referenced by linkObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initAndDisplayMoveIntoObjectObject()

ilContainerGUI::initAndDisplayMoveIntoObjectObject ( )

Definition at line 2368 of file class.ilContainerGUI.php.

2369 {
2370 global $tree;
2371
2372 // empty session on init
2373 $_SESSION['paste_cut_repexpand'] = array();
2374
2375 // copy opend nodes from repository explorer
2376 $_SESSION['paste_cut_repexpand'] = is_array($_SESSION['repexpand']) ? $_SESSION['repexpand'] : array();
2377
2378 // open current position
2379 $path = $tree->getPathId((int)$_GET['ref_id']);
2380 foreach((array)$path as $node_id)
2381 {
2382 if(!in_array($node_id, $_SESSION['paste_cut_repexpand']))
2383 $_SESSION['paste_cut_repexpand'][] = $node_id;
2384 }
2385
2386 return $this->showPasteTreeObject();
2387 }

References $_GET, $_SESSION, $path, ilObjectGUI\$tree, and showPasteTreeObject().

Referenced by cutObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initFormPasswordInstruction()

ilContainerGUI::initFormPasswordInstruction ( )
protected

Init password form.

Returns

Definition at line 3492 of file class.ilContainerGUI.php.

3493 {
3494 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
3495 $this->form = new ilPropertyFormGUI();
3496 $this->form->setFormAction($this->ctrl->getFormAction($this));
3497
3498 // new password
3499 $ipass = new ilPasswordInputGUI($this->lng->txt("desired_password"), "new_password");
3500 $ipass->setRequired(true);
3501
3502 $this->form->addItem($ipass);
3503 $this->form->addCommandButton("savePassword", $this->lng->txt("save"));
3504 $this->form->addCommandButton('cancel', $this->lng->txt('cancel'));
3505
3506 $this->form->setTitle($this->lng->txt("chg_ilias_and_webfolder_password"));
3507 $this->form->setFormAction($this->ctrl->getFormAction($this));
3508
3509 return $this->form;
3510 }
This class represents a password property in a property form.
This class represents a property form user interface.

Referenced by savePasswordObject(), and showPasswordInstructionObject().

+ Here is the caller graph for this function:

◆ initHeaderAction()

ilContainerGUI::initHeaderAction (   $a_sub_type = null,
  $a_sub_id = null 
)
protected

Add file manager link.

Parameters
<type>$a_sub_type
<type>$a_sub_id

Reimplemented from ilObjectGUI.

Reimplemented in ilObjCourseGUI, and ilObjGroupGUI.

Definition at line 3601 of file class.ilContainerGUI.php.

3602 {
3603 $lg = parent::initHeaderAction($a_sub_type, $a_sub_id);
3604
3605 // begin-patch fm
3606 include_once './Services/WebServices/FileManager/classes/class.ilFMSettings.php';
3607 if(ilFMSettings::getInstance()->isEnabled())
3608 {
3609 if($lg instanceof ilObjectListGUI)
3610 {
3611 $lg->addCustomCommand($this->ctrl->getLinkTarget($this,'fileManagerLaunch'), 'fm_start','_blank');
3612 }
3613 }
3614 // end-patch fm
3615 return $lg;
3616 }
Class ilObjectListGUI.
$lg
Definition: example_018.php:62

References $lg, and ilFMSettings\getInstance().

+ Here is the call graph for this function:

◆ initManualSortingOptionForm()

ilContainerGUI::initManualSortingOptionForm ( ilContainerSortingSettings  $settings,
  $element,
  $a_prefix,
  $a_sorting_settings 
)
protected

Add manual sorting options.

Definition at line 3810 of file class.ilContainerGUI.php.

3812 {
3813 $position = new ilRadioGroupInputGUI($this->lng->txt('sorting_new_items_position'),$a_prefix.'_new_items_position');
3814 $position->setValue($settings->getSortNewItemsPosition());
3815 $position->setRequired(TRUE);
3816
3817 //new items insert on top
3818 $new_top = new ilRadioOption(
3819 $this->lng->txt('sorting_new_items_at_top'),
3821 );
3822
3823 $position->addOption($new_top);
3824
3825 //new items insert at bottom
3826 $new_bottom = new ilRadioOption(
3827 $this->lng->txt('sorting_new_items_at_bottom'),
3829 );
3830
3831 $position->addOption($new_bottom);
3832
3833 $element->addSubItem($position);
3834
3835 $order = new ilRadioGroupInputGUI($this->lng->txt('sorting_new_items_order'),$a_prefix.'_new_items_order');
3836 $order->setValue($settings->getSortNewItemsOrder());
3837 $order->setRequired(TRUE);
3838
3839 if(in_array(ilContainer::SORT_TITLE, $a_sorting_settings))
3840 {
3841 //new items sort in alphabetical order
3842 $new_title = new ilRadioOption(
3843 $this->lng->txt('sorting_title_header'),
3845 );
3846
3847 $order->addOption($new_title);
3848 }
3849
3850 if(in_array(ilContainer::SORT_CREATION, $a_sorting_settings))
3851 {
3852 //new items sort by creation date
3853 $new_creation = new ilRadioOption(
3854 $this->lng->txt('sorting_creation_header'),
3856 );
3857
3858 $order->addOption($new_creation);
3859 }
3860
3861
3862 if(in_array(ilContainer::SORT_ACTIVATION, $a_sorting_settings))
3863 {
3864 //new items by activation
3865 $new_activation = new ilRadioOption(
3866 $this->lng->txt('crs_sort_activation'),
3868 );
3869
3870 $order->addOption($new_activation);
3871 }
3872
3873 $element->addSubItem($order);
3874
3875 $this->initSortingDirectionForm($settings,$element,'manual');
3876
3877 return $element;
3878 }
initSortingDirectionForm(ilContainerSortingSettings $sorting_settings, $element, $a_prefix)
Add sorting direction.
const SORT_NEW_ITEMS_ORDER_ACTIVATION
const SORT_NEW_ITEMS_ORDER_TITLE
const SORT_NEW_ITEMS_ORDER_CREATION
const SORT_NEW_ITEMS_POSITION_BOTTOM
const SORT_NEW_ITEMS_POSITION_TOP
This class represents a property in a property form.
This class represents an option in a radio group.

References ilContainerSortingSettings\getSortNewItemsOrder(), ilContainerSortingSettings\getSortNewItemsPosition(), initSortingDirectionForm(), ilContainer\SORT_ACTIVATION, ilContainer\SORT_CREATION, ilContainer\SORT_NEW_ITEMS_ORDER_ACTIVATION, ilContainer\SORT_NEW_ITEMS_ORDER_CREATION, ilContainer\SORT_NEW_ITEMS_ORDER_TITLE, ilContainer\SORT_NEW_ITEMS_POSITION_BOTTOM, ilContainer\SORT_NEW_ITEMS_POSITION_TOP, and ilContainer\SORT_TITLE.

Referenced by initSortingForm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initSortingDirectionForm()

ilContainerGUI::initSortingDirectionForm ( ilContainerSortingSettings  $sorting_settings,
  $element,
  $a_prefix 
)
protected

Add sorting direction.

Parameters
ilFormPropertyGUI$element

Definition at line 3772 of file class.ilContainerGUI.php.

3773 {
3774 if($a_prefix == 'manual')
3775 {
3776 $txt = $this->lng->txt('sorting_new_items_direction');
3777 }
3778 else
3779 {
3780 $txt = $this->lng->txt('sorting_direction');
3781 }
3782
3783 $direction = new ilRadioGroupInputGUI($txt,$a_prefix.'_sorting_direction');
3784 $direction->setValue($sorting_settings->getSortDirection());
3785 $direction->setRequired(TRUE);
3786
3787 // asc
3788 $asc = new ilRadioOption(
3789 $this->lng->txt('sorting_asc'),
3791 );
3792 $direction->addOption($asc);
3793
3794 // desc
3795 $desc = new ilRadioOption(
3796 $this->lng->txt('sorting_desc'),
3798 );
3799 $direction->addOption($desc);
3800
3801 $element->addSubItem($direction);
3802
3803 return $element;
3804 }
const SORT_DIRECTION_DESC
const SORT_DIRECTION_ASC
$txt
Definition: error.php:12

References $txt, ilContainerSortingSettings\getSortDirection(), ilContainer\SORT_DIRECTION_ASC, and ilContainer\SORT_DIRECTION_DESC.

Referenced by initManualSortingOptionForm(), and initSortingForm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initSortingForm()

ilContainerGUI::initSortingForm ( ilPropertyFormGUI  $form,
array  $a_sorting_settings 
)
protected

Append sorting settings to property form.

Parameters
ilPropertyFormGUI$form
type$a_sorting_settings

Definition at line 3697 of file class.ilContainerGUI.php.

3698 {
3699 include_once('Services/Container/classes/class.ilContainerSortingSettings.php');
3700 include_once './Services/Container/classes/class.ilContainer.php';
3701
3702 $settings = new ilContainerSortingSettings($this->object->getId());
3703 $sort = new ilRadioGroupInputGUI($this->lng->txt('sorting_header'), "sorting");
3704
3705 if(in_array(ilContainer::SORT_INHERIT, $a_sorting_settings))
3706 {
3707 $sort_inherit = new ilRadioOption();
3708 $sort_inherit->setTitle(
3709 $this->lng->txt('sort_inherit_prefix').
3710 ' ('.ilContainerSortingSettings::sortModeToString(
3712 $this->object->getId())).') '
3713 );
3714 $sort_inherit->setValue(ilContainer::SORT_INHERIT);
3715 $sort_inherit->setInfo($this->lng->txt('sorting_info_inherit'));
3716 $sort->addOption($sort_inherit);
3717 }
3718 if(in_array(ilContainer::SORT_TITLE,$a_sorting_settings))
3719 {
3720 $sort_title = new ilRadioOption(
3721 $this->lng->txt('sorting_title_header'),
3723 );
3724 $sort_title->setInfo($this->lng->txt('sorting_info_title'));
3725
3726 $this->initSortingDirectionForm($settings,$sort_title,'title');
3727 $sort->addOption($sort_title);
3728 }
3729 if(in_array(ilContainer::SORT_CREATION, $a_sorting_settings))
3730 {
3731 $sort_activation = new ilRadioOption($this->lng->txt('sorting_creation_header'),ilContainer::SORT_CREATION);
3732 $sort_activation->setInfo($this->lng->txt('sorting_creation_info'));
3733 $this->initSortingDirectionForm($settings,$sort_activation,'creation');
3734 $sort->addOption($sort_activation);
3735 }
3736 if(in_array(ilContainer::SORT_ACTIVATION, $a_sorting_settings))
3737 {
3738 $sort_activation = new ilRadioOption($this->lng->txt('crs_sort_activation'),ilContainer::SORT_ACTIVATION);
3739 $sort_activation->setInfo($this->lng->txt('crs_sort_timing_info'));
3740 $this->initSortingDirectionForm($settings,$sort_activation,'activation');
3741 $sort->addOption($sort_activation);
3742 }
3743 if(in_array(ilContainer::SORT_MANUAL, $a_sorting_settings))
3744 {
3745 $sort_manual = new ilRadioOption(
3746 $this->lng->txt('sorting_manual_header'),
3748 );
3749 $sort_manual->setInfo($this->lng->txt('sorting_info_manual'));
3750 $this->initManualSortingOptionForm($settings, $sort_manual, "manual", $a_sorting_settings);
3751 $sort->addOption($sort_manual);
3752 }
3753
3754 // Handle moved containers and there possibly invalid values
3755 if(in_array($settings->getSortMode(), $a_sorting_settings))
3756 {
3757 $sort->setValue($settings->getSortMode());
3758 }
3759 else
3760 {
3761 $sort->setValue(ilContainer::SORT_TITLE);
3762 }
3763 $form->addItem($sort);
3764
3765 return $form;
3766 }
initManualSortingOptionForm(ilContainerSortingSettings $settings, $element, $a_prefix, $a_sorting_settings)
Add manual sorting options.
static lookupSortModeFromParentContainer($a_obj_id)
Lookup sort mode from parent container.
addItem($a_item)
Add Item (Property, SectionHeader).

References ilPropertyFormGUI\addItem(), initManualSortingOptionForm(), initSortingDirectionForm(), ilContainerSortingSettings\lookupSortModeFromParentContainer(), ilContainer\SORT_ACTIVATION, ilContainer\SORT_CREATION, ilContainer\SORT_INHERIT, ilContainer\SORT_MANUAL, and ilContainer\SORT_TITLE.

Referenced by ilObjFolderGUI\initEditCustomForm(), ilObjCategoryGUI\initEditForm(), ilObjCourseGUI\initEditForm(), ilObjRootFolderGUI\initEditForm(), and ilObjGroupGUI\initForm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initStylePropertiesForm()

ilContainerGUI::initStylePropertiesForm ( )

Init style properties form.

Definition at line 3271 of file class.ilContainerGUI.php.

3272 {
3273 global $ilCtrl, $lng, $ilTabs, $ilSetting, $tpl;
3274
3275 $tpl->setTreeFlatIcon("", "");
3276 $ilTabs->clearTargets();
3277 $xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
3278 "xhtml_page");
3279 if ($xpage_id > 0)
3280 {
3281 $ilTabs->setBackTarget($lng->txt("cntr_back_to_old_editor"),
3282 $ilCtrl->getLinkTarget($this, "switchToOldEditor"), "_top");
3283 }
3284 else
3285 {
3286 $ilTabs->setBackTarget($lng->txt("back"), "./goto.php?target=".$this->object->getType()."_".
3287 $this->object->getRefId(), "_top");
3288 }
3289
3290 include_once("./Services/Container/classes/class.ilContainerPageGUI.php");
3291 $page_gui = new ilContainerPageGUI($this->object->getId());
3292 $style_id = $this->object->getStyleSheetId();
3293 if (ilObject::_lookupType($style_id) == "sty")
3294 {
3295 $page_gui->setStyleId($style_id);
3296 }
3297 else
3298 {
3299 $style_id = 0;
3300 }
3301 $page_gui->setTabHook($this, "addPageTabs");
3302 $ilCtrl->getHTML($page_gui);
3303 $ilTabs->setTabActive("obj_sty");
3304
3305 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
3306 $lng->loadLanguageModule("style");
3307
3308 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
3309 $this->form = new ilPropertyFormGUI();
3310
3311 $fixed_style = $ilSetting->get("fixed_content_style_id");
3312// $style_id = $this->object->getStyleSheetId();
3313
3314 if ($fixed_style > 0)
3315 {
3316 $st = new ilNonEditableValueGUI($lng->txt("wiki_current_style"));
3317 $st->setValue(ilObject::_lookupTitle($fixed_style)." (".
3318 $this->lng->txt("global_fixed").")");
3319 $this->form->addItem($st);
3320 }
3321 else
3322 {
3323 $st_styles = ilObjStyleSheet::_getStandardStyles(true, false,
3324 $_GET["ref_id"]);
3325
3326 $st_styles[0] = $this->lng->txt("default");
3327 ksort($st_styles);
3328
3329 if ($style_id > 0)
3330 {
3331 // individual style
3332 if (!ilObjStyleSheet::_lookupStandard($style_id))
3333 {
3334 $st = new ilNonEditableValueGUI($lng->txt("style_current_style"));
3335 $st->setValue(ilObject::_lookupTitle($style_id));
3336 $this->form->addItem($st);
3337
3338//$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "edit"));
3339
3340 // delete command
3341 $this->form->addCommandButton("editStyle",
3342 $lng->txt("style_edit_style"));
3343 $this->form->addCommandButton("deleteStyle",
3344 $lng->txt("style_delete_style"));
3345//$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "delete"));
3346 }
3347 }
3348
3349 if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id))
3350 {
3351 $style_sel = ilUtil::formSelect ($style_id, "style_id",
3352 $st_styles, false, true);
3353 $style_sel = new ilSelectInputGUI($lng->txt("style_current_style"), "style_id");
3354 $style_sel->setOptions($st_styles);
3355 $style_sel->setValue($style_id);
3356 $this->form->addItem($style_sel);
3357//$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "create"));
3358 $this->form->addCommandButton("saveStyleSettings",
3359 $lng->txt("save"));
3360 $this->form->addCommandButton("createStyle",
3361 $lng->txt("sty_create_ind_style"));
3362 }
3363 }
3364 $this->form->setTitle($lng->txt("obj_sty"));
3365 $this->form->setFormAction($ilCtrl->getFormAction($this));
3366 }
This class represents a non editable value in a property form.
static _lookupStandard($a_id)
Lookup standard flag.
static _getStandardStyles($a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
This class represents a selection list property in a property form.
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.

References $_GET, $ilCtrl, $ilSetting, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObjStyleSheet\_getStandardStyles(), ilContainer\_lookupContainerSetting(), ilObjStyleSheet\_lookupStandard(), ilObject\_lookupTitle(), ilObject\_lookupType(), and ilUtil\formSelect().

Referenced by editStylePropertiesObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isActiveAdministrationPanel()

ilContainerGUI::isActiveAdministrationPanel ( )

Definition at line 2863 of file class.ilContainerGUI.php.

2864 {
2865 global $ilAccess;
2866
2867 // #10081
2868 if($_SESSION["il_cont_admin_panel"] &&
2869 $this->object->getRefId() &&
2870 !$ilAccess->checkAccess("write", "", $this->object->getRefId()))
2871 {
2872 return false;
2873 }
2874
2875 return $_SESSION["il_cont_admin_panel"];
2876 }

References $_SESSION.

Referenced by addStandardContainerSubTabs(), addStandardRow(), renderObject(), setColumnSettings(), ilObjCourseGUI\setContentSubTabs(), setPageEditorTabs(), and showAdministrationPanel().

+ Here is the caller graph for this function:

◆ isActiveItemOrdering()

ilContainerGUI::isActiveItemOrdering ( )

Check if item ordering is enabled.

Returns
bool

Definition at line 1377 of file class.ilContainerGUI.php.

1378 {
1379 if($this->isActiveOrdering())
1380 {
1381 return (ilContainerSortingSettings::_lookupSortMode($this->object->getId()) == ilContainer::SORT_MANUAL);
1382 }
1383 return false;
1384 }
isActiveOrdering()
Check if ordering is enabled.

References ilContainerSortingSettings\_lookupSortMode(), isActiveOrdering(), and ilContainer\SORT_MANUAL.

+ Here is the call graph for this function:

◆ isActiveOrdering()

ilContainerGUI::isActiveOrdering ( )

Check if ordering is enabled.

Returns
bool

Definition at line 1368 of file class.ilContainerGUI.php.

1369 {
1370 return $this->edit_order ? true : false;
1371 }

Referenced by isActiveItemOrdering(), and showAdministrationPanel().

+ Here is the caller graph for this function:

◆ isMultiDownloadEnabled()

ilContainerGUI::isMultiDownloadEnabled ( )

Definition at line 1428 of file class.ilContainerGUI.php.

1429 {
1431 }

References $multi_download_enabled.

Referenced by showAdministrationPanel().

+ Here is the caller graph for this function:

◆ keepObjectsInClipboardObject()

ilContainerGUI::keepObjectsInClipboardObject ( )

Keep objects in the clipboard.

Definition at line 2292 of file class.ilContainerGUI.php.

2293 {
2294 ilUtil::sendSuccess($this->lng->txt("obj_inserted_clipboard"), true);
2295 $GLOBALS['ilCtrl']->returnToParent($this);
2296 }

References $GLOBALS, and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ linkObject()

ilContainerGUI::linkObject ( )

create an new reference of an object in tree it's like a hard link of unix

@access public

Definition at line 1785 of file class.ilContainerGUI.php.

1786 {
1787 global $clipboard, $rbacsystem, $rbacadmin, $ilCtrl;
1788
1789 if ($_GET["item_ref_id"] != "")
1790 {
1791 $_POST["id"] = array($_GET["item_ref_id"]);
1792 }
1793
1794 if (!isset($_POST["id"]))
1795 {
1796 $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
1797 }
1798
1799 // CHECK ACCESS
1800 foreach ($_POST["id"] as $ref_id)
1801 {
1802 if (!$rbacsystem->checkAccess('delete',$ref_id))
1803 {
1804 $no_cut[] = $ref_id;
1805 }
1806
1807 $object =& $this->ilias->obj_factory->getInstanceByRefId($ref_id);
1808
1809 if (!$this->objDefinition->allowLink($object->getType()))
1810 {
1811 $no_link[] = $object->getType();
1812 }
1813 }
1814
1815 // NO ACCESS
1816 if (count($no_cut))
1817 {
1818 $this->ilias->raiseError($this->lng->txt("msg_no_perm_link")." ".
1819 implode(',',$no_cut),$this->ilias->error_obj->MESSAGE);
1820 }
1821
1822 if (count($no_link))
1823 {
1824 //#12203
1825 $this->ilias->raiseError($this->lng->txt("msg_obj_no_link"),$this->ilias->error_obj->MESSAGE);
1826
1827 //$this->ilias->raiseError($this->lng->txt("msg_not_possible_link")." ".
1828 // implode(',',$no_link),$this->ilias->error_obj->MESSAGE);
1829 }
1830
1831 // WRITE TO CLIPBOARD
1832 $clipboard["parent"] = $_GET["ref_id"];
1833 $clipboard["cmd"] = $ilCtrl->getCmd();
1834
1835 foreach ($_POST["id"] as $ref_id)
1836 {
1837 $clipboard["ref_ids"][] = $ref_id;
1838 }
1839
1840 $_SESSION["clipboard"] = $clipboard;
1841
1842 $suffix = 'p';
1843 if(count($clipboard["ref_ids"]) == 1)
1844 {
1845 $suffix = 's';
1846 }
1847 ilUtil::sendInfo($this->lng->txt("msg_link_clipboard_" . $suffix),true);
1848
1850
1851 } // END LINK

References $_GET, $_POST, $_SESSION, $ilCtrl, ilObjectGUI\$object, ilObjectGUI\$ref_id, initAndDisplayLinkIntoMultipleObjectsObject(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ lockObject()

ilContainerGUI::lockObject ( )

Definition at line 1434 of file class.ilContainerGUI.php.

1435 {
1436 global $tree, $ilUser, $rbacsystem;
1437
1438 if (!$rbacsystem->checkAccess("write",$_GET['item_ref_id']))
1439 {
1440 $this->ilErr->raiseError($this->lng->txt('err_no_permission'),$this->ilErr->MESSAGE);
1441 }
1442
1443
1444 require_once ('Services/WebDAV/classes/class.ilDAVActivationChecker.php');
1446 {
1447 require_once 'Services/WebDAV/classes/class.ilDAVServer.php';
1449 {
1450 require_once 'Services/WebDAV/classes/class.ilDAVLocks.php';
1451 $locks = new ilDAVLocks();
1452
1453 $result = $locks->lockRef($_GET['item_ref_id'],
1454 $ilUser->getId(), $ilUser->getLogin(),
1455 'ref_'.$_GET['item_ref_id'].'_usr_'.$ilUser->getId(),
1456 time() + /*30*24*60**/60, 0, 'exclusive'
1457 );
1458
1460 $this->lng->txt(
1461 ($result === true) ? 'object_locked' : $result
1462 ),
1463 true);
1464 }
1465 }
1466 $this->renderObject();
1467 }
static _isActionsVisible()
Static getter.

References $_GET, $ilUser, $result, ilObjectGUI\$tree, ilDAVServer\_isActionsVisible(), ilDAVActivationChecker\_isActive(), renderObject(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ modifyItemGUI()

ilContainerGUI::modifyItemGUI (   $a_item_list_gui,
  $a_item_data,
  $a_show_path 
)

Modify list gui for presentation in container @global type $lng.

Parameters
type$a_item_list_gui
type$a_item_data
type$a_show_path

Reimplemented in ilObjCourseGUI, ilObjFolderGUI, and ilObjGroupGUI.

Definition at line 3216 of file class.ilContainerGUI.php.

3217 {
3218 global $lng;
3219
3220 if($a_show_path)
3221 {
3222 $a_item_list_gui->addCustomProperty($lng->txt('path'),
3223 ilContainer::buildPath($a_item_data['ref_id'], $this->object->getRefId()),
3224 false, true);
3225 }
3226 }

References ilObjectGUI\$lng.

Referenced by getAsynchItemListObject().

+ Here is the caller graph for this function:

◆ newBlockTemplate()

& ilContainerGUI::newBlockTemplate ( )

determin admin commands

returns a new list block template

@access private

Returns
object block template

Definition at line 1072 of file class.ilContainerGUI.php.

1073 {
1074 $tpl = new ilTemplate("tpl.container_list_block.html", true, true,
1075 "Services/Container");
1076 $this->cur_row_type = "row_type_1";
1077 return $tpl;
1078 }

References ilObjectGUI\$tpl.

◆ pasteObject()

ilContainerGUI::pasteObject ( )

paste object from clipboard to current place Depending on the chosen command the object(s) are linked, copied or moved

@access public

Definition at line 2444 of file class.ilContainerGUI.php.

2445 {
2446 global $rbacsystem, $rbacadmin, $rbacreview, $log,$tree;
2447 global $ilUser, $lng, $ilCtrl;
2448
2449 // BEGIN ChangeEvent: Record paste event.
2450 require_once('Services/Tracking/classes/class.ilChangeEvent.php');
2451 // END ChangeEvent: Record paste event.
2452
2453//var_dump($_SESSION["clipboard"]);exit;
2454 if (!in_array($_SESSION["clipboard"]["cmd"],array("cut","link","copy")))
2455 {
2456 $message = get_class($this)."::pasteObject(): cmd was neither 'cut','link' or 'copy'; may be a hack attempt!";
2457 $this->ilias->raiseError($message,$this->ilias->error_obj->WARNING);
2458 }
2459
2460 // this loop does all checks
2461 foreach ($_SESSION["clipboard"]["ref_ids"] as $ref_id)
2462 {
2463 $obj_data =& $this->ilias->obj_factory->getInstanceByRefId($ref_id);
2464
2465 // CHECK ACCESS
2466 if (!$rbacsystem->checkAccess('create',$this->object->getRefId(), $obj_data->getType()))
2467 {
2468 $no_paste[] = $ref_id;
2469 $no_paste_titles[] = $obj_data->getTitle();
2470 }
2471
2472 // CHECK IF REFERENCE ALREADY EXISTS
2473 if ($this->object->getRefId() == $this->tree->getParentId($obj_data->getRefId()))
2474 {
2475 $exists[] = $ref_id;
2476 break;
2477 }
2478
2479 // CHECK IF PASTE OBJECT SHALL BE CHILD OF ITSELF
2480 if ($this->tree->isGrandChild($ref_id,$this->object->getRefId()))
2481 {
2483 }
2484
2485 if ($ref_id == $this->object->getRefId())
2486 {
2488 }
2489
2490 // CHECK IF OBJECT IS ALLOWED TO CONTAIN PASTED OBJECT AS SUBOBJECT
2491 $obj_type = $obj_data->getType();
2492
2493 if (!in_array($obj_type, array_keys($this->object->getPossibleSubObjects())))
2494 {
2495 $not_allowed_subobject[] = $obj_data->getType();
2496 }
2497 }
2498
2500 // process checking results
2501 // BEGIN WebDAV: Copying an object into the same container is allowed
2502 if (count($exists) && $_SESSION["clipboard"]["cmd"] != "copy")
2503 // END WebDAV: Copying an object into the same container is allowed
2504 {
2505 $this->ilias->raiseError($this->lng->txt("msg_obj_exists"),$this->ilias->error_obj->MESSAGE);
2506 }
2507
2508 if (count($is_child))
2509 {
2510 $this->ilias->raiseError($this->lng->txt("msg_not_in_itself")." ".implode(',',$is_child),
2511 $this->ilias->error_obj->MESSAGE);
2512 }
2513
2514 if (count($not_allowed_subobject))
2515 {
2516 $this->ilias->raiseError($this->lng->txt("msg_may_not_contain")." ".implode(',',$not_allowed_subobject),
2517 $this->ilias->error_obj->MESSAGE);
2518 }
2519
2520 if (count($no_paste))
2521 {
2522 $this->ilias->raiseError($this->lng->txt("msg_no_perm_paste")." ".
2523 implode(',',$no_paste),$this->ilias->error_obj->MESSAGE);
2524 }
2525
2526 // log pasteObject call
2527 $log->write("ilObjectGUI::pasteObject(), cmd: ".$_SESSION["clipboard"]["cmd"]);
2528
2530 // everything ok: now paste the objects to new location
2531
2532 // to prevent multiple actions via back/reload button
2533 $ref_ids = $_SESSION["clipboard"]["ref_ids"];
2534 unset($_SESSION["clipboard"]["ref_ids"]);
2535
2536 // BEGIN WebDAV: Support a copy command in the repository
2537 // process COPY command
2538 if ($_SESSION["clipboard"]["cmd"] == "copy")
2539 {
2540 unset($_SESSION["clipboard"]["cmd"]);
2541
2542 // new implementation, redirects to ilObjectCopyGUI
2543 if (count($ref_ids) == 1)
2544 {
2545 $ilCtrl->setParameterByClass("ilobjectcopygui", "target", $this->object->getRefId());
2546 $ilCtrl->setParameterByClass("ilobjectcopygui", "source_id", $ref_ids[0]);
2547 $ilCtrl->redirectByClass("ilobjectcopygui", "saveTarget");
2548 }
2549 else
2550 {
2551 $ilCtrl->setParameterByClass("ilobjectcopygui", "target", $this->object->getRefId());
2552 $ilCtrl->setParameterByClass("ilobjectcopygui", "source_ids", implode($ref_ids, "_"));
2553 $ilCtrl->redirectByClass("ilobjectcopygui", "saveTarget");
2554 }
2555
2556
2557
2558 /* old implementation
2559
2560 foreach($ref_ids as $ref_id)
2561 {
2562 $revIdMapping = array();
2563
2564 $oldNode_data = $tree->getNodeData($ref_id);
2565 if ($oldNode_data['parent'] == $this->object->getRefId())
2566 {
2567 require_once 'Modules/File/classes/class.ilObjFileAccess.php';
2568 $newTitle = ilObjFileAccess::_appendNumberOfCopyToFilename($oldNode_data['title'],null);
2569 $newRef = $this->cloneNodes($ref_id, $this->object->getRefId(), $refIdMapping, $newTitle);
2570 }
2571 else
2572 {
2573 $newRef = $this->cloneNodes($ref_id, $this->object->getRefId(), $refIdMapping, null);
2574 }
2575
2576 // BEGIN ChangeEvent: Record copy event.
2577 $old_parent_data = $tree->getParentNodeData($ref_id);
2578 $newNode_data = $tree->getNodeData($newRef);
2579 ilChangeEvent::_recordReadEvent($oldNode_data['type'], $ref_id,
2580 $oldNode_data['obj_id'], $ilUser->getId());
2581 ilChangeEvent::_recordWriteEvent($newNode_data['obj_id'], $ilUser->getId(), 'add',
2582 $this->object->getId());
2583 ilChangeEvent::_catchupWriteEvents($newNode_data['obj_id'], $ilUser->getId());
2584 // END ChangeEvent: Record copy event.
2585 }*/
2586
2587 $log->write("ilObjectGUI::pasteObject(), copy finished");
2588 }
2589 // END WebDAV: Support a Copy command in the repository
2590
2591 // process CUT command
2592 if ($_SESSION["clipboard"]["cmd"] == "cut")
2593 {
2594
2595 foreach($ref_ids as $ref_id)
2596 {
2597 // Store old parent
2598 $old_parent = $tree->getParentId($ref_id);
2599 $this->tree->moveTree($ref_id,$this->object->getRefId());
2600 $rbacadmin->adjustMovedObjectPermissions($ref_id,$old_parent);
2601
2602 include_once('./Services/AccessControl/classes/class.ilConditionHandler.php');
2604
2605 // BEGIN ChangeEvent: Record cut event.
2606 $node_data = $tree->getNodeData($ref_id);
2607 $old_parent_data = $tree->getNodeData($old_parent);
2608 ilChangeEvent::_recordWriteEvent($node_data['obj_id'], $ilUser->getId(), 'remove',
2609 $old_parent_data['obj_id']);
2610 ilChangeEvent::_recordWriteEvent($node_data['obj_id'], $ilUser->getId(), 'add',
2611 $this->object->getId());
2612 ilChangeEvent::_catchupWriteEvents($node_data['obj_id'], $ilUser->getId());
2613 // END PATCH ChangeEvent: Record cut event.
2614 }
2615 } // END CUT
2616
2617 // process LINK command
2618 if ($_SESSION["clipboard"]["cmd"] == "link")
2619 {
2620 foreach ($ref_ids as $ref_id)
2621 {
2622 // get node data
2623 $top_node = $this->tree->getNodeData($ref_id);
2624
2625 // get subnodes of top nodes
2626 $subnodes[$ref_id] = $this->tree->getSubtree($top_node);
2627 }
2628
2629 // now move all subtrees to new location
2630 foreach ($subnodes as $key => $subnode)
2631 {
2632 // first paste top_node....
2633 $obj_data =& $this->ilias->obj_factory->getInstanceByRefId($key);
2634 $new_ref_id = $obj_data->createReference();
2635 $obj_data->putInTree($_GET["ref_id"]);
2636 $obj_data->setPermissions($_GET["ref_id"]);
2637
2638 // BEGIN ChangeEvent: Record link event.
2639 $node_data = $tree->getNodeData($new_ref_id);
2640 ilChangeEvent::_recordWriteEvent($node_data['obj_id'], $ilUser->getId(), 'add',
2641 $this->object->getId());
2642 ilChangeEvent::_catchupWriteEvents($node_data['obj_id'], $ilUser->getId());
2643 // END PATCH ChangeEvent: Record link event.
2644 }
2645
2646 $log->write("ilObjectGUI::pasteObject(), link finished");
2647
2648 } // END LINK
2649
2650 // save cmd for correct message output after clearing the clipboard
2651 $last_cmd = $_SESSION["clipboard"]["cmd"];
2652
2653
2654 // clear clipboard
2655 $this->clearObject();
2656
2657 if ($last_cmd == "cut")
2658 {
2659 ilUtil::sendSuccess($this->lng->txt("msg_cut_copied"),true);
2660 }
2661 // BEGIN WebDAV: Support a copy command in repository
2662 else if ($last_cmd == "copy")
2663 {
2664 ilUtil::sendSuccess($this->lng->txt("msg_cloned"),true);
2665 }
2666 else if ($last_cmd == 'link')
2667 // END WebDAV: Support copy command in repository
2668 {
2669 ilUtil::sendSuccess($this->lng->txt("msg_linked"),true);
2670 }
2671
2672 $this->ctrl->returnToParent($this);
2673
2674 } // END PASTE
static _catchupWriteEvents($obj_id, $usr_id, $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
static _recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
static _adjustMovedObjectConditions($a_ref_id)
In the moment it is not allowed to create preconditions on objects that are located outside of a cour...
clearObject()
clear clipboard and go back to last object

References $_GET, $_SESSION, $ilCtrl, $ilUser, ilObjectGUI\$lng, $log, ilObjectGUI\$ref_id, ilObjectGUI\$tree, ilConditionHandler\_adjustMovedObjectConditions(), ilChangeEvent\_catchupWriteEvents(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilChangeEvent\_recordWriteEvent(), clearObject(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ performPasteIntoMultipleObjectsObject()

ilContainerGUI::performPasteIntoMultipleObjectsObject ( )

Definition at line 1875 of file class.ilContainerGUI.php.

1876 {
1877 global $rbacsystem, $rbacadmin, $rbacreview, $log, $tree, $ilObjDataCache, $ilUser;
1878
1879 $command = $_SESSION['clipboard']['cmd'];
1880 if(!in_array($command, array('cut', 'link', 'copy')))
1881 {
1882 $message = __METHOD__.": cmd was neither 'cut', 'link' nor 'copy'; may be a hack attempt!";
1883 $this->ilias->raiseError($message, $this->ilias->error_obj->WARNING);
1884 }
1885
1886 if($command == 'cut')
1887 {
1888 if(isset($_POST['node']) && (int)$_POST['node'])
1889 $_POST['nodes'] = array($_POST['node']);
1890 }
1891
1892 if(!is_array($_POST['nodes']) || !count($_POST['nodes']))
1893 {
1894 ilUtil::sendFailure($this->lng->txt('select_at_least_one_object'));
1895 switch ($command)
1896 {
1897 case 'cut':
1898 $this->showPasteTreeObject();
1899 break;
1900 case 'copy':
1901 $this->showPasteTreeObject();
1902 break;
1903 case 'link':
1904 $this->showPasteTreeObject();
1905 break;
1906 }
1907 return;
1908 }
1909
1910 // this loop does all checks
1911 $folder_objects_cache = array();
1912 foreach($_SESSION['clipboard']['ref_ids'] as $ref_id)
1913 {
1915 $current_parent_id = $tree->getParentId($obj_data->getRefId());
1916
1917 foreach($_POST['nodes'] as $folder_ref_id)
1918 {
1919 if(!array_key_exists($folder_ref_id, $folder_objects_cache))
1920 {
1921 $folder_objects_cache[$folder_ref_id] = ilObjectFactory::getInstanceByRefId($folder_ref_id);
1922 }
1923
1924 // CHECK ACCESS
1925 if(!$rbacsystem->checkAccess('create', $folder_ref_id, $obj_data->getType()))
1926 {
1927 $no_paste[] = sprintf($this->lng->txt('msg_no_perm_paste_object_in_folder'), $obj_data->getTitle().' ['.$obj_data->getRefId().']', $folder_objects_cache[$folder_ref_id]->getTitle().' ['.$folder_objects_cache[$folder_ref_id]->getRefId().']');
1928 }
1929
1930 // CHECK IF REFERENCE ALREADY EXISTS
1931 if($folder_ref_id == $current_parent_id)
1932 {
1933 $exists[] = sprintf($this->lng->txt('msg_obj_exists_in_folder'), $obj_data->getTitle().' ['.$obj_data->getRefId().']', $folder_objects_cache[$folder_ref_id]->getTitle().' ['.$folder_objects_cache[$folder_ref_id]->getRefId().']');
1934 }
1935
1936 // CHECK IF PASTE OBJECT SHALL BE CHILD OF ITSELF
1937 if ($tree->isGrandChild($ref_id, $folder_ref_id) ||
1938 $ref_id == $folder_ref_id)
1939 {
1940 $is_child[] = sprintf($this->lng->txt('msg_paste_object_not_in_itself'), $obj_data->getTitle().' ['.$obj_data->getRefId().']');
1941 }
1942
1943 // CHECK IF OBJECT IS ALLOWED TO CONTAIN PASTED OBJECT AS SUBOBJECT
1944 if(!in_array($obj_data->getType(), array_keys($folder_objects_cache[$folder_ref_id]->getPossibleSubObjects())))
1945 {
1946 $not_allowed_subobject[] = sprintf($this->lng->txt('msg_obj_may_not_contain_objects_of_type'), $folder_objects_cache[$folder_ref_id]->getTitle().' ['.$folder_objects_cache[$folder_ref_id]->getRefId().']',
1947 $GLOBALS['lng']->txt('obj_'.$obj_data->getType()));
1948 }
1949 }
1950 }
1951
1953 // process checking results
1954 if(count($exists) && $command != "copy")
1955 {
1956 $error .= implode('<br />', $exists);
1957 }
1958
1959 if(count($is_child))
1960 {
1961 $error .= $error != '' ? '<br />' : '';
1962 $error .= implode('<br />', $is_child);
1963 }
1964
1965 if(count($not_allowed_subobject))
1966 {
1967 $error .= $error != '' ? '<br />' : '';
1968 $error .= implode('<br />', $not_allowed_subobject);
1969 }
1970
1971 if(count($no_paste))
1972 {
1973 $error .= $error != '' ? '<br />' : '';
1974 $error .= implode('<br />', $no_paste);
1975 }
1976
1977 if($error != '')
1978 {
1980 switch ($command)
1981 {
1982 case 'cut':
1983 $this->showPasteTreeObject();
1984 break;
1985 case 'copy':
1986 $this->showPasteTreeObject();
1987 break;
1988 case 'link':
1989 $this->showPasteTreeObject();
1990 break;
1991 }
1992 return;
1993 }
1994
1995 // log pasteObject call
1996 $log->write(__METHOD__.", cmd: ".$command);
1997
1999 // everything ok: now paste the objects to new location
2000
2001 // to prevent multiple actions via back/reload button
2002 $ref_ids = $_SESSION['clipboard']['ref_ids'];
2003 unset($_SESSION['clipboard']['ref_ids']);
2004
2005 // BEGIN ChangeEvent: Record paste event.
2006 require_once('Services/Tracking/classes/class.ilChangeEvent.php');
2007 // END ChangeEvent: Record paste event.
2008
2009 // process COPY command
2010 if($command == 'copy')
2011 {
2012 foreach($_POST['nodes'] as $folder_ref_id)
2013 {
2014 foreach($ref_ids as $ref_id)
2015 {
2016 $revIdMapping = array();
2017
2018 $oldNode_data = $tree->getNodeData($ref_id);
2019 if ($oldNode_data['parent'] == $folder_ref_id)
2020 {
2021 require_once 'Modules/File/classes/class.ilObjFileAccess.php';
2022 $newTitle = ilObjFileAccess::_appendNumberOfCopyToFilename($oldNode_data['title'],null);
2023 $newRef = $this->cloneNodes($ref_id, $folder_ref_id, $refIdMapping, $newTitle);
2024 }
2025 else
2026 {
2027 $newRef = $this->cloneNodes($ref_id, $folder_ref_id, $refIdMapping, null);
2028 }
2029
2030 // BEGIN ChangeEvent: Record copy event.
2031 $old_parent_data = $tree->getParentNodeData($ref_id);
2032 $newNode_data = $tree->getNodeData($newRef);
2033 ilChangeEvent::_recordReadEvent($oldNode_data['type'], $ref_id,
2034 $oldNode_data['obj_id'], $ilUser->getId());
2035 ilChangeEvent::_recordWriteEvent($newNode_data['obj_id'], $ilUser->getId(), 'add',
2036 $ilObjDataCache->lookupObjId($folder_ref_id));
2037 ilChangeEvent::_catchupWriteEvents($newNode_data['obj_id'], $ilUser->getId());
2038 // END PATCH ChangeEvent: Record cut event.
2039 }
2040 }
2041
2042 ilUtil::sendSuccess($this->lng->txt('msg_cloned'), true);
2043 } // END COPY
2044
2045 // process CUT command
2046 if($command == 'cut')
2047 {
2048 foreach($_POST['nodes'] as $folder_ref_id)
2049 {
2050 foreach($ref_ids as $ref_id)
2051 {
2052 // Store old parent
2053 $old_parent = $tree->getParentId($ref_id);
2054 $tree->moveTree($ref_id, $folder_ref_id);
2055 $rbacadmin->adjustMovedObjectPermissions($ref_id, $old_parent);
2056
2057 include_once('./Services/AccessControl/classes/class.ilConditionHandler.php');
2059
2060 // BEGIN ChangeEvent: Record cut event.
2061 $node_data = $tree->getNodeData($ref_id);
2062 $old_parent_data = $tree->getNodeData($old_parent);
2063 ilChangeEvent::_recordWriteEvent($node_data['obj_id'], $ilUser->getId(), 'remove',
2064 $old_parent_data['obj_id']);
2065 ilChangeEvent::_recordWriteEvent($node_data['obj_id'], $ilUser->getId(), 'add',
2066 $ilObjDataCache->lookupObjId($folder_ref_id));
2067 ilChangeEvent::_catchupWriteEvents($node_data['obj_id'], $ilUser->getId());
2068 // END PATCH ChangeEvent: Record cut event.
2069 }
2070
2071 // prevent multiple iterations for cut cmommand
2072 break;
2073 }
2074
2075 ilUtil::sendSuccess($this->lng->txt('msg_cut_copied'), true);
2076 } // END CUT
2077
2078 // process LINK command
2079 if($command == 'link')
2080 {
2081 $linked_to_folders = array();
2082
2083 include_once "Services/AccessControl/classes/class.ilRbacLog.php";
2084 $rbac_log_active = ilRbacLog::isActive();
2085
2086 foreach($_POST['nodes'] as $folder_ref_id)
2087 {
2088 $linked_to_folders[$folder_ref_id] = $ilObjDataCache->lookupTitle($ilObjDataCache->lookupObjId($folder_ref_id));
2089
2090 foreach($ref_ids as $ref_id)
2091 {
2092 // get node data
2093 $top_node = $tree->getNodeData($ref_id);
2094
2095 // get subnodes of top nodes
2096 $subnodes[$ref_id] = $tree->getSubtree($top_node);
2097 }
2098
2099 // now move all subtrees to new location
2100 foreach($subnodes as $key => $subnode)
2101 {
2102 // first paste top_node....
2103 $obj_data = ilObjectFactory::getInstanceByRefId($key);
2104 $new_ref_id = $obj_data->createReference();
2105 $obj_data->putInTree($folder_ref_id);
2106 $obj_data->setPermissions($folder_ref_id);
2107
2108 // rbac log
2109 if($rbac_log_active)
2110 {
2111 $rbac_log_roles = $rbacreview->getParentRoleIds($new_ref_id, false);
2112 $rbac_log = ilRbacLog::gatherFaPa($new_ref_id, array_keys($rbac_log_roles), true);
2113 ilRbacLog::add(ilRbacLog::LINK_OBJECT, $new_ref_id, $rbac_log, $key);
2114 }
2115
2116 // BEGIN ChangeEvent: Record link event.
2117 $node_data = $tree->getNodeData($new_ref_id);
2118 ilChangeEvent::_recordWriteEvent($node_data['obj_id'], $ilUser->getId(), 'add',
2119 $ilObjDataCache->lookupObjId($folder_ref_id));
2120 ilChangeEvent::_catchupWriteEvents($node_data['obj_id'], $ilUser->getId());
2121 // END PATCH ChangeEvent: Record link event.
2122 }
2123
2124 $log->write(__METHOD__.', link finished');
2125 }
2126
2127 $linked_targets = array();
2128 if(count($linked_to_folders))
2129 {
2130 require_once 'Services/Link/classes/class.ilLink.php';
2131 foreach($linked_to_folders as $ref_id => $title)
2132 {
2133 $linked_targets[] = '<a href="' . ilLink::_getLink($ref_id) . '">' . $title . '</a>';
2134 }
2135 }
2136
2137 $suffix = 'p';
2138 if(count($ref_ids) == 1)
2139 {
2140 $suffix = 's';
2141 }
2142 ilUtil::sendSuccess(sprintf($this->lng->txt('mgs_objects_linked_to_the_following_folders_' . $suffix), implode(', ', $linked_targets)), true);
2143 } // END LINK
2144
2145 // clear clipboard
2146 $this->clearObject();
2147
2148 $this->ctrl->returnToParent($this);
2149 }
$error
Definition: Error.php:17
static _recordReadEvent($a_type, $a_ref_id, $obj_id, $usr_id, $isCatchupWriteEvents=true, $a_ext_rc=false, $a_ext_time=false)
Records a read event and catches up with write events.
static _appendNumberOfCopyToFilename($a_file_name, $nth_copy=null, $a_handle_extension=false)
Appends the text " - Copy" to a filename in the language of the current user.
static add($a_action, $a_ref_id, array $a_diff, $a_source_ref_id=false)
const LINK_OBJECT
static gatherFaPa($a_ref_id, array $a_role_ids, $a_add_action=false)
static isActive()

References $_POST, $_SESSION, $error, $GLOBALS, $ilUser, $log, ilObjectGUI\$ref_id, $title, ilObjectGUI\$tree, ilConditionHandler\_adjustMovedObjectConditions(), ilObjFileAccess\_appendNumberOfCopyToFilename(), ilChangeEvent\_catchupWriteEvents(), ilLink\_getLink(), ilChangeEvent\_recordReadEvent(), ilChangeEvent\_recordWriteEvent(), ilRbacLog\add(), clearObject(), cloneNodes(), ilRbacLog\gatherFaPa(), ilObjectFactory\getInstanceByRefId(), ilRbacLog\isActive(), ilRbacLog\LINK_OBJECT, ilUtil\sendFailure(), ilUtil\sendSuccess(), showPasteTreeObject(), and sprintf.

Referenced by ilObjOrgUnitGUI\executeCommand(), and ilObjOrgUnitGUI\performPaste().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prepareOutput()

ilContainerGUI::prepareOutput (   $a_show_subobjects = true)

prepare output

Reimplemented from ilObjectGUI.

Reimplemented in ilObjCourseGUI, and ilObjGroupGUI.

Definition at line 350 of file class.ilContainerGUI.php.

351 {
352 if (parent::prepareOutput($a_show_subobjects)) // return false in admin mode
353 {
354 if ($this->getCreationMode() != true && $a_show_subobjects)
355 {
356 // This method is called directly from ilContainerGUI::renderObject
357 #$this->showPossibleSubObjects();
358 $this->showTreeFlatIcon();
359
360 // Member view
361 include_once './Services/Container/classes/class.ilMemberViewGUI.php';
362 ilMemberViewGUI::showMemberViewSwitch($this->object->getRefId());
363 }
364 }
365 }
static showMemberViewSwitch($a_ref_id)
Show member view switch.
getCreationMode()
get creation mode

References ilObjectGUI\getCreationMode(), ilMemberViewGUI\showMemberViewSwitch(), and showTreeFlatIcon().

Referenced by ilObjCategoryGUI\executeCommand(), ilObjFolderGUI\executeCommand(), ilObjRootFolderGUI\executeCommand(), ilObjRecoveryFolderGUI\executeCommand(), and executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ recurseFolder()

static ilContainerGUI::recurseFolder (   $refid,
  $title,
  $tmpdir 
)
staticprivate

private functions which iterates through all folders and files and create an according file structure in a temporary directory.

This function works recursive.

Parameters
integer$refidreference it
tmpdictory$tmpdir
Returns
returns first created directory

Definition at line 1743 of file class.ilContainerGUI.php.

1744 {
1745 global $rbacsystem, $tree, $ilAccess;
1746
1747 $tmpdir = $tmpdir . DIRECTORY_SEPARATOR . ilUtil::getASCIIFilename($title);
1748 ilUtil::makeDir($tmpdir);
1749
1750 $subtree = $tree->getChildsByTypeFilter($refid, array("fold","file"));
1751
1752 foreach ($subtree as $child)
1753 {
1754 if (!$ilAccess->checkAccess("read", "", $child["ref_id"]))
1755 continue;
1756
1757 if (ilObject::_isInTrash($child["ref_id"]))
1758 continue;
1759
1760 if ($child["type"] == "fold")
1761 self::recurseFolder($child["ref_id"], $child["title"], $tmpdir);
1762 else
1763 self::copyFile($child["obj_id"], $child["title"], $tmpdir);
1764 }
1765 }

References $title, ilObjectGUI\$tree, ilObject\_isInTrash(), copyFile(), ilUtil\getASCIIFilename(), ilUtil\makeDir(), and recurseFolder().

Referenced by downloadMultipleObjects(), and recurseFolder().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ redrawListItemObject()

ilContainerGUI::redrawListItemObject ( )

Redraw a list item (ajax)

Parameters

return

Definition at line 3538 of file class.ilContainerGUI.php.

3539 {
3540 global $tpl;
3541
3542 $html = null;
3543
3544 $item_data = $this->object->getSubItems(false, false, (int) $_GET["child_ref_id"]);
3545 $container_view = $this->getContentGUI();
3546
3547 // list item is session material (not part of "_all"-items - see below)
3548 include_once './Modules/Session/classes/class.ilEventItems.php';
3549 $event_items = ilEventItems::_getItemsOfContainer($this->object->getRefId());
3550 if(in_array((int)$_GET["child_ref_id"], $event_items))
3551 {
3552 include_once('./Services/Object/classes/class.ilObjectActivation.php');
3553 foreach ($this->object->items["sess"] as $id)
3554 {
3555 $items = ilObjectActivation::getItemsByEvent($id['obj_id']);
3556 foreach($items as $event_item)
3557 {
3558 if ($event_item["child"] == (int)$_GET["child_ref_id"])
3559 {
3560 // sessions
3561 if((int)$_GET["parent_ref_id"])
3562 {
3563 $event_item["parent"] = (int)$_GET["parent_ref_id"];
3564 }
3565 $html = $container_view->renderItem($event_item);
3566 }
3567 }
3568 }
3569 }
3570
3571 // "normal" list item
3572 if(!$html)
3573 {
3574 foreach ($this->object->items["_all"] as $id)
3575 {
3576 if ($id["child"] == (int) $_GET["child_ref_id"])
3577 {
3578 $html = $container_view->renderItem($id);
3579 }
3580 }
3581 }
3582
3583 if($html)
3584 {
3585 echo $html;
3586
3587 // we need to add onload code manually (rating, comments, etc.)
3588 echo $tpl->getOnLoadCodeForAsynch();
3589 }
3590
3591 exit;
3592 }
getContentGUI()
Get content gui object.
static _getItemsOfContainer($a_ref_id)
static getItemsByEvent($a_event_id)
Get session material / event items.

References $_GET, $html, ilObjectGUI\$tpl, ilEventItems\_getItemsOfContainer(), exit, getContentGUI(), and ilObjectActivation\getItemsByEvent().

+ Here is the call graph for this function:

◆ removeFromDeskObject()

ilContainerGUI::removeFromDeskObject ( )
See also
ilDesktopItemHandling::removeFromDesk()

Implements ilDesktopItemHandling.

Definition at line 1407 of file class.ilContainerGUI.php.

1408 {
1409 global $ilSetting, $lng;
1410
1411 if((int)$ilSetting->get('disable_my_offers'))
1412 {
1413 return $this->renderObject();
1414 }
1415
1416 include_once './Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
1418 ilUtil::sendSuccess($lng->txt("removed_from_desktop"));
1419 $this->renderObject();
1420 }
static removeFromDesktop()
Remove item from personal desktop @access public.

References $ilSetting, ilObjectGUI\$lng, ilDesktopItemGUI\removeFromDesktop(), renderObject(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ removeFromSystemObject()

ilContainerGUI::removeFromSystemObject ( )

remove objects from trash bin and all entries therefore every object needs a specific deleteObject() method

@access public

Reimplemented in ilObjRecoveryFolderGUI.

Definition at line 3930 of file class.ilContainerGUI.php.

3931 {
3932 global $log, $ilAppEventHandler, $lng;
3933
3934 include_once("./Services/Repository/classes/class.ilRepUtilGUI.php");
3935 $ru = new ilRepUtilGUI($this);
3936 $ru->removeObjectsFromSystem($_POST["trash_id"]);
3937 $this->ctrl->redirect($this, "trash");
3938 }

References $_POST, ilObjectGUI\$lng, and $log.

◆ renderObject()

ilContainerGUI::renderObject ( )

render the object

Reimplemented in ilObjCategoryGUI, ilObjCourseGUI, ilObjFolderGUI, ilObjGroupGUI, and ilObjRootFolderGUI.

Definition at line 476 of file class.ilContainerGUI.php.

477 {
478 global $ilDB, $tpl, $ilTabs, $ilCtrl, $ilSetting;
479
480 $container_view = $this->getContentGUI();
481
482 $this->setContentSubTabs();
483 if ($this->isActiveAdministrationPanel())
484 {
485 $ilTabs->activateSubTab("manage");
486 }
487 else
488 {
489 $ilTabs->activateSubTab("view_content");
490 }
491
492 $container_view->setOutput();
493
494 $this->adminCommands = $container_view->adminCommands;
495
496 // it is important not to show the subobjects/admin panel here, since
497 // we will create nested forms in case, e.g. a news/calendar item is added
498 if ($ilCtrl->getNextClass() != "ilcolumngui")
499 {
500 $this->showAdministrationPanel($tpl);
501 $this->showPossibleSubObjects();
502 }
503
504 $this->showPermanentLink($tpl);
505
506 // add tree updater javascript
507 if ((int) $_GET["ref_id"] > 1 && $ilSetting->get("rep_tree_synchronize"))
508 {
509 $ilCtrl->setParameter($this, "active_node", (int) $_GET["ref_id"]);
510 /*$tpl->addOnloadCode("
511 if (parent && parent.tree && parent.tree.updater)
512 {
513 parent.tree.updater('tree_div', '".
514 $ilCtrl->getLinkTarget($this, "showTree", "", true, false)
515 ."');
516 }");*/
517 }
518 }
showAdministrationPanel(&$tpl)
show administration panel
setContentSubTabs()
Set content sub tabs.
showPermanentLink(&$tpl)
show permanent link
showPossibleSubObjects()
show possible sub objects selection list
global $ilDB

References $_GET, $ilCtrl, $ilDB, $ilSetting, ilObjectGUI\$tpl, getContentGUI(), isActiveAdministrationPanel(), setContentSubTabs(), showAdministrationPanel(), showPermanentLink(), and showPossibleSubObjects().

Referenced by addToDeskObject(), editOrderObject(), enableMultiDownloadObject(), lockObject(), and removeFromDeskObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetRowType()

ilContainerGUI::resetRowType ( )

Definition at line 1198 of file class.ilContainerGUI.php.

1199 {
1200 $this->cur_row_type = "";
1201 }

◆ savePageContentObject()

ilContainerGUI::savePageContentObject ( )

Definition at line 940 of file class.ilContainerGUI.php.

941 {
942 include_once("Services/XHTMLPage/classes/class.ilXHTMLPage.php");
943 include_once "./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
944 $xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
945 "xhtml_page");
946
947 /*include_once("./Services/Form/classes/class.ilFormPropertyGUI.php");
948 include_once("./Services/Form/classes/class.ilTextAreaInputGUI.php");
949 $ta = new ilTextAreaInputGUI();
950 $ta->setRteTagSet("extended_table_img");
951 $tags = $ta->getRteTagString();*/
952
953 //$text = ilUtil::stripSlashes($_POST["page_content"],
954 // true,
955 // $tags);
956
957 $text = ilUtil::stripSlashes($_POST["page_content"],
958 true,
960 if ($xpage_id > 0)
961 {
962 $xpage = new ilXHTMLPage($xpage_id);
963 $xpage->setContent($text);
964 $xpage->save();
965 }
966 else
967 {
968 $xpage = new ilXHTMLPage();
969 $xpage->setContent($text);
970 $xpage->save();
971 ilContainer::_writeContainerSetting($this->object->getId(),
972 "xhtml_page", $xpage->getId());
973 }
974
975 include_once("Services/RTE/classes/class.ilRTE.php");
976 ilRTE::_cleanupMediaObjectUsage($text, $this->object->getType().":html",
977 $this->object->getId());
978
979 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
980 $this->ctrl->redirect($this, "");
981 }
static _writeContainerSetting($a_id, $a_keyword, $a_value)
static _getUsedHTMLTagsAsString($a_module="")
Returns a string of all allowed HTML tags for text editing.
static _cleanupMediaObjectUsage($a_text, $a_usage_type, $a_usage_id)
Synchronises appearances of media objects in $a_text with media object usage table.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
$text

References $_POST, $text, ilRTE\_cleanupMediaObjectUsage(), ilObjAdvancedEditing\_getUsedHTMLTagsAsString(), ilContainer\_lookupContainerSetting(), ilContainer\_writeContainerSetting(), ilUtil\sendSuccess(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ savePasswordObject()

ilContainerGUI::savePasswordObject ( )
protected

Save password.

Returns

Definition at line 3516 of file class.ilContainerGUI.php.

3517 {
3518 global $ilUser;
3519
3520 $form = $this->initFormPasswordInstruction();
3521 if($form->checkInput())
3522 {
3523 $ilUser->resetPassword($this->form->getInput('new_password'),$this->form->getInput('new_password'));
3524 ilUtil::sendSuccess($this->lng->txt('webdav_pwd_instruction_success'),true);
3525 $this->showPasswordInstructionObject(false);
3526 return true;
3527 }
3528 $form->setValuesByPost();
3530 }
initFormPasswordInstruction()
Init password form.
showPasswordInstructionObject($a_init=true)
Show webdav password instruction.

References $ilUser, initFormPasswordInstruction(), ilUtil\sendSuccess(), and showPasswordInstructionObject().

+ Here is the call graph for this function:

◆ saveSortingObject()

ilContainerGUI::saveSortingObject ( )

Save Sorting.

@access public

Parameters

Reimplemented in ilObjCourseGUI.

Definition at line 3138 of file class.ilContainerGUI.php.

3139 {
3140 include_once('Services/Container/classes/class.ilContainerSorting.php');
3141 $sorting = ilContainerSorting::_getInstance($this->object->getId());
3142
3143 // Allow comma
3144 $positions = str_replace(',','.',$_POST['position']);
3145
3146 $sorting->savePost($positions);
3147 ilUtil::sendSuccess($this->lng->txt('cntr_saved_sorting'), true);
3148 $this->ctrl->redirect($this, "editOrder");
3149 }
static _getInstance($a_obj_id)
get instance by obj_id

References $_POST, ilContainerSorting\_getInstance(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ saveSortingSettings()

ilContainerGUI::saveSortingSettings ( ilPropertyFormGUI  $form)
protected

Save sorting settings.

Parameters
ilPropertyFormGUI$form

Definition at line 3884 of file class.ilContainerGUI.php.

3885 {
3886 include_once('Services/Container/classes/class.ilContainerSortingSettings.php');
3887 $settings = new ilContainerSortingSettings($this->object->getId());
3888 $settings->setSortMode($form->getInput("sorting"));
3889
3890 switch($form->getInput('sorting'))
3891 {
3893 $settings->setSortDirection($form->getInput('title_sorting_direction'));
3894 break;
3896 $settings->setSortDirection($form->getInput('activation_sorting_direction'));
3897 break;
3899 $settings->setSortDirection($form->getInput('creation_sorting_direction'));
3900 break;
3902 $settings->setSortNewItemsPosition($form->getInput('manual_new_items_position'));
3903 $settings->setSortNewItemsOrder($form->getInput('manual_new_items_order'));
3904 $settings->setSortDirection($form->getInput('manual_sorting_direction'));
3905 break;
3906 }
3907
3908 $settings->update();
3909 }
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.

References ilPropertyFormGUI\getInput(), ilContainer\SORT_ACTIVATION, ilContainer\SORT_CREATION, ilContainer\SORT_MANUAL, and ilContainer\SORT_TITLE.

Referenced by ilObjFolderGUI\updateCustom(), ilObjCategoryGUI\updateObject(), ilObjCourseGUI\updateObject(), ilObjGroupGUI\updateObject(), and ilObjRootFolderGUI\updateObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveStyleSettingsObject()

ilContainerGUI::saveStyleSettingsObject ( )

Save style settings.

Definition at line 3401 of file class.ilContainerGUI.php.

3402 {
3403 global $ilSetting;
3404
3405 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
3406 if ($ilSetting->get("fixed_content_style_id") <= 0 &&
3407 (ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
3408 || $this->object->getStyleSheetId() == 0))
3409 {
3410 $this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
3411 $this->object->update();
3412 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
3413 }
3414 $this->ctrl->redirect($this, "editStyleProperties");
3415 }

References $_POST, $ilSetting, ilObjStyleSheet\_lookupStandard(), ilUtil\sendSuccess(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ setColumnSettings()

ilContainerGUI::setColumnSettings ( ilColumnGUI  $column_gui)

May be overwritten in subclasses.

Reimplemented from ilObjectGUI.

Definition at line 2881 of file class.ilContainerGUI.php.

2882 {
2883 global $ilAccess;
2884 parent::setColumnSettings($column_gui);
2885
2886 if ($ilAccess->checkAccess("write", "", $this->object->getRefId()) &&
2887 $this->isActiveAdministrationPanel() &&
2888 $this->allowBlocksMoving())
2889 {
2890 $column_gui->setEnableMovement(true);
2891 }
2892
2893 $column_gui->setRepositoryItems(
2894 $this->object->getSubItems($this->isActiveAdministrationPanel(), true));
2895
2896 //if ($ilAccess->checkAccess("write", "", $this->object->getRefId())
2897 // && $this->allowBlocksConfigure())
2898 if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
2899 {
2900 $column_gui->setBlockProperty("news", "settings", true);
2901 //$column_gui->setBlockProperty("news", "public_notifications_option", true);
2902 $column_gui->setBlockProperty("news", "default_visibility_option", true);
2903 $column_gui->setBlockProperty("news", "hide_news_block_option", true);
2904 }
2905
2906 if ($this->isActiveAdministrationPanel())
2907 {
2908 $column_gui->setAdminCommands(true);
2909 }
2910 }
setBlockProperty($a_block_type, $a_property, $a_value)
This function is supposed to be used for block type specific properties, that should be passed to ilB...
setEnableMovement($a_enablemovement)
Set Enable Movement.
setRepositoryItems($a_repositoryitems)
Set Repository Items.
setAdminCommands($a_admincommands)
Set Administration Commmands.

References isActiveAdministrationPanel(), ilColumnGUI\setAdminCommands(), ilColumnGUI\setBlockProperty(), ilColumnGUI\setEnableMovement(), and ilColumnGUI\setRepositoryItems().

+ Here is the call graph for this function:

◆ setContentSubTabs()

ilContainerGUI::setContentSubTabs ( )

Set content sub tabs.

Reimplemented in ilObjCourseGUI, ilObjOrgUnitGUI, and ilObjStudyProgrammeGUI.

Definition at line 523 of file class.ilContainerGUI.php.

524 {
526 }
addStandardContainerSubTabs($a_include_view=true)
Add standar container subtabs for view, manage, oderdering and text/media editor link.

References addStandardContainerSubTabs().

Referenced by renderObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPageEditorTabs()

ilContainerGUI::setPageEditorTabs ( )

Add page editor tabs.

Definition at line 1207 of file class.ilContainerGUI.php.

1208 {
1209 global $lng;
1210
1211 if (!$this->isActiveAdministrationPanel()
1212 || strtolower($this->ctrl->getCmdClass()) != "ilcontainerpagegui")
1213 {
1214 return;
1215 }
1216
1217 $lng->loadLanguageModule("content");
1218 //$tabs_gui = new ilTabsGUI();
1219 //$tabs_gui->setSubTabs();
1220
1221 // back to upper context
1222 $this->tabs_gui->setBackTarget($this->lng->txt("obj_cat"),
1223 $this->ctrl->getLinkTarget($this, "frameset"),
1224 ilFrameTargetInfo::_getFrame("MainContent"));
1225
1226 $this->tabs_gui->addTarget("edit", $this->ctrl->getLinkTargetByClass("ilcontainerpagegui", "view")
1227 , array("", "view"), "ilcontainerpagegui");
1228
1229 //$this->tpl->setTabs($tabs_gui->getHTML());
1230 }

References ilObjectGUI\$lng, ilFrameTargetInfo\_getFrame(), and isActiveAdministrationPanel().

+ Here is the call graph for this function:

◆ setSideColumnReturn()

ilContainerGUI::setSideColumnReturn ( )

Set return point for side column actions.

Reimplemented in ilObjCourseGUI, and ilObjGroupGUI.

Definition at line 3994 of file class.ilContainerGUI.php.

3995 {
3996 $this->ctrl->setReturn($this, "");
3997 }

◆ setTitleAndDescription()

ilContainerGUI::setTitleAndDescription ( )

called by prepare output

Reimplemented from ilObjectGUI.

Reimplemented in ilObjOrgUnitGUI, and ilObjRootFolderGUI.

Definition at line 393 of file class.ilContainerGUI.php.

394 {
395 global $ilias;
396
397 if (!ilContainer::_lookupContainerSetting($this->object->getId(), "hide_header_icon_and_title"))
398 {
399 $this->tpl->setTitle($this->object->getTitle());
400 $this->tpl->setDescription($this->object->getLongDescription());
401
402 // set tile icon
403 $icon = ilObject::_getIcon($this->object->getId(), "big", $this->object->getType());
404 if ($ilias->getSetting("custom_icons") &&
405 in_array($this->object->getType(), array("cat","grp","crs", "root")))
406 {
407 require_once("./Services/Container/classes/class.ilContainer.php");
408 if (($path = ilContainer::_lookupIconPath($this->object->getId(), "big")) != "")
409 {
410 $icon = $path;
411 }
412 }
413 $this->tpl->setTitleIcon($icon, $this->lng->txt("obj_".$this->object->getType()));
414
415 include_once './Services/Object/classes/class.ilObjectListGUIFactory.php';
416 $lgui = ilObjectListGUIFactory::_getListGUIByType($this->object->getType());
417 $lgui->initItem($this->object->getRefId(), $this->object->getId());
418 $this->tpl->setAlertProperties($lgui->getAlertProperties());
419 }
420 }
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.

References ilObjectGUI\$ilias, $path, ilObject\_getIcon(), ilObjectListGUIFactory\_getListGUIByType(), ilContainer\_lookupContainerSetting(), and ilContainer\_lookupIconPath().

+ Here is the call graph for this function:

◆ showAdministrationPanel()

ilContainerGUI::showAdministrationPanel ( $tpl)

show administration panel

Definition at line 531 of file class.ilContainerGUI.php.

532 {
533 global $ilAccess, $lng;
534
535 $lng->loadLanguageModule('cntr');
536
537 if ($this->isActiveAdministrationPanel())
538 {
539 // #11545
540 $GLOBALS['tpl']->setPageFormAction($this->ctrl->getFormAction($this));
541
542 include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
543 $toolbar = new ilToolbarGUI();
544 $this->ctrl->setParameter($this, "type", "");
545 $this->ctrl->setParameter($this, "item_ref_id", "");
546
547 if (!$_SESSION["clipboard"])
548 {
549 if ($this->object->gotItems())
550 {
551 $toolbar->setLeadingImage(
552 ilUtil::getImagePath("arrow_upright.svg"),
553 $lng->txt("actions")
554 );
555 $toolbar->addFormButton(
556 $this->lng->txt('delete_selected_items'),
557 'delete'
558 );
559 $toolbar->addFormButton(
560 $this->lng->txt('move_selected_items'),
561 'cut'
562 );
563 $toolbar->addFormButton(
564 $this->lng->txt('copy_selected_items'),
565 'copy'
566 );
567 $toolbar->addFormButton(
568 $this->lng->txt('link_selected_items'),
569 'link'
570 );
571 // add download button if multi download enabled
572 $folder_set = new ilSetting("fold");
573 if ($folder_set->get("enable_multi_download") == true)
574 {
575 $toolbar->addSeparator();
576
577 if(!$folder_set->get("bgtask_download", 0))
578 {
579 $toolbar->addFormButton(
580 $this->lng->txt('download_selected_items'),
581 'download'
582 );
583 }
584 else
585 {
586 $GLOBALS['tpl']->addJavaScript("Services/BackgroundTask/js/BgTask.js");
587 $GLOBALS['tpl']->addOnLoadCode("il.BgTask.initMultiForm('ilFolderDownloadBackgroundTaskHandler');");
588
589 include_once "Services/UIComponent/Button/classes/class.ilSubmitButton.php";
590 $button = ilSubmitButton::getInstance();
591 $button->setCaption("download_selected_items");
592 $button->addCSSClass("ilbgtasksubmit");
593 $button->setCommand("download");
594 $toolbar->addButtonInstance($button);
595 }
596 }
597 }
598 if($this->object->getType() == 'crs' or $this->object->getType() == 'grp')
599 {
600 if($this->object->gotItems())
601 {
602 $toolbar->addSeparator();
603 }
604
605 $toolbar->addButton(
606 $this->lng->txt('cntr_adopt_content'),
607 $this->ctrl->getLinkTargetByClass(
608 'ilObjectCopyGUI',
609 'adoptContent')
610 );
611 }
612 }
613 else
614 {
615 //$GLOBALS["tpl"]->addAdminPanelCommand("paste",
616 // $this->lng->txt("paste_clipboard_items"));
617
618 $toolbar->addFormButton(
619 $this->lng->txt('paste_clipboard_items'),
620 'paste'
621 );
622
623 if($_SESSION["clipboard"]["cmd"] == "link")
624 {
625 //$GLOBALS["tpl"]->addAdminPanelCommand("initAndDisplayLinkIntoMultipleObjects",
626 // $this->lng->txt("paste_clipboard_items_into_multiple_objects"));
627 /*$toolbar->addFormButton(
628 $this->lng->txt('paste_clipboard_items_into_multiple_objects'),
629 'initAndDisplayLinkIntoMultipleObjects'
630 );*/
631 }
632
633 $toolbar->addFormButton(
634 $this->lng->txt('clear_clipboard'),
635 'clear'
636 );
637
638 if ($this->isMultiDownloadEnabled())
639 {
640 $toolbar->addSeparator();
641 $toolbar->addFormButton(
642 $this->lng->txt('download_selected_items'),
643 'download'
644 );
645 }
646 }
647
648 $GLOBALS['tpl']->addAdminPanelToolbar(
649 $toolbar,
650 ($this->object->gotItems() && !$_SESSION["clipboard"]) ? true : false,
651 ($this->object->gotItems() && !$_SESSION["clipboard"]) ? true : false
652 );
653
654 // form action needed, see http://www.ilias.de/mantis/view.php?id=9630
655 if ($this->object->gotItems())
656 {
657 $GLOBALS['tpl']->setPageFormAction($this->ctrl->getFormAction($this));
658 }
659 }
660 else
661 {
662 if ($this->edit_order)
663 {
664 if($this->object->gotItems() and $ilAccess->checkAccess("write", "", $this->object->getRefId()))
665 {
666 include_once('./Services/Container/classes/class.ilContainer.php');
667
668 if ($this->isActiveOrdering())
669 {
670 // #11843
671 $GLOBALS['tpl']->setPageFormAction($this->ctrl->getFormAction($this));
672
673 include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
674 $toolbar = new ilToolbarGUI();
675 $this->ctrl->setParameter($this, "type", "");
676 $this->ctrl->setParameter($this, "item_ref_id", "");
677
678 $toolbar->addFormButton(
679 $this->lng->txt('sorting_save'),
680 'saveSorting'
681 );
682
683 $GLOBALS['tpl']->addAdminPanelToolbar($toolbar, true, false);
684
685 /*
686 $GLOBALS["tpl"]->addAdminPanelCommand("saveSorting",
687 $this->lng->txt('sorting_save'));
688
689 // button should appear at bottom, too
690 $GLOBALS["tpl"]->admin_panel_bottom = true;
691 */
692 }
693 }
694 }
695 else if ($this->isMultiDownloadEnabled())
696 {
697 // bugfix mantis 0021272
698 $children_of_type_file = $this->getAllNestedFiles($_GET['ref_id']);
699 // Check if there are any files and therefore downloadable objects.
700 // In case that there are no downloadable objects the download button mustn't be displayed (see mantis 0021272)
701 if(count($children_of_type_file) != 0)
702 {
703 // #11843
704 $GLOBALS['tpl']->setPageFormAction($this->ctrl->getFormAction($this));
705
706 include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
707 $toolbar = new ilToolbarGUI();
708 $this->ctrl->setParameter($this, "type", "");
709 $this->ctrl->setParameter($this, "item_ref_id", "");
710
711 $toolbar->addFormButton(
712 $this->lng->txt('download_selected_items'),
713 'download'
714 );
715
716 $GLOBALS['tpl']->addAdminPanelToolbar(
717 $toolbar,
718 $this->object->gotItems() ? true : false,
719 $this->object->gotItems() ? true : false
720 );
721 }
722 else
723 {
724 ilUtil::sendInfo($this->lng->txt('msg_no_downloadable_objects'), true);
725 }
726 }
727 }
728 }
getAllNestedFiles($ref_id)
Get all files that are nested in the category whose ref_id is passed to this function or are nested i...
ILIAS Setting Class.
static getInstance()
Factory.

References $_GET, $_SESSION, $GLOBALS, ilObjectGUI\$lng, getAllNestedFiles(), ilUtil\getImagePath(), ilSubmitButton\getInstance(), isActiveAdministrationPanel(), isActiveOrdering(), isMultiDownloadEnabled(), and ilUtil\sendInfo().

Referenced by renderObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showCustomIconsEditing()

ilContainerGUI::showCustomIconsEditing (   $a_input_colspan = 1,
ilPropertyFormGUI  $a_form = null,
  $a_as_section = true 
)

show edit section of custom icons for container

Definition at line 2736 of file class.ilContainerGUI.php.

2737 {
2738 if ($this->ilias->getSetting("custom_icons"))
2739 {
2740 if(!$a_form)
2741 {
2742 /*
2743 $this->tpl->addBlockFile("CONTAINER_ICONS", "container_icon_settings",
2744 "tpl.container_icon_settings.html", "Services/Container");
2745
2746 if (($big_icon = $this->object->getBigIconPath()) != "")
2747 {
2748 $this->tpl->setCurrentBlock("big_icon");
2749 $this->tpl->setVariable("SRC_BIG_ICON", $big_icon);
2750 $this->tpl->parseCurrentBlock();
2751 }
2752 if ($this->object->getType() != "root")
2753 {
2754 if (($small_icon = $this->object->getSmallIconPath()) != "")
2755 {
2756 $this->tpl->setCurrentBlock("small_icon");
2757 $this->tpl->setVariable("SRC_SMALL_ICON", $small_icon);
2758 $this->tpl->parseCurrentBlock();
2759 }
2760 $this->tpl->setCurrentBlock("small_icon_row");
2761 $this->tpl->setVariable("SMALL_ICON", $this->lng->txt("standard_icon"));
2762 $this->tpl->setVariable("SMALL_SIZE", "(".
2763 $this->ilias->getSetting("custom_icon_small_width")."x".
2764 $this->ilias->getSetting("custom_icon_small_height").")");
2765 $this->tpl->setVariable("TXT_REMOVE_S", $this->lng->txt("remove"));
2766 $this->tpl->parseCurrentBlock();
2767 }
2768 if (($tiny_icon = $this->object->getTinyIconPath()) != "")
2769 {
2770 $this->tpl->setCurrentBlock("tiny_icon");
2771 $this->tpl->setVariable("SRC_TINY_ICON", $tiny_icon);
2772 $this->tpl->parseCurrentBlock();
2773 }
2774 $this->tpl->setCurrentBlock("container_icon_settings");
2775 $this->tpl->setVariable("SPAN_TITLE", $a_input_colspan + 1);
2776 $this->tpl->setVariable("SPAN_INPUT", $a_input_colspan);
2777 $this->tpl->setVariable("ICON_SETTINGS", $this->lng->txt("icon_settings"));
2778 $this->tpl->setVariable("BIG_ICON", $this->lng->txt("big_icon"));
2779 $this->tpl->setVariable("TINY_ICON", $this->lng->txt("tiny_icon"));
2780 $this->tpl->setVariable("BIG_SIZE", "(".
2781 $this->ilias->getSetting("custom_icon_big_width")."x".
2782 $this->ilias->getSetting("custom_icon_big_height").")");
2783 $this->tpl->setVariable("TINY_SIZE", "(".
2784 $this->ilias->getSetting("custom_icon_tiny_width")."x".
2785 $this->ilias->getSetting("custom_icon_tiny_height").")");
2786 $this->tpl->setVariable("TXT_REMOVE", $this->lng->txt("remove"));
2787 $this->tpl->parseCurrentBlock();
2788 */
2789 }
2790 else
2791 {
2792 //$big_icon = $this->object->getBigIconPath();
2793 $custom_icon = $this->object->getCustomIconPath();
2794 //$tiny_icon = $this->object->getTinyIconPath();
2795
2796 if($a_as_section)
2797 {
2799 $title->setTitle($this->lng->txt("icon_settings"));
2800 }
2801 else
2802 {
2803 $title = new ilCustomInputGUI($this->lng->txt("icon_settings"), "");
2804 }
2805 $a_form->addItem($title);
2806
2807 // big
2808 /*
2809 $caption = $this->lng->txt("big_icon")." (".
2810 $this->ilias->getSetting("custom_icon_big_width")."x".
2811 $this->ilias->getSetting("custom_icon_big_height").")";
2812 $icon = new ilImageFileInputGUI($caption, "cont_big_icon");
2813 $icon->setImage($big_icon);
2814 if($a_as_section)
2815 {
2816 $a_form->addItem($icon);
2817 }
2818 else
2819 {
2820 $title->addSubItem($icon);
2821 }*/
2822
2823 // small/standard
2824 //if ($this->object->getType() != "root")
2825 //{
2826 /*$caption = $this->lng->txt("standard_icon")." (".
2827 $this->ilias->getSetting("custom_icon_small_width")."x".
2828 $this->ilias->getSetting("custom_icon_small_height").")";*/
2829 $caption = $this->lng->txt("cont_custom_icon");
2830 $icon = new ilImageFileInputGUI($caption, "cont_icon");
2831 $icon->setSuffixes(array("svg"));
2832 $icon->setImage($custom_icon);
2833 if($a_as_section)
2834 {
2835 $a_form->addItem($icon);
2836 }
2837 else
2838 {
2839 $title->addSubItem($icon);
2840 }
2841 //}
2842
2843 // tiny
2844 /*
2845 $caption = $this->lng->txt("tiny_icon")." (".
2846 $this->ilias->getSetting("custom_icon_tiny_width")."x".
2847 $this->ilias->getSetting("custom_icon_tiny_height").")";
2848 $icon = new ilImageFileInputGUI($caption, "cont_tiny_icon");
2849 $icon->setImage($tiny_icon);
2850 if($a_as_section)
2851 {
2852 $a_form->addItem($icon);
2853 }
2854 else
2855 {
2856 $title->addSubItem($icon);
2857 }
2858 */
2859 }
2860 }
2861 }
This class represents a custom property in a property form.
This class represents a section header in a property form.
This class represents an image file property in a property form.

References $title.

Referenced by ilObjCourseGUI\initCourseIconsForm(), ilObjRootFolderGUI\initEditForm(), ilObjGroupGUI\initGroupIconsForm(), ilObjCategoryGUI\initIconsForm(), and ilObjFolderGUI\initIconsForm().

+ Here is the caller graph for this function:

◆ showLinkListObject()

ilContainerGUI::showLinkListObject ( )

Definition at line 988 of file class.ilContainerGUI.php.

989 {
990 global $lng, $tree;
991
992 $tpl = new ilTemplate("tpl.container_link_help.html", true, true,
993 "Services/Container");
994
995 $type_ordering = array(
996 "cat", "fold", "crs", "grp", "chat", "frm", "lres",
997 "glo", "webr", "file", "exc",
998 "tst", "svy", "mep", "qpl", "spl");
999
1000 $childs = $tree->getChilds($_GET["ref_id"]);
1001 foreach($childs as $child)
1002 {
1003 if (in_array($child["type"], array("lm", "sahs", "htlm")))
1004 {
1005 $cnt["lres"]++;
1006 }
1007 else
1008 {
1009 $cnt[$child["type"]]++;
1010 }
1011 }
1012
1013 $tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
1014 $tpl->setVariable("TXT_HELP_HEADER", $lng->txt("help"));
1015 foreach($type_ordering as $type)
1016 {
1017 $tpl->setCurrentBlock("row");
1018 $tpl->setVariable("ROWCOL", "tblrow".((($i++)%2)+1));
1019 if ($type != "lres")
1020 {
1021 $tpl->setVariable("TYPE", $lng->txt("objs_".$type).
1022 " (".((int)$cnt[$type]).")");
1023 }
1024 else
1025 {
1026 $tpl->setVariable("TYPE", $lng->txt("learning_resources").
1027 " (".((int)$cnt["lres"]).")");
1028 }
1029 $tpl->setVariable("TXT_LINK", "[list-".$type."]");
1030 $tpl->parseCurrentBlock();
1031 }
1032 $tpl->show();
1033 exit;
1034
1035 }
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user

References $_GET, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObjectGUI\$tree, exit, and ilUtil\getStyleSheetLocation().

+ Here is the call graph for this function:

◆ showPasswordInstructionObject()

ilContainerGUI::showPasswordInstructionObject (   $a_init = true)
protected

Show webdav password instruction.

Returns

Definition at line 3465 of file class.ilContainerGUI.php.

3466 {
3467 global $tpl,$ilToolbar;
3468
3469 if($a_init)
3470 {
3471 ilUtil::sendInfo($this->lng->txt('webdav_pwd_instruction'));
3473 }
3474
3475 include_once ('Services/WebDAV/classes/class.ilDAVServer.php');
3476 $davServer = ilDAVServer::getInstance();
3477 $ilToolbar->addButton(
3478 $this->lng->txt('mount_webfolder'),
3479 $davServer->getMountURI($this->object->getRefId()),
3480 '_blank',
3481 '',
3482 $davServer->getFolderURI($this->object->getRefId())
3483 );
3484
3485 $tpl->setContent($this->form->getHTML());
3486 }
static getInstance()
Get singelton instance.

References ilObjectGUI\$tpl, ilDAVServer\getInstance(), initFormPasswordInstruction(), and ilUtil\sendInfo().

Referenced by savePasswordObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showPasteTreeObject()

ilContainerGUI::showPasteTreeObject ( )

Show paste tree.

Definition at line 2175 of file class.ilContainerGUI.php.

2176 {
2177 global $ilTabs, $ilToolbar;
2178
2179 $ilTabs->setTabActive('view_content');
2180
2181 if(!in_array($_SESSION['clipboard']['cmd'], array('link', 'copy', 'cut')))
2182 {
2183 $message = __METHOD__.": Unknown action.";
2184 $this->ilias->raiseError($message, $this->ilias->error_obj->WARNING);
2185 }
2186 $cmd = $_SESSION['clipboard']['cmd'];
2187
2188 //
2189 $exp = $this->getTreeSelectorGUI($cmd);
2190 if ($exp->handleCommand())
2191 {
2192 return;
2193 }
2194 $output = $exp->getHTML();
2195
2196 $txt_var = ($cmd == "copy")
2197 ? "copy"
2198 : "paste";
2199
2200 // toolbars
2201 $t = new ilToolbarGUI();
2202 $t->setFormAction($this->ctrl->getFormAction($this, "performPasteIntoMultipleObjects"));
2203
2204 include_once("./Services/UIComponent/Button/classes/class.ilSubmitButton.php");
2206 $b->setCaption($txt_var);
2207 $b->setCommand("performPasteIntoMultipleObjects");
2208
2209 //$t->addFormButton($this->lng->txt($txt_var), "performPasteIntoMultipleObjects");
2210 $t->addStickyItem($b);
2211
2212 $t->addSeparator();
2213 $this->lng->loadLanguageModule('obj');
2214 $t->addFormButton($this->lng->txt("obj_insert_into_clipboard"), "keepObjectsInClipboard");
2215
2216 $t->addFormButton($this->lng->txt("cancel"), "cancelMoveLink");
2217 $t->setCloseFormTag(false);
2218 $t->setLeadingImage(ilUtil::getImagePath("arrow_upright.svg"), " ");
2219 $output = $t->getHTML().$output;
2220 $t->setLeadingImage(ilUtil::getImagePath("arrow_downright.svg"), " ");
2221 $t->setCloseFormTag(true);
2222 $t->setOpenFormTag(false);
2223 $output.= "<br />".$t->getHTML();
2224
2225 $this->tpl->setContent($output);
2226 }
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\s+" &#(? foreach( $entity_files as $file) $output

References $_SESSION, $cmd, $output, $t, ilUtil\getImagePath(), ilSubmitButton\getInstance(), and getTreeSelectorGUI().

Referenced by initAndDisplayCopyIntoMultipleObjectsObject(), initAndDisplayLinkIntoMultipleObjectsObject(), initAndDisplayMoveIntoObjectObject(), and performPasteIntoMultipleObjectsObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showPermanentLink()

ilContainerGUI::showPermanentLink ( $tpl)

show permanent link

Definition at line 808 of file class.ilContainerGUI.php.

809 {
810 $GLOBALS["tpl"]->setPermanentLink($this->object->getType(),
811 $this->object->getRefId(), "", "_top");
812 }

References $GLOBALS.

Referenced by ilObjCourseGUI\executeCommand(), ilObjGroupGUI\executeCommand(), and renderObject().

+ Here is the caller graph for this function:

◆ showPossibleSubObjects()

ilContainerGUI::showPossibleSubObjects ( )

show possible sub objects selection list

Reimplemented from ilObjectGUI.

Reimplemented in ilObjCourseGUI, ilObjOrgUnitGUI, and ilObjRecoveryFolderGUI.

Definition at line 425 of file class.ilContainerGUI.php.

426 {
427 include_once "Services/Object/classes/class.ilObjectAddNewItemGUI.php";
428 $gui = new ilObjectAddNewItemGUI($this->object->getRefId());
429 $gui->render();
430 }
Render add new item selector.

Referenced by renderObject().

+ Here is the caller graph for this function:

◆ showRepTree()

ilContainerGUI::showRepTree ( )

Show tree.

Definition at line 3647 of file class.ilContainerGUI.php.

3648 {
3649 global $tpl, $ilUser, $ilSetting, $ilCtrl;
3650
3651 // set current repository view mode
3652 if (!empty($_GET["set_mode"]))
3653 {
3654 $_SESSION["il_rep_mode"] = $_GET["set_mode"];
3655 if ($ilUser->getId() != ANONYMOUS_USER_ID)
3656 {
3657 $ilUser->writePref("il_rep_mode", $_GET["set_mode"]);
3658 }
3659 }
3660
3661 // get user setting
3662 if ($_SESSION["il_rep_mode"] == "")
3663 {
3664 if ($ilUser->getId() != ANONYMOUS_USER_ID)
3665 {
3666 $_SESSION["il_rep_mode"] = $ilUser->getPref("il_rep_mode");
3667 }
3668 }
3669
3670 // if nothing set, get default view
3671 if ($_SESSION["il_rep_mode"] == "")
3672 {
3673 $_SESSION["il_rep_mode"] = $ilSetting->get("default_repository_view");
3674 }
3675
3676 $mode = ($_SESSION["il_rep_mode"] != "")
3677 ? $_SESSION["il_rep_mode"]
3678 : "flat";
3679
3680 // check for administration context, see #0016312
3681 if ($mode == "tree" && (strtolower($_GET["baseClass"]) != "iladministrationgui"))
3682 {
3683 include_once("./Services/Repository/classes/class.ilRepositoryExplorerGUI.php");
3684 $exp = new ilRepositoryExplorerGUI($this, "showRepTree");
3685 if (!$exp->handleCommand())
3686 {
3687 $tpl->setLeftNavContent($exp->getHTML());
3688 }
3689 }
3690 }
Repository explorer GUI class.

References $_GET, $_SESSION, $ilCtrl, $ilSetting, $ilUser, and ilObjectGUI\$tpl.

Referenced by ilObjCategoryGUI\executeCommand(), ilObjCourseGUI\executeCommand(), ilObjFolderGUI\executeCommand(), ilObjGroupGUI\executeCommand(), ilObjRootFolderGUI\executeCommand(), and ilObjStudyProgrammeGUI\executeCommand().

+ Here is the caller graph for this function:

◆ showTreeFlatIcon()

ilContainerGUI::showTreeFlatIcon ( )

Definition at line 367 of file class.ilContainerGUI.php.

368 {
369 global $tpl;
370
371 // dont show icon, if role (permission gui->rolegui) is edited
372 if ($_GET["obj_id"] != "")
373 {
374 return;
375 }
376 // hide for member view
377 include_once './Services/Container/classes/class.ilMemberViewSettings.php';
378 if(ilMemberViewSettings::getInstance()->isActive())
379 {
380 return;
381 }
382
383 $mode = ($_SESSION["il_rep_mode"] == "flat")
384 ? "tree"
385 : "flat";
386 $link = "ilias.php?baseClass=ilRepositoryGUI&amp;cmd=frameset&amp;set_mode=".$mode."&amp;ref_id=".$this->object->getRefId();
387 $tpl->setTreeFlatIcon($link, $mode);
388 }
static getInstance()
Get instance.

References $_GET, $_SESSION, ilObjectGUI\$tpl, and ilMemberViewSettings\getInstance().

Referenced by prepareOutput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ switchToOldEditorObject()

ilContainerGUI::switchToOldEditorObject ( )

Switch to old page editor.

Definition at line 828 of file class.ilContainerGUI.php.

829 {
830 global $ilCtrl;
831
832 $_SESSION["il_cntr_editor"] = "old";
833 $ilCtrl->redirect($this, "editPageFrame");
834 }

References $_SESSION, and $ilCtrl.

◆ switchToStdEditorObject()

ilContainerGUI::switchToStdEditorObject ( )

Switch to standard page editor.

Definition at line 817 of file class.ilContainerGUI.php.

818 {
819 global $ilCtrl;
820
821 $_SESSION["il_cntr_editor"] = "std";
822 $ilCtrl->redirect($this, "editPageFrame");
823 }

References $_SESSION, and $ilCtrl.

◆ trashObject()

ilContainerGUI::trashObject ( )

Show trash content of object.

@access public

Definition at line 3916 of file class.ilContainerGUI.php.

3917 {
3918 global $tpl;
3919
3920 include_once("./Services/Repository/classes/class.ilRepUtilGUI.php");
3921 $ru = new ilRepUtilGUI($this);
3922 $ru->showTrashTable($_GET["ref_id"]);
3923 }

References $_GET, and ilObjectGUI\$tpl.

◆ undeleteObject()

ilContainerGUI::undeleteObject ( )

Get objects back from trash.

Definition at line 3943 of file class.ilContainerGUI.php.

3944 {
3945 include_once("./Services/Repository/classes/class.ilRepUtilGUI.php");
3946 $ru = new ilRepUtilGUI($this);
3947 $ru->restoreObjects($_GET["ref_id"], $_POST["trash_id"]);
3948 $this->ctrl->redirect($this, "trash");
3949 }

References $_GET, and $_POST.

◆ useNewEditorObject()

ilContainerGUI::useNewEditorObject ( )

Use new editor (-> delete xhtml content page)

Definition at line 839 of file class.ilContainerGUI.php.

840 {
841 global $ilCtrl, $ilAccess, $lng, $ilCtrl;
842
843 if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
844 {
845 include_once("./Services/XHTMLPage/classes/class.ilXHTMLPage.php");
846
847 /* keep old page content for now...
848 $xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
849 "xhtml_page");
850 if ($xpage_id)
851 {
852 $xpage = new ilXHTMLPage($xpage_id);
853 }
854 */
855
856 ilContainer::_writeContainerSetting($this->object->getId(),
857 "xhtml_page", 0);
858
859 ilUtil::sendSuccess($lng->txt("cntr_switched_editor"), true);
860 }
861
862 $ilCtrl->redirect($this, "editPageFrame");
863 }

References $ilCtrl, ilObjectGUI\$lng, ilContainer\_writeContainerSetting(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

Field Documentation

◆ $bl_cnt

ilContainerGUI::$bl_cnt = 1

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

◆ $multi_download_enabled

ilContainerGUI::$multi_download_enabled = false

Definition at line 23 of file class.ilContainerGUI.php.

Referenced by isMultiDownloadEnabled().


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