5 require_once(
"./Services/UIComponent/Explorer/classes/class.ilExplorer.php");
38 $this->force_open_path =
array();
41 parent::__construct($a_target);
43 $this->root_id = $this->tree->readRootId();
44 $this->order_column =
"title";
46 $this->
setTitle($lng->txt(
"overview"));
49 if ($ilSetting->get(
"repository_tree_pres") ==
"" ||
50 ($ilSetting->get(
"rep_tree_limit_grp_crs") && $a_top_node == 0))
52 foreach($objDefinition->getExplorerContainerTypes() as $type)
59 else if ($ilSetting->get(
"repository_tree_pres") ==
"all_types")
61 foreach ($objDefinition->getAllRBACObjects() as $rtype)
75 $this->force_open_path = $a_path;
85 $ilCtrl->setTargetScript(
"ilias.php");
90 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $a_node_id);
91 $link = $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"");
92 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
96 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $a_node_id);
97 $link = $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"redirect");
98 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
102 $ilCtrl->setParameterByClass(
"ilobjgroupgui",
"ref_id", $a_node_id);
103 $link = $ilCtrl->getLinkTargetByClass(
array(
"ilrepositorygui",
"ilobjgroupgui"),
"");
104 $ilCtrl->setParameterByClass(
"ilobjgroupgui",
"ref_id",
$_GET[
"ref_id"]);
107 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $a_node_id);
108 $link = $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"redirect");
109 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
113 $ilCtrl->setParameterByClass(
"ilobjcoursegui",
"ref_id", $a_node_id);
114 $link = $ilCtrl->getLinkTargetByClass(
array(
"ilrepositorygui",
"ilobjcoursegui"),
"view");
115 $ilCtrl->setParameterByClass(
"ilobjcoursegui",
"ref_id",
$_GET[
"ref_id"]);
119 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $a_node_id);
120 $link = $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"redirect");
121 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
125 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $a_node_id);
126 $link = $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"infoScreen");
127 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
131 $ilCtrl->setParameterByClass(
"ilobjstudyprogrammegui",
"ref_id", $a_node_id);
132 $link = $ilCtrl->getLinkTargetByClass(
"ilobjstudyprogrammegui",
"view");
133 $ilCtrl->setParameterByClass(
"ilobjstudyprogrammegui",
"ref_id",
$_GET[
"ref_id"]);
137 include_once(
'./Services/Link/classes/class.ilLink.php');
202 return parent::getImage($a_name);
217 return $ilAccess->checkAccess(
"read",
"", $a_ref_id);
225 if(!$rbacsystem->checkAccess(
"read", $a_ref_id))
230 $query = sprintf(
"SELECT * FROM tst_tests WHERE obj_fi=%s",$a_obj_id);
234 return (
bool)
$row->complete;
239 if(!$rbacsystem->checkAccess(
"read", $a_ref_id))
244 $query = sprintf(
"SELECT * FROM svy_svy WHERE obj_fi=%s",$a_obj_id);
248 return (
bool)
$row->complete;
254 if ($rbacsystem->checkAccess(
"read", $a_ref_id))
266 include_once(
'./Services/ContainerReference/classes/class.ilContainerReferenceAccess.php');
269 return $rbacsystem->checkAccess(
"visible", $a_ref_id);
275 if ($rbacsystem->checkAccess(
"read", $a_ref_id))
280 include_once(
"./Modules/LearningModule/classes/class.ilObjLearningModule.php");
282 if((!$lm_obj->getOnline()) && (!$rbacsystem->checkAccess(
'write',$a_ref_id)))
290 include_once(
"./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLM.php");
292 if((!$lm_obj->getOnline()) && (!$rbacsystem->checkAccess(
'write',$a_ref_id)))
300 include_once(
"./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php");
302 if((!$lm_obj->getOnline()) && (!$rbacsystem->checkAccess(
'write',$a_ref_id)))
311 include_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
313 (!$rbacsystem->checkAccess(
'write',$a_ref_id)))
331 global $rbacsystem,
$tree;
342 if ($rbacsystem->checkAccess(
"read", $a_ref_id))
356 if(!$ilAccess->checkAccess(
'visible',
'', $a_ref_id))
362 $container_parent_id = $tree->checkForParentType($a_ref_id,
'grp');
363 if(!$container_parent_id)
366 $container_parent_id = $tree->checkForParentType($a_ref_id,
'crs');
368 if($container_parent_id)
371 if($ilSetting->get(
"repository_tree_pres") ==
"all_types" && $container_parent_id != $a_ref_id)
374 if(!isset($this->session_materials[$container_parent_id]))
376 include_once
'./Modules/Session/classes/class.ilEventItems.php';
380 if(!isset($this->item_group_items[$container_parent_id]))
382 include_once
'./Modules/ItemGroup/classes/class.ilItemGroupItems.php';
385 if(in_array($a_ref_id, $this->session_materials[$container_parent_id]))
389 if(in_array($a_ref_id, $this->item_group_items[$container_parent_id]))
415 $tpl->setCurrentBlock(
"icon");
416 $nd = $tree->getNodeData(ROOT_FOLDER_ID);
420 $title = $lng->txt(
"repository");
424 $tpl->setVariable(
"TXT_ALT_IMG", $lng->txt(
"icon").
" ".
$title);
425 $tpl->parseCurrentBlock();
427 $tpl->setCurrentBlock(
"link");
429 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
"1");
430 $tpl->setVariable(
"LINK_TARGET",
431 $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"frameset"));
432 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
433 $tpl->setVariable(
"TARGET",
" target=\"_top\"");
434 $tpl->parseCurrentBlock();
436 $tpl->setCurrentBlock(
"element");
437 $tpl->parseCurrentBlock();
449 global $objDefinition;
451 if ($a_parent_obj_id > 0)
457 $parent_type =
"dummy";
458 $this->type_grps[
"dummy"] =
array(
"root" =>
"dummy");
461 if (empty($this->type_grps[$parent_type]))
463 $this->type_grps[$parent_type] =
464 $objDefinition->getGroupedRepositoryObjectTypes($parent_type);
468 foreach ($a_nodes as $node)
470 $g = $objDefinition->getGroupOfObj($node[
"type"]);
475 $group[$g][] = $node;
479 foreach ($this->type_grps[$parent_type] as
$t => $g)
481 if (is_array($group[
$t]))
484 include_once(
"./Services/Container/classes/class.ilContainer.php");
485 include_once(
"./Services/Container/classes/class.ilContainerSorting.php");
487 $group = $sort->sortItems($group);
495 foreach ($group[$t] as $k => $item)
514 if (in_array($a_node, $this->force_open_path))
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
Class ilObjLearningModule.
setFilterMode($a_mode=IL_FM_NEGATIVE)
set filter mode
buildLinkTarget($a_node_id, $a_type)
note: most of this stuff is used by ilCourseContentInterface too
static _getStaticLink($a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
static _getItemsOfContainer($a_ref_id)
File Based Learning Module (HTML) object.
setFiltered($a_bool)
active/deactivate the filter public
isVisible($a_ref_id, $a_type)
static _lookupObjectId($a_ref_id)
lookup object id
static _getItemsOfContainer($a_ref_id)
isClickable($a_type, $a_ref_id=0, $a_obj_id=0)
sortNodes($a_nodes, $a_parent_obj_id)
sort nodes
formatHeader($tpl, $a_obj_id, $a_option)
overwritten method from base class public
static _isAccessible($a_ref_id)
Check if target is accessible and not deleted.
getImage($a_name, $a_type="", $a_obj_id="")
get image path
static _checkAllConditionsOfTarget($a_target_ref_id, $a_target_id, $a_target_type="", $a_usr_id=0)
checks wether all conditions of a target object are fulfilled
forceExpanded($a_node)
Force expansion of node.
buildFrameTarget($a_type, $a_child=0, $a_obj_id=0)
STATIC, do not use $this inside!
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
setForceOpenPath($a_path)
set force open path
Class ilExplorer class for explorer view in admin frame.
setSessionExpandVariable($a_var_name="expand")
set name of expand session variable
addFilter($a_item)
adds item to the filter public
static _getInstance($a_obj_id)
get instance by obj_id
__construct($a_target, $a_top_node=0)
Constructor public.
showChilds($a_ref_id, $a_obj_id=0)
setTitle($a_val)
Set title.
Class ilObjSCORMLearningModule.
static _lookupOnline($a_id)
check wether content object is online