4 include_once(
"./Services/UIComponent/Explorer2/classes/class.ilTreeExplorerGUI.php");
28 $this->cur_ref_id = (int)
$_GET[
"ref_id"];
30 $this->top_node_id = 0;
31 if ($ilSetting->get(
"rep_tree_limit_grp_crs") && $this->cur_ref_id > 0)
33 $path = $tree->getPathId($this->cur_ref_id);
43 $this->top_node_id =
$n;
49 parent::__construct(
"rep_exp", $a_parent_obj, $a_parent_cmd, $tree);
55 if ($ilSetting->get(
"repository_tree_pres") ==
"" ||
56 ($ilSetting->get(
"rep_tree_limit_grp_crs") && $this->top_node_id == 0))
59 "crs",
"crsr",
"rcrs"));
61 else if ($ilSetting->get(
"repository_tree_pres") ==
"all_types")
64 foreach ($objDefinition->getSubObjectsRecursively(
"root") as $rtype)
66 if ( !$objDefinition->isSideBlock($rtype[
"name"]))
68 $white[] = $rtype[
"name"];
73 if ((
int)
$_GET[
"ref_id"] > 0)
87 if ($this->top_node_id > 0)
89 return $this->
getTree()->getNodeData($this->top_node_id);
93 return parent::getRootNode();
107 $title = $a_node[
"title"];
110 if ($title ==
"ILIAS")
112 $title = $lng->txt(
"repository");
115 else if($a_node[
"type"] ==
"sess" &&
119 include_once(
'./Modules/Session/classes/class.ilSessionAppointment.php');
151 $title = $a_node[
"title"];
152 if ($title ==
"ILIAS")
154 $title = $lng->txt(
"repository");
156 return $lng->txt(
"icon").
" ".$title;
160 return parent::getNodeIconAlt($a_node);
171 if ($a_node[
"child"] ==
$_GET[
"ref_id"] ||
189 switch($a_node[
"type"])
192 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $a_node[
"child"]);
193 $link = $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"");
194 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
198 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $a_node[
"child"]);
199 $link = $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"");
200 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
204 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $a_node[
"child"]);
205 $link = $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"redirect");
206 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
210 $ilCtrl->setParameterByClass(
"ilobjgroupgui",
"ref_id", $a_node[
"child"]);
211 $link = $ilCtrl->getLinkTargetByClass(array(
"ilrepositorygui",
"ilobjgroupgui"),
"");
212 $ilCtrl->setParameterByClass(
"ilobjgroupgui",
"ref_id",
$_GET[
"ref_id"]);
216 $ilCtrl->setParameterByClass(
"ilobjcoursegui",
"ref_id", $a_node[
"child"]);
217 $link = $ilCtrl->getLinkTargetByClass(array(
"ilrepositorygui",
"ilobjcoursegui"),
"view");
218 $ilCtrl->setParameterByClass(
"ilobjcoursegui",
"ref_id",
$_GET[
"ref_id"]);
222 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $a_node[
"child"]);
223 $link = $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"redirect");
224 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
228 $ilCtrl->setParameterByClass(
"ilobjilinccoursegui",
"ref_id", $a_node[
"child"]);
229 $link = $ilCtrl->getLinkTargetByClass(array(
"ilrepositorygui",
"ilobjilinccoursegui"),
"");
230 $ilCtrl->setParameterByClass(
"ilobjilinccoursegui",
"ref_id",
$_GET[
"ref_id"]);
234 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $a_node[
"child"]);
235 $link = $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"infoScreen");
236 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
240 include_once(
'./Services/Link/classes/class.ilLink.php');
256 if (!$ilAccess->checkAccess(
'visible',
'', $a_node[
"child"]))
262 $container_parent_id = $tree->checkForParentType($a_node[
"child"],
'grp');
263 if(!$container_parent_id)
266 $container_parent_id = $tree->checkForParentType($a_node[
"child"],
'crs');
268 if($container_parent_id)
271 if($ilSetting->get(
"repository_tree_pres") ==
"all_types" && $container_parent_id != $a_node[
"child"])
274 if(!isset($this->session_materials[$container_parent_id]))
276 include_once
'./Modules/Session/classes/class.ilEventItems.php';
279 if(in_array($a_node[
"child"], $this->session_materials[$container_parent_id]))
299 global $objDefinition;
303 if ($parent_obj_id > 0)
309 $parent_type =
"dummy";
310 $this->type_grps[
"dummy"] = array(
"root" =>
"dummy");
313 if (empty($this->type_grps[$parent_type]))
315 $this->type_grps[$parent_type] =
316 $objDefinition->getGroupedRepositoryObjectTypes($parent_type);
320 include_once(
'./Services/Object/classes/class.ilObjectActivation.php');
322 foreach ($a_childs as $child)
325 if ($child[
"type"] ==
"itgr")
327 $g = $child[
"child"];
332 $this->type_grps[$parent_type][
"itgr"][
"ref_ids"][] = $g;
334 foreach($items as $item)
336 $group[$g][] = $item;
343 $g = $objDefinition->getGroupOfObj($child[
"type"]);
348 $group[$g][] = $child;
354 foreach ($this->type_grps[$parent_type] as
$t => $g)
357 if (is_array($group[
$t]))
360 include_once(
"./Services/Container/classes/class.ilContainer.php");
361 include_once(
"./Services/Container/classes/class.ilContainerSorting.php");
363 $group = $sort->sortItems($group);
371 foreach ($group[$t] as $k => $item)
373 if (!in_array($item[
"child"], $done))
376 $done[] = $item[
"child"];
381 else if ($t ==
"itgr" &&
382 is_array($g[
"ref_ids"]))
384 foreach ($g[
"ref_ids"] as
$ref_id)
386 if (isset($group[$ref_id]))
388 foreach ($group[$ref_id] as $k => $item)
390 if(!in_array($item[
"child"], $done))
393 $done[] = $item[
"child"];
414 if (!$rbacsystem->checkAccess(
"read", $a_parent_node_id))
425 return parent::getChildsOfNode($a_parent_node_id);
444 switch ($a_node[
"type"])
447 return $ilAccess->checkAccess(
"read",
"", $a_node[
"child"]);
455 if(!$rbacsystem->checkAccess(
"read", $a_node[
"child"]))
460 $query = sprintf(
"SELECT * FROM tst_tests WHERE obj_fi=%s", $obj_id);
464 return (
bool)
$row->complete;
469 if(!$rbacsystem->checkAccess(
"read", $a_node[
"child"]))
474 $query = sprintf(
"SELECT * FROM svy_svy WHERE obj_fi=%s", $obj_id);
478 return (
bool)
$row->complete;
484 if ($rbacsystem->checkAccess(
"read", $a_node[
"child"]))
496 include_once(
'./Services/ContainerReference/classes/class.ilContainerReferenceAccess.php');
502 if ($rbacsystem->checkAccess(
"read", $a_node[
"child"]))
505 if ($a_node[
"type"] ==
"lm")
507 include_once(
"./Modules/LearningModule/classes/class.ilObjLearningModule.php");
509 if((!$lm_obj->getOnline()) && (!$rbacsystem->checkAccess(
'write', $a_node[
"child"])))
515 if ($a_node[
"type"] ==
"htlm")
517 include_once(
"./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLM.php");
519 if((!$lm_obj->getOnline()) && (!$rbacsystem->checkAccess(
'write', $a_node[
"child"])))
525 if ($a_node[
"type"] ==
"sahs")
527 include_once(
"./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php");
529 if((!$lm_obj->getOnline()) && (!$rbacsystem->checkAccess(
'write', $a_node[
"child"])))
535 if ($a_node[
"type"] ==
"glo")
538 include_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
540 (!$rbacsystem->checkAccess(
'write', $a_node[
"child"])))
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
Class ilObjLearningModule.
getNodeIconAlt($a_node)
Get node icon alt text.
getRootNode()
Get root node.
static _getStaticLink($a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
__construct($a_parent_obj, $a_parent_cmd)
Constructor.
setSkipRootNode($a_val)
Set skip root node.
File Based Learning Module (HTML) object.
_getItemsOfContainer($a_ref_id)
getChildsOfNode($a_parent_node_id)
Get childs of node.
setPathOpen($a_id)
Set node path to be opened.
isNodeHighlighted($a_node)
Is node highlighted?
getNodeHref($a_node)
Get href for node.
const DB_FETCHMODE_OBJECT
setTypeWhiteList($a_val)
Set type white list.
static _lookupObjectId($a_ref_id)
lookup object id
_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
static _isAccessible($a_ref_id)
Check if target is accessible and not deleted.
static _lookupObjId($a_id)
Repository explorer GUI class.
static _appointmentToString($start, $end, $fulltime)
sortChilds($a_childs, $a_parent_node_id)
Sort childs.
getNodeId($a_node)
Get id for node.
static _lookupType($a_id, $a_reference=false)
lookup object type
isNodeClickable($a_node)
Is node clickable?
getNodeContent($a_node)
Get node content.
_lookupOnline($a_id)
check wether content object is online
Explorer class that works on tree objects (Services/Tree)
static _lookupAppointment($a_obj_id)
lookup appointment
setOrderField($a_val, $a_numeric=false)
Set order field.
static getItemsByItemGroup($a_item_group_ref_id)
Get materials of item group.
isNodeVisible($a_node)
Is node visible.
static _getInstance($a_obj_id)
get instance by obj_id
getNodeIcon($a_node)
Get node icon.
Class ilObjSCORMLearningModule.