5 require_once(
"./Services/UIComponent/Explorer/classes/class.ilExplorer.php");
70 $this->lng = $DIC->language();
72 $this->obj_definition = $DIC[
"objDefinition"];
73 $this->rbacsystem = $DIC->rbac()->system();
74 $this->db = $DIC->database();
75 $this->
user = $DIC->user();
76 $this->access = $DIC->access();
77 $tree = $DIC->repositoryTree();
79 $lng = $DIC->language();
81 $objDefinition = $DIC[
"objDefinition"];
86 $this->force_open_path = array();
89 parent::__construct($a_target);
91 $this->root_id = $this->tree->readRootId();
92 $this->order_column =
"title";
97 if (
$ilSetting->get(
"repository_tree_pres") ==
"" ||
98 (
$ilSetting->get(
"rep_tree_limit_grp_crs") && $a_top_node == 0)) {
99 foreach ($objDefinition->getExplorerContainerTypes() as
$type) {
104 } elseif (
$ilSetting->get(
"repository_tree_pres") ==
"all_types") {
105 foreach ($objDefinition->getAllRBACObjects() as $rtype) {
118 $this->force_open_path = $a_path;
130 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $a_node_id);
131 $link =
$ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"");
132 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
136 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $a_node_id);
137 $link =
$ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"redirect");
138 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
142 $ilCtrl->setParameterByClass(
"ilobjgroupgui",
"ref_id", $a_node_id);
143 $link =
$ilCtrl->getLinkTargetByClass(array(
"ilrepositorygui",
"ilobjgroupgui"),
"");
144 $ilCtrl->setParameterByClass(
"ilobjgroupgui",
"ref_id",
$_GET[
"ref_id"]);
147 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $a_node_id);
148 $link =
$ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"redirect");
149 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
153 $ilCtrl->setParameterByClass(
"ilobjcoursegui",
"ref_id", $a_node_id);
154 $link =
$ilCtrl->getLinkTargetByClass(array(
"ilrepositorygui",
"ilobjcoursegui"),
"view");
155 $ilCtrl->setParameterByClass(
"ilobjcoursegui",
"ref_id",
$_GET[
"ref_id"]);
159 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $a_node_id);
160 $link =
$ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"redirect");
161 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
165 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $a_node_id);
166 $link =
$ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"infoScreen");
167 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
171 $ilCtrl->setParameterByClass(
"ilobjstudyprogrammegui",
"ref_id", $a_node_id);
172 $link =
$ilCtrl->getLinkTargetByClass(
"ilobjstudyprogrammegui",
"view");
173 $ilCtrl->setParameterByClass(
"ilobjstudyprogrammegui",
"ref_id",
$_GET[
"ref_id"]);
177 include_once(
'./Services/Link/classes/class.ilLink.php');
235 return ilObject::_getIcon($a_obj_id,
"tiny",
$a_type);
238 return parent::getImage($a_name);
255 if (!
$rbacsystem->checkAccess(
"read", $a_ref_id)) {
259 $query = sprintf(
"SELECT * FROM tst_tests WHERE obj_fi=%s", $a_obj_id);
262 return (
bool)
$row->complete;
267 if (!
$rbacsystem->checkAccess(
"read", $a_ref_id)) {
271 $query = sprintf(
"SELECT * FROM svy_svy WHERE obj_fi=%s", $a_obj_id);
274 return (
bool)
$row->complete;
289 include_once(
'./Services/ContainerReference/classes/class.ilContainerReferenceAccess.php');
292 return $rbacsystem->checkAccess(
"visible", $a_ref_id);
301 include_once(
"./Modules/LearningModule/classes/class.ilObjLearningModule.php");
303 if (($lm_obj->getOfflineStatus()) && (!
$rbacsystem->checkAccess(
'write', $a_ref_id))) {
309 include_once(
"./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLM.php");
311 if (($lm_obj->getOfflineStatus()) && (!
$rbacsystem->checkAccess(
'write', $a_ref_id))) {
317 include_once(
"./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php");
319 if (($lm_obj->getOfflineStatus()) && (!
$rbacsystem->checkAccess(
'write', $a_ref_id))) {
326 include_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
347 if ($a_ref_id == 0) {
366 if (!$ilAccess->checkAccess(
'visible',
'', $a_ref_id)) {
371 $container_parent_id =
$tree->checkForParentType($a_ref_id,
'grp');
372 if (!$container_parent_id) {
374 $container_parent_id =
$tree->checkForParentType($a_ref_id,
'crs');
376 if ($container_parent_id) {
378 if (
$ilSetting->get(
"repository_tree_pres") ==
"all_types" && $container_parent_id != $a_ref_id) {
380 if (!isset($this->session_materials[$container_parent_id])) {
381 include_once
'./Modules/Session/classes/class.ilEventItems.php';
385 if (!isset($this->item_group_items[$container_parent_id])) {
386 include_once
'./Modules/ItemGroup/classes/class.ilItemGroupItems.php';
389 if (in_array($a_ref_id, $this->session_materials[$container_parent_id])) {
392 if (in_array($a_ref_id, $this->item_group_items[$container_parent_id])) {
417 $path = ilObject::_getIcon($a_obj_id,
"tiny",
"root");
419 $tpl->setCurrentBlock(
"icon");
420 $nd =
$tree->getNodeData(ROOT_FOLDER_ID);
427 $tpl->setVariable(
"TXT_ALT_IMG",
$lng->txt(
"icon") .
" " .
$title);
428 $tpl->parseCurrentBlock();
430 $tpl->setCurrentBlock(
"link");
432 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
"1");
435 $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"frameset")
437 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
438 $tpl->setVariable(
"TARGET",
" target=\"_top\"");
439 $tpl->parseCurrentBlock();
441 $tpl->setCurrentBlock(
"element");
442 $tpl->parseCurrentBlock();
456 if ($a_parent_obj_id > 0) {
459 $parent_type =
"dummy";
460 $this->type_grps[
"dummy"] = array(
"root" =>
"dummy");
463 if (empty($this->type_grps[$parent_type])) {
464 $this->type_grps[$parent_type] =
465 $objDefinition->getGroupedRepositoryObjectTypes($parent_type);
469 foreach ($a_nodes as $node) {
470 $g = $objDefinition->getGroupOfObj($node[
"type"]);
474 $group[$g][] = $node;
478 foreach ($this->type_grps[$parent_type] as
$t => $g) {
479 if (is_array($group[
$t])) {
481 include_once(
"./Services/Container/classes/class.ilContainer.php");
482 include_once(
"./Services/Container/classes/class.ilContainerSorting.php");
484 $group = $sort->sortItems($group);
490 foreach ($group[$t] as $k => $item) {
508 if (in_array($a_node, $this->force_open_path)) {
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 _getItemsOfContainer($a_ref_id)
static _getStaticLink( $a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
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)
foreach($_POST as $key=> $value) $res
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!
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