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();
78 $ilCtrl = $DIC->ctrl();
79 $lng = $DIC->language();
81 $objDefinition = $DIC[
"objDefinition"];
83 $this->ctrl = $ilCtrl;
86 $this->force_open_path = array();
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 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $a_node_id);
178 $link = $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"redirect");
179 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
183 include_once(
'./Services/Link/classes/class.ilLink.php');
241 public function getImage($a_name, $a_type =
"", $a_obj_id =
"")
247 return parent::getImage($a_name);
250 public function isClickable($a_type, $a_ref_id = 0, $a_obj_id = 0)
264 if (!
$rbacsystem->checkAccess(
"read", $a_ref_id)) {
268 $query = sprintf(
"SELECT * FROM tst_tests WHERE obj_fi=%s", $a_obj_id);
271 return (
bool) $row->complete;
276 if (!
$rbacsystem->checkAccess(
"read", $a_ref_id)) {
280 $query = sprintf(
"SELECT * FROM svy_svy WHERE obj_fi=%s", $a_obj_id);
283 return (
bool) $row->complete;
298 include_once(
'./Services/ContainerReference/classes/class.ilContainerReferenceAccess.php');
301 return $rbacsystem->checkAccess(
"visible", $a_ref_id);
309 if ($a_type ==
"lm") {
310 include_once(
"./Modules/LearningModule/classes/class.ilObjLearningModule.php");
312 if (($lm_obj->getOfflineStatus()) && (!
$rbacsystem->checkAccess(
'write', $a_ref_id))) {
317 if ($a_type ==
"htlm") {
318 include_once(
"./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLM.php");
320 if (($lm_obj->getOfflineStatus()) && (!
$rbacsystem->checkAccess(
'write', $a_ref_id))) {
325 if ($a_type ==
"sahs") {
326 include_once(
"./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php");
328 if (($lm_obj->getOfflineStatus()) && (!
$rbacsystem->checkAccess(
'write', $a_ref_id))) {
333 if ($a_type ==
"glo") {
355 if ($a_ref_id == 0) {
374 if (!$ilAccess->checkAccess(
'visible',
'', $a_ref_id)) {
379 $container_parent_id =
$tree->checkForParentType($a_ref_id,
'grp');
380 if (!$container_parent_id) {
382 $container_parent_id =
$tree->checkForParentType($a_ref_id,
'crs');
384 if ($container_parent_id) {
386 if (
$ilSetting->get(
"repository_tree_pres") ==
"all_types" && $container_parent_id != $a_ref_id) {
388 if (!isset($this->session_materials[$container_parent_id])) {
389 include_once
'./Modules/Session/classes/class.ilEventItems.php';
393 if (!isset($this->item_group_items[$container_parent_id])) {
394 include_once
'./Modules/ItemGroup/classes/class.ilItemGroupItems.php';
397 if (in_array($a_ref_id, $this->session_materials[$container_parent_id])) {
400 if (in_array($a_ref_id, $this->item_group_items[$container_parent_id])) {
427 $tpl->setCurrentBlock(
"icon");
429 $title =
$nd[
"title"];
430 if ($title ==
"ILIAS") {
431 $title =
$lng->txt(
"repository");
434 $tpl->setVariable(
"ICON_IMAGE", $path);
435 $tpl->setVariable(
"TXT_ALT_IMG",
$lng->txt(
"icon") .
" " . $title);
436 $tpl->parseCurrentBlock();
438 $tpl->setCurrentBlock(
"link");
439 $tpl->setVariable(
"TITLE", $title);
440 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
"1");
443 $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"frameset")
445 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
446 $tpl->setVariable(
"TARGET",
" target=\"_top\"");
447 $tpl->parseCurrentBlock();
449 $tpl->setCurrentBlock(
"element");
450 $tpl->parseCurrentBlock();
464 if ($a_parent_obj_id > 0) {
467 $parent_type =
"dummy";
468 $this->type_grps[
"dummy"] = array(
"root" =>
"dummy");
471 if (empty($this->type_grps[$parent_type])) {
472 $this->type_grps[$parent_type] =
473 $objDefinition->getGroupedRepositoryObjectTypes($parent_type);
477 foreach ($a_nodes as $node) {
478 $g = $objDefinition->getGroupOfObj($node[
"type"]);
482 $group[$g][] = $node;
486 foreach ($this->type_grps[$parent_type] as $t => $g) {
487 if (is_array($group[$t])) {
489 include_once(
"./Services/Container/classes/class.ilContainer.php");
490 include_once(
"./Services/Container/classes/class.ilContainerSorting.php");
492 $group = $sort->sortItems($group);
498 foreach ($group[$t] as $k => $item) {
516 if (in_array($a_node, $this->force_open_path)) {
static _getIcon( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
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.
__construct(Container $dic, ilPlugin $plugin)
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