4 include_once(
"./Modules/LearningModule/classes/class.ilLMExplorerGUI.php");
54 $this->
user = $DIC->user();
55 $this->lm_pres = $a_lm_pres;
56 $this->lm = $this->lm_pres->lm;
57 $exp_id = (!$this->
getOfflineMode() && $this->lm->getProgressIcons())
60 parent::__construct($a_parent_obj, $a_parent_cmd, $this->lm, $exp_id);
62 $this->lang = $a_lang;
63 if ($a_focus_id > 0) {
66 if ($this->lm->getTOCMode() !=
"pages") {
69 $this->focus_id = $a_focus_id;
84 $nodes = $this->tree->getCompleteTree();
85 foreach (
$nodes as $node) {
86 $this->complete_tree[
"childs"][$node[
"parent"]][] = $node;
87 $this->complete_tree[
"parent"][$node[
"child"]] = $node[
"parent"];
88 $this->complete_tree[
"nodes"][$node[
"child"]] = $node;
91 $page_ids = array_column($this->complete_tree[
"nodes"],
"child");
92 $this->activation_data = $this->activation_repo->get(
95 $this->lm_set->get(
"time_scheduled_page_activation"),
107 $current_node = $this->complete_tree[
"nodes"][$node_id];
109 if (is_array($this->complete_tree[
"childs"][$node_id])) {
110 foreach ($this->complete_tree[
"childs"][$node_id] as $node) {
116 if ($current_node[
"type"] ==
"pg") {
117 $this->complete_tree[
"visibility"][$node_id] = ($this->activation_data[$node_id][
"active"] ||
118 $this->activation_data[$node_id][
"show_info"]);
119 } elseif ($current_node[
"type"] ==
"st") {
122 $this->complete_tree[
"visibility"][$node_id] =
false;
123 if (is_array($this->complete_tree[
"childs"][$node_id])) {
124 foreach ($this->complete_tree[
"childs"][$node_id] as $node) {
125 if (isset($this->complete_tree[
"visibility"][$node[
"child"]]) &&
126 $this->complete_tree[
"visibility"][$node[
"child"]]) {
127 $this->complete_tree[
"visibility"][$node_id] =
true;
132 $this->complete_tree[
"visibility"][$node_id] =
true;
141 $root_id = $this->
getTree()->readRootId();
142 if ($this->focus_id > 0 && $this->
getTree()->isInTree($this->focus_id) &&
146 return $this->
getTree()->getNodeData($root_id);
156 $this->tracker = $a_val;
176 $this->highlight_node = $a_val;
212 return $this->lm_pres->getLMPresentationTitle();
215 if ($a_node[
"type"] ==
"st") {
219 $this->lm->isActiveNumbering(),
226 } elseif ($a_node[
"type"] ==
"pg") {
229 $this->lm->getPageHeader(),
230 $this->lm->isActiveNumbering(),
231 $this->lm_set->get(
"time_scheduled_page_activation"),
238 return $this->lm->getTitle();
241 return $a_node[
"title"];
263 return $this->tracker->getIconForLMObject($a_node, $this->highlight_node);
266 include_once(
"./Modules/LearningModule/classes/class.ilLMObject.php");
268 if ($a_node[
"type"] ==
"du") {
269 $a_node[
"type"] =
"lm";
271 $a_name =
"icon_" . $a_node[
"type"] .
".svg";
272 if ($a_node[
"type"] ==
"pg") {
273 include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
277 $this->lm->getType(),
278 $lm_set->get(
"time_scheduled_page_activation")
282 $img_sc = (
$lm_set->get(
"time_scheduled_page_activation") &&
288 $a_name =
"icon_pg" . $img_sc .
".svg";
291 $a_name =
"icon_pg_d" . $img_sc .
".svg";
308 $orig_node_id = $a_node[
"child"];
313 if ($this->lm->getRestrictForwardNavigation()) {
314 if ($this->
getTracker()->hasPredIncorrectAnswers($orig_node_id)) {
320 if ($a_node[
"type"] ==
"st") {
322 if ($this->lm->getTOCMode() !=
"pages") {
323 $a_node = $this->
getTree()->fetchSuccessorNode($a_node[
"child"],
"pg");
328 if ($a_node[
"child"] == 0) {
335 if ($this->lm->getTOCMode() !=
"pages") {
336 $a_node = $this->
getTree()->fetchSuccessorNode($a_node[
"child"],
"pg");
340 include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
343 $this->lm->getType(),
344 $this->lm_set->get(
"time_scheduled_page_activation")
347 if ($a_node[
"child"] > 0 && !$active) {
353 if ($a_node[
"child"] <= 0) {
357 if (!in_array($orig_node_id,
$path)) {
364 if ($a_node[
"type"] ==
"pg") {
366 include_once(
"./Modules/LearningModule/classes/class.ilLMObject.php");
395 return $this->lm_pres->getLink($this->lm->getRefId(),
"", $a_node[
"child"]);
398 if ($a_node[
"type"] !=
"pg") {
402 $a_node = $this->
getTree()->fetchSuccessorNode($a_node[
"child"],
"pg");
403 include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
406 $this->lm->getType(),
407 $this->lm_set->get(
"time_scheduled_page_activation")
410 if ($a_node[
"child"] > 0 && !$active) {
419 if ($this->export_all_languages) {
420 if ($this->lang !=
"" && $this->lang !=
"-") {
425 include_once(
"./Modules/LearningModule/classes/class.ilLMPageObject.php");
427 return "lm_pg_" . $nid . $lang_suffix .
".html";
429 return "lm_pg_" . $a_node[
"child"] . $lang_suffix .
".html";
441 return (
bool) $this->complete_tree[
"visibility"][$a_node[
"child"]];
getSuccessorNode($a_node_id, $a_type="")
Get successor node (currently only(!) based on lft/rgt tree values)
isNodeHighlighted($a_node)
Is node highlighted?
LM presentation (left frame) explorer GUI class.
static _lookupType($a_obj_id, $a_lm_id=0)
Lookup type.
isNodeVisible($a_node)
Is node visible?
getRootNode()
Get root node.
setTracker($a_val)
Set tracker.
getHighlightNode()
Get highlighted node.
setSecondaryHighlightedNodes($a_val)
Set secondary (background) highlighted nodes.
static _getPresentationTitle( $a_st_id, $a_mode=IL_CHAPTER_TITLE, $a_include_numbers=false, $a_time_scheduled_activation=false, $a_force_content=false, $a_lm_id=0, $a_lang="-", $a_include_short=false)
get presentation title
setTypeWhiteList($a_val)
Set type white list.
setHighlightNode($a_val)
Set highlighted node.
initTreeData()
Init tree data.
Class ilLMPresentationGUI.
checkLPIcon($a_id)
Check learning progress icon.
static _lookupActive($a_id, $a_parent_type, $a_check_scheduled_activation=false, $a_lang="-")
lookup activation status
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
getNodeHref($a_node)
Get href for node.
LM editor explorer GUI class.
static getExportId($a_lm_id, $a_lmobj_id, $a_type="pg")
Get export ID.
getNodeId($a_node)
Get id for node.
__construct( $a_parent_obj, $a_parent_cmd, ilLMPresentationGUI $a_lm_pres, $a_lang="-", $a_focus_id=0, $export_all_languages=false)
Constructor.
initVisibilityData($node_id)
Init visibility data.
getOfflineMode()
Get offline mode.
static _isScheduledActivation($a_id, $a_parent_type, $a_lang="-")
Check whether page is activated by time schedule.
isNodeClickable($a_node)
Is node clickable.
static _getPresentationTitle( $a_pg_id, $a_mode=IL_CHAPTER_TITLE, $a_include_numbers=false, $a_time_scheduled_activation=false, $a_force_content=false, $a_lm_id=0, $a_lang="-", $a_include_short=false)
presentation title doesn't have to be page title, it may be chapter title + page title or chapter tit...
getNodeIcon($a_node)
Get node icon.
getNodeIconAlt($a_node)
Get node icon alt text.
static _isPagePublic($a_node_id, $a_check_public_mode=false)
getNodeContent($a_node)
Get node content.