5 require_once(
"./Services/UIComponent/Explorer/classes/class.ilExplorer.php");
38 $this->force_open_path = array();
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))
65 else if ($ilSetting->get(
"repository_tree_pres") ==
"all_types")
67 foreach ($objDefinition->getAllRBACObjects() as $rtype)
81 $this->force_open_path = $a_path;
91 $ilCtrl->setTargetScript(
"ilias.php");
96 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $a_node_id);
97 $link = $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"");
98 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
102 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $a_node_id);
103 $link = $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"redirect");
104 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
108 $ilCtrl->setParameterByClass(
"ilobjgroupgui",
"ref_id", $a_node_id);
109 $link = $ilCtrl->getLinkTargetByClass(array(
"ilrepositorygui",
"ilobjgroupgui"),
"");
110 $ilCtrl->setParameterByClass(
"ilobjgroupgui",
"ref_id",
$_GET[
"ref_id"]);
114 $ilCtrl->setParameterByClass(
"ilobjcoursegui",
"ref_id", $a_node_id);
115 $link = $ilCtrl->getLinkTargetByClass(array(
"ilrepositorygui",
"ilobjcoursegui"),
"view");
116 $ilCtrl->setParameterByClass(
"ilobjcoursegui",
"ref_id",
$_GET[
"ref_id"]);
120 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $a_node_id);
121 $link = $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"redirect");
122 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
126 $ilCtrl->setParameterByClass(
"ilobjilinccoursegui",
"ref_id", $a_node_id);
127 $link = $ilCtrl->getLinkTargetByClass(array(
"ilrepositorygui",
"ilobjilinccoursegui"),
"");
128 $ilCtrl->setParameterByClass(
"ilobjilinccoursegui",
"ref_id",
$_GET[
"ref_id"]);
132 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $a_node_id);
133 $link = $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"infoScreen");
134 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
138 include_once(
'./Services/Link/classes/class.ilLink.php');
188 function getImage($a_name, $a_type =
"", $a_obj_id =
"")
210 return $ilAccess->checkAccess(
"read",
"", $a_ref_id);
218 if(!$rbacsystem->checkAccess(
"read", $a_ref_id))
223 $query = sprintf(
"SELECT * FROM tst_tests WHERE obj_fi=%s",$a_obj_id);
227 return (
bool)
$row->complete;
232 if(!$rbacsystem->checkAccess(
"read", $a_ref_id))
237 $query = sprintf(
"SELECT * FROM svy_svy WHERE obj_fi=%s",$a_obj_id);
241 return (
bool)
$row->complete;
247 if ($rbacsystem->checkAccess(
"read", $a_ref_id))
259 include_once(
'./Services/ContainerReference/classes/class.ilContainerReferenceAccess.php');
265 if ($rbacsystem->checkAccess(
"read", $a_ref_id))
270 include_once(
"./Modules/LearningModule/classes/class.ilObjLearningModule.php");
272 if((!$lm_obj->getOnline()) && (!$rbacsystem->checkAccess(
'write',$a_ref_id)))
278 if ($a_type ==
"htlm")
280 include_once(
"./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLM.php");
282 if((!$lm_obj->getOnline()) && (!$rbacsystem->checkAccess(
'write',$a_ref_id)))
288 if ($a_type ==
"sahs")
290 include_once(
"./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php");
292 if((!$lm_obj->getOnline()) && (!$rbacsystem->checkAccess(
'write',$a_ref_id)))
298 if ($a_type ==
"glo")
301 include_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
303 (!$rbacsystem->checkAccess(
'write',$a_ref_id)))
321 global $rbacsystem,
$tree;
332 if ($rbacsystem->checkAccess(
"read", $a_ref_id))
346 if(!$ilAccess->checkAccess(
'visible',
'', $a_ref_id))
352 $container_parent_id = $tree->checkForParentType($a_ref_id,
'grp');
353 if(!$container_parent_id)
356 $container_parent_id = $tree->checkForParentType($a_ref_id,
'crs');
358 if($container_parent_id)
361 if($ilSetting->get(
"repository_tree_pres") ==
"all_types" && $container_parent_id != $a_ref_id)
364 if(!isset($this->session_materials[$container_parent_id]))
366 include_once
'./Modules/Session/classes/class.ilEventItems.php';
370 if(!isset($this->item_group_items[$container_parent_id]))
372 include_once
'./Modules/ItemGroup/classes/class.ilItemGroupItems.php';
375 if(in_array($a_ref_id, $this->session_materials[$container_parent_id]))
379 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))
523 if(!trim($a_title) && $a_type ==
"sess")
526 include_once(
'./Modules/Session/classes/class.ilSessionAppointment.php');