5 require_once(
"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))
63 else if ($ilSetting->get(
"repository_tree_pres") ==
"all_types")
65 foreach ($objDefinition->getAllRBACObjects() as $rtype)
79 $this->force_open_path = $a_path;
92 return "repository.php?ref_id=".$a_node_id;
95 #include_once('./Services/ContainerReference/classes/class.ilContainerReference.php');
96 #$t_obj_id = ilContainerReference::_lookupTargetId(ilObject::_lookupObjId($a_node_id));
97 #$ref_ids = ilObject::_getAllReferences($t_obj_id);
98 #$a_node_id = current($ref_ids);
99 return "repository.php?cmd=redirect&ref_id=".$a_node_id;
102 return "repository.php?ref_id=".$a_node_id.
"&cmdClass=ilobjgroupgui";
105 return "repository.php?ref_id=".$a_node_id.
"&cmdClass=ilobjcoursegui&cmd=view";
108 #include_once('./Services/ContainerReference/classes/class.ilContainerReference.php');
109 #$t_obj_id = ilContainerReference::_lookupTargetId(ilObject::_lookupObjId($a_node_id));
110 #$ref_ids = ilObject::_getAllReferences($t_obj_id);
111 #$a_node_id = current($ref_ids);
112 return "repository.php?cmd=redirect&ref_id=".$a_node_id;
115 return "repository.php?ref_id=".$a_node_id;
118 return "ilias.php?baseClass=ilLinkResourceHandlerGUI&ref_id=".$a_node_id;
121 return "repository.php?ref_id=".$a_node_id.
"&cmdClass=ilobjilinccoursegui";
124 return "repository.php?cmd=infoScreen&ref_id=".$a_node_id;
127 include_once(
'classes/class.ilLink.php');
144 return "repository.php?cmd=edit&ref_id=".$a_node_id;
147 return "repository.php?cmd=edit&ref_id=".$a_node_id;
151 return "ilias.php?baseClass=ilLMEditorGUI&ref_id=".$a_node_id;
154 return "ilias.php?baseClass=ilHTLMEditorGUI&ref_id=".$a_node_id;
157 return "ilias.php?baseClass=ilSAHSEditGUI&ref_id=".$a_node_id;
160 return "ilias.php?baseClass=ilMediaPoolPresentationGUI&ref_id=".$a_node_id;
164 return "repository.php?ref_id=".$a_node_id.
"&cmdClass=ilobjgroupgui";
167 return "repository.php?ref_id=".$a_node_id.
"&cmdClass=ilobjcoursegui&cmd=edit";
170 return "repository.php?ref_id=".$a_node_id;
173 return "ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=".$a_node_id;
176 return "ilias.php?baseClass=ilExerciseHandlerGUI&cmd=view&ref_id=".$a_node_id;
179 return "repository.php?cmd=edit&ref_id=".$a_node_id;
182 return "repository.php?cmd=edit&cmdClass=ilobjfilegui&ref_id=".$a_node_id;
185 return "repository.php?cmd=edit&ref_id=".$a_node_id;
188 return "ilias.php?baseClass=ilObjTestGUI&ref_id=".$a_node_id;
189 #return "assessment/test.php?ref_id=".$a_node_id;
192 return "survey/survey.php?ref_id=".$a_node_id;
195 return "assessment/questionpool.php?ref_id=".$a_node_id
199 return "survey/questionpool.php?ref_id=".$a_node_id
203 return "survey/survey.php?ref_id=".$a_node_id;
206 return "repository.php?cmd=edit&ref_id=".$a_node_id;
209 return "ilias.php?baseClass=ilLinkResourceHandlerGUI&cmd=editItems&ref_id=".$a_node_id;
212 return "repository.php?cmd=infoScreen&ref_id=".$a_node_id;
261 function getImage($a_name, $a_type =
"", $a_obj_id =
"")
283 include_once
'./Modules/Course/classes/class.ilObjCourse.php';
291 include_once
'./Modules/Course/classes/class.ilCourseParticipants.php';
297 if(($rbacsystem->checkAccess(
'join',$a_ref_id) or
298 $rbacsystem->checkAccess(
'read',$a_ref_id)))
311 if(!$rbacsystem->checkAccess(
"read", $a_ref_id))
316 $query = sprintf(
"SELECT * FROM tst_tests WHERE obj_fi=%s",$a_obj_id);
320 return (
bool)
$row->complete;
325 if(!$rbacsystem->checkAccess(
"read", $a_ref_id))
330 $query = sprintf(
"SELECT * FROM svy_svy WHERE obj_fi=%s",$a_obj_id);
334 return (
bool)
$row->complete;
340 if ($rbacsystem->checkAccess(
"read", $a_ref_id))
352 include_once(
'./Services/ContainerReference/classes/class.ilContainerReferenceAccess.php');
358 if ($rbacsystem->checkAccess(
"read", $a_ref_id))
363 include_once(
"./Modules/LearningModule/classes/class.ilObjLearningModule.php");
365 if((!$lm_obj->getOnline()) && (!$rbacsystem->checkAccess(
'write',$a_ref_id)))
371 if ($a_type ==
"htlm")
373 include_once(
"./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLM.php");
375 if((!$lm_obj->getOnline()) && (!$rbacsystem->checkAccess(
'write',$a_ref_id)))
381 if ($a_type ==
"sahs")
383 include_once(
"./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php");
385 if((!$lm_obj->getOnline()) && (!$rbacsystem->checkAccess(
'write',$a_ref_id)))
391 if ($a_type ==
"glo")
394 include_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
396 (!$rbacsystem->checkAccess(
'write',$a_ref_id)))
414 global $rbacsystem,
$tree;
425 if ($rbacsystem->checkAccess(
"read", $a_ref_id))
437 global $rbacsystem,
$tree;
439 if(!$rbacsystem->checkAccess(
'visible',$a_ref_id))
443 if ($crs_id = $tree->checkForParentType($a_ref_id,
'crs'))
445 if(!$rbacsystem->checkAccess(
'write',$crs_id))
450 if(!$tmp_obj->isActivated())
455 if(($crs_id != $a_ref_id) and $tmp_obj->isArchived())
460 include_once
"./Modules/Course/classes/class.ilCourseItems.php";
496 $tpl->setCurrentBlock(
"icon");
497 $nd = $tree->getNodeData(ROOT_FOLDER_ID);
501 $title = $lng->txt(
"repository");
505 $tpl->setVariable(
"TXT_ALT_IMG", $lng->txt(
"icon").
" ".
$title);
506 $tpl->parseCurrentBlock();
508 $tpl->setCurrentBlock(
"link");
510 $tpl->setVariable(
"LINK_TARGET",
"repository.php?cmd=frameset&ref_id=1");
511 $tpl->setVariable(
"TARGET",
" target=\"_top\"");
512 $tpl->parseCurrentBlock();
514 $tpl->setCurrentBlock(
"element");
515 $tpl->parseCurrentBlock();
527 global $objDefinition;
529 if ($a_parent_obj_id > 0)
535 $parent_type =
"dummy";
536 $this->type_grps[
"dummy"] = array(
"root" =>
"dummy");
539 if (empty($this->type_grps[$parent_type]))
541 $this->type_grps[$parent_type] =
542 $objDefinition->getGroupedRepositoryObjectTypes($parent_type);
546 foreach ($a_nodes as $node)
548 $g = $objDefinition->getGroupOfObj($node[
"type"]);
553 $group[$g][] = $node;
557 foreach ($this->type_grps[$parent_type] as
$t => $g)
559 if (is_array($group[
$t]))
562 include_once(
"./Services/Container/classes/class.ilContainer.php");
563 include_once(
"./Services/Container/classes/class.ilContainerSorting.php");
565 $group = $sort->sortItems($group);
573 foreach ($group[$t] as $k => $item)
592 if (in_array($a_node, $this->force_open_path))