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))
60 else if ($ilSetting->get(
"repository_tree_pres") ==
"all_types")
63 foreach ($objDefinition->getSubObjectsRecursively(
"root") as $rtype)
65 if ( !$objDefinition->isSideBlock($rtype[
"name"]))
72 if ((
int)
$_GET[
"ref_id"] > 0)
86 if ($this->top_node_id > 0)
88 return $this->
getTree()->getNodeData($this->top_node_id);
92 return parent::getRootNode();
106 $title = $a_node[
"title"];
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"];
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(
"ilrepositorygui",
"ref_id", $a_node[
"child"]);
217 $link = $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"redirect");
218 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
222 $ilCtrl->setParameterByClass(
"ilobjcoursegui",
"ref_id", $a_node[
"child"]);
223 $link = $ilCtrl->getLinkTargetByClass(
array(
"ilrepositorygui",
"ilobjcoursegui"),
"view");
224 $ilCtrl->setParameterByClass(
"ilobjcoursegui",
"ref_id",
$_GET[
"ref_id"]);
228 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $a_node[
"child"]);
229 $link = $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"redirect");
230 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"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 $ilCtrl->setParameterByClass(
"ilobjstudyprogrammegui",
"ref_id", $a_node[
"child"]);
241 $link = $ilCtrl->getLinkTargetByClass(
"ilobjstudyprogrammegui",
"view");
242 $ilCtrl->setParameterByClass(
"ilobjstudyprogrammegui",
"ref_id",
$_GET[
"ref_id"]);
246 include_once(
'./Services/Link/classes/class.ilLink.php');
262 if (!$ilAccess->checkAccess(
'visible',
'', $a_node[
"child"]))
268 $container_parent_id = $tree->checkForParentType($a_node[
"child"],
'grp');
269 if(!$container_parent_id)
272 $container_parent_id = $tree->checkForParentType($a_node[
"child"],
'crs');
274 if($container_parent_id)
277 if($ilSetting->get(
"repository_tree_pres") ==
"all_types" && $container_parent_id != $a_node[
"child"])
280 if(!isset($this->session_materials[$container_parent_id]))
282 include_once
'./Modules/Session/classes/class.ilEventItems.php';
285 if(in_array($a_node[
"child"], $this->session_materials[$container_parent_id]))
305 global $objDefinition, $ilAccess;
308 if ($parent_obj_id > 0)
314 $parent_type =
"dummy";
315 $this->type_grps[
"dummy"] =
array(
"root" =>
"dummy");
320 $this->type_grps =
array();
322 if (empty($this->type_grps[$parent_type]))
324 $this->type_grps[$parent_type] =
325 $objDefinition->getGroupedRepositoryObjectTypes($parent_type);
329 include_once(
'./Services/Object/classes/class.ilObjectActivation.php');
332 $in_any_group =
array();
333 foreach ($a_childs as $child)
336 if ($child[
"type"] ==
"itgr")
338 $g = $child[
"child"];
343 $this->type_grps[$parent_type][
"itgr"][
"ref_ids"][] = $g;
346 $may_read = $ilAccess->checkAccess(
'read',
'', $g);
351 include_once(
"./Services/Container/classes/class.ilContainerSorting.php");
355 foreach($items as $item)
357 $in_any_group[] = $item[
"child"];
361 $igroup[$g][] = $item;
362 $group[$g][] = $item;
370 $g = $objDefinition->getGroupOfObj($child[
"type"]);
375 $group[$g][] = $child;
379 $in_any_group = array_unique($in_any_group);
382 include_once(
"./Services/Container/classes/class.ilContainerSorting.php");
384 $block_pos = $sort->getBlockPositions();
385 if (
sizeof($block_pos))
387 $tmp = $this->type_grps[$parent_type];
389 $this->type_grps[$parent_type] =
array();
390 foreach ($block_pos as $block_type)
393 if (!is_numeric($block_type) &&
394 array_key_exists($block_type, $tmp))
396 $this->type_grps[$parent_type][$block_type] = $tmp[$block_type];
397 unset($tmp[$block_type]);
403 $this->type_grps[$parent_type][$block_type] =
array();
410 foreach ($tmp as $block_type => $grp)
412 $this->type_grps[$parent_type][$block_type] = $grp;
422 foreach ($this->type_grps[$parent_type] as
$t => $g)
425 if (is_array($group[
$t]))
429 if (is_array($igroup[$t]))
431 foreach ($igroup[$t] as $k => $item)
433 if (!in_array($item[
"child"], $done))
436 $done[] = $item[
"child"];
443 include_once(
"./Services/Container/classes/class.ilContainer.php");
444 include_once(
"./Services/Container/classes/class.ilContainerSorting.php");
446 $group = $sort->sortItems($group);
454 foreach ($group[$t] as $k => $item)
456 if (!in_array($item[
"child"], $done) &&
457 !in_array($item[
"child"], $in_any_group))
460 $done[] = $item[
"child"];
466 else if ($t ==
"itgr" &&
467 is_array($g[
"ref_ids"]))
469 foreach ($g[
"ref_ids"] as
$ref_id)
471 if (isset($group[$ref_id]))
473 foreach ($group[$ref_id] as $k => $item)
475 if(!in_array($item[
"child"], $done))
478 $done[] = $item[
"child"];
499 if (!$rbacsystem->checkAccess(
"read", $a_parent_node_id))
510 return parent::getChildsOfNode($a_parent_node_id);
529 switch ($a_node[
"type"])
532 return $ilAccess->checkAccess(
"read",
"", $a_node[
"child"]);
540 if(!$rbacsystem->checkAccess(
"read", $a_node[
"child"]))
545 $query = sprintf(
"SELECT * FROM tst_tests WHERE obj_fi=%s", $obj_id);
549 return (
bool)
$row->complete;
554 if(!$rbacsystem->checkAccess(
"read", $a_node[
"child"]))
559 $query = sprintf(
"SELECT * FROM svy_svy WHERE obj_fi=%s", $obj_id);
563 return (
bool)
$row->complete;
569 if ($rbacsystem->checkAccess(
"read", $a_node[
"child"]))
581 include_once(
'./Services/ContainerReference/classes/class.ilContainerReferenceAccess.php');
585 return $rbacsystem->checkAccess(
"visible", $a_node[
"child"]);
589 if ($rbacsystem->checkAccess(
"read", $a_node[
"child"]))
592 if ($a_node[
"type"] ==
"lm")
594 include_once(
"./Modules/LearningModule/classes/class.ilObjLearningModule.php");
596 if((!$lm_obj->getOnline()) && (!$rbacsystem->checkAccess(
'write', $a_node[
"child"])))
602 if ($a_node[
"type"] ==
"htlm")
604 include_once(
"./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLM.php");
606 if((!$lm_obj->getOnline()) && (!$rbacsystem->checkAccess(
'write', $a_node[
"child"])))
612 if ($a_node[
"type"] ==
"sahs")
614 include_once(
"./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php");
616 if((!$lm_obj->getOnline()) && (!$rbacsystem->checkAccess(
'write', $a_node[
"child"])))
622 if ($a_node[
"type"] ==
"glo")
625 include_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
627 (!$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.
static _getItemsOfContainer($a_ref_id)
setSkipRootNode($a_val)
Set skip root node.
File Based Learning Module (HTML) object.
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.
setTypeWhiteList($a_val)
Set type white list.
static _lookupObjectId($a_ref_id)
lookup object id
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.
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
getNodeId($a_node)
Get id for node.
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
isNodeClickable($a_node)
Is node clickable?
getNodeContent($a_node)
Get node content.
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.
static _lookupOnline($a_id)
check wether content object is online