ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilLMTOCExplorerGUI Class Reference

LM presentation (left frame) explorer GUI class. More...

+ Inheritance diagram for ilLMTOCExplorerGUI:
+ Collaboration diagram for ilLMTOCExplorerGUI:

Public Member Functions

 __construct ( $a_parent_obj, $a_parent_cmd, ilLMPresentationService $service, $a_lang="-", $a_focus_id=0, $export_all_languages=false)
 Constructor. More...
 
 getRootNode ()
 Get root node. More...
 
 setTracker ($a_val)
 Set tracker. More...
 
 getTracker ()
 Get tracker. More...
 
 setHighlightNode ($a_val)
 Set highlighted node. More...
 
 getHighlightNode ()
 Get highlighted node. More...
 
 isNodeHighlighted ($a_node)
 Is node highlighted? More...
 
 getNodeContent ($a_node)
 Get node content. More...
 
 getNodeIcon ($a_node)
 Get node icon. More...
 
 isNodeClickable ($a_node)
 Is node clickable. More...
 
 getNodeIconAlt ($a_node)
 Get node icon alt text. More...
 
 getNodeHref ($a_node)
 Get href for node. More...
 
 isNodeVisible ($a_node)
 Is node visible? More...
 
- Public Member Functions inherited from ilLMExplorerGUI
 __construct ($a_parent_obj, $a_parent_cmd, ilObjContentObject $a_lm, $a_id="")
 Constructor. More...
 
 beforeRendering ()
 Before rendering. More...
 
 getNodeContent ($a_node)
 Get node content. More...
 
 isNodeHighlighted ($a_node)
 Is node highlighted? More...
 
- Public Member Functions inherited from ilTreeExplorerGUI
 __construct ($a_expl_id, $a_parent_obj, $a_parent_cmd, $a_tree)
 Constructor. More...
 
 getTree ()
 Get tree. More...
 
 setOrderField ($a_val, $a_numeric=false)
 Set order field. More...
 
 getOrderField ()
 Get order field. More...
 
 setTypeWhiteList ($a_val)
 Set type white list. More...
 
 getTypeWhiteList ()
 Get type white list. More...
 
 setTypeBlackList ($a_val)
 Set type black list. More...
 
 getTypeBlackList ()
 Get type black list. More...
 
 setPreloadChilds ($a_val)
 Set preload childs. More...
 
 getPreloadChilds ()
 Get preload childs. More...
 
 getSuccessorNode ($a_node_id, $a_type="")
 Get successor node (currently only(!) based on lft/rgt tree values) More...
 
 getChildsOfNode ($a_parent_node_id)
 Get childs of node. More...
 
 getNodeId ($a_node)
 Get id for node. More...
 
 getNodeIconAlt ($a_node)
 Get node icon alt attribute. More...
 
 getRootNode ()
 Get root node. More...
 
 setRootId ($a_root)
 
 setPathOpen ($a_id)
 Set node path to be opened. More...
 
 getHTML ($new=false)
 Get HTML. More...
 
 getChildren ($node, $environment=null)
 Get a list of records (that list can also be empty).Each record will be relayed to $this->build to retrieve a Node. Also, each record will be asked for Sub-Nodes using this function.
Returns
array
More...
 
 build (\ILIAS\UI\Component\Tree\Node\Factory $factory, $record, $environment=null)
 
 getTreeLabel ()
 
 getTreeComponent ()
 Get Tree UI. More...
 
 toggleExplorerNodeState ()
 Should be called by an ilCtrl-enabled command class if a tree node toggle action should be processed. More...
 
- Public Member Functions inherited from ilExplorerBaseGUI
 __construct ($a_expl_id, $a_parent_obj, $a_parent_cmd)
 Constructor. More...
 
 setChildLimit ($a_val)
 Set child limit. More...
 
 getChildLimit ()
 Get child limit. More...
 
 setSearchTerm ($a_val)
 Set search term. More...
 
 getSearchTerm ()
 Get search term. More...
 
 setMainTemplate ($a_main_tpl=null)
 Set main template (that is responsible for adding js/css) More...
 
 getRootNode ()
 Get root node. More...
 
 getChildsOfNode ($a_parent_node_id)
 Get childs of node. More...
 
 getNodeContent ($a_node)
 Get content of a node. More...
 
 getNodeId ($a_node)
 Get id of a node. More...
 
 getNodeHref ($a_node)
 Get href for node. More...
 
 nodeHasVisibleChilds ($a_node)
 Node has childs? More...
 
 sortChilds ($a_childs, $a_parent_node_id)
 Sort childs. More...
 
 getNodeIcon ($a_node)
 Get node icon path. More...
 
 getNodeIconAlt ($a_node)
 Get node icon alt attribute. More...
 
 getNodeTarget ($a_node)
 Get node target (frame) attribute. More...
 
 getNodeOnClick ($a_node)
 Get node onclick attribute. More...
 
 isNodeVisible ($a_node)
 Is node visible? More...
 
 isNodeHighlighted ($a_node)
 Is node highlighted? More...
 
 isNodeClickable ($a_node)
 Is node clickable? More...
 
 getId ()
 Get id of explorer element. More...
 
 setSkipRootNode ($a_val)
 Set skip root node. More...
 
 getSkipRootNode ()
 Get skip root node. More...
 
 setAjax ($a_val)
 Set ajax. More...
 
 getAjax ()
 Get ajax. More...
 
 setSecondaryHighlightedNodes ($a_val)
 Set secondary (background) highlighted nodes. More...
 
 getSecondaryHighlightedNodes ()
 Get secondary (background) highlighted nodes. More...
 
 setNodeOpen ($a_id)
 Set node to be opened (additional custom opened node, not standard expand behaviour) More...
 
 setSelectMode ($a_postvar, $a_multi=false)
 Set select mode (to deactivate, pass an empty string as postvar) More...
 
 setNodeSelected ($a_id)
 Set node to be opened (additional custom opened node, not standard expand behaviour) More...
 
 setOfflineMode ($a_val)
 Set offline mode. More...
 
 getOfflineMode ()
 Get offline mode. More...
 
 handleCommand ()
 Handle explorer internal command. More...
 
 getContainerId ()
 Get container id. More...
 
 openNode ()
 Open node. More...
 
 closeNode ()
 Close node. More...
 
 getNodeAsync ()
 Get node asynchronously. More...
 
 beforeRendering ()
 Before rendering. More...
 
 getOnLoadCode ()
 Get on load code. More...
 
 getHTML ()
 Get HTML. More...
 
 renderNode ($a_node, $tpl)
 Render node. More...
 
 renderChilds ($a_node_id, $tpl)
 Render childs. More...
 
 getDomNodeIdForNodeId ($a_node_id)
 Get DOM node id for node id. More...
 
 getNodeIdForDomNodeId ($a_dom_node_id)
 Get node id for dom node id. More...
 
 listItemStart ($tpl, $a_node)
 List item start. More...
 
 listItemEnd ($tpl)
 List item end. More...
 
 listStart ($tpl)
 List start. More...
 
 listEnd ($tpl)
 List end. More...
 
 isNodeOnclickEnabled ()
 
 setNodeOnclickEnabled ($nodeOnclickEnabled)
 
 isEnableDnd ()
 
 setEnableDnd ($enable_dnd)
 Enable Drag & Drop functionality. More...
 
- Public Member Functions inherited from ILIAS\UI\Component\Tree\TreeRecursion
 getChildren ( $record, $environment=null)
 Get a list of records (that list can also be empty). More...
 
 build (Node\Factory $factory, $record, $environment=null)
 Build and return a Node. More...
 

Protected Member Functions

 initTreeData ()
 Init tree data. More...
 
 initVisibilityData ($node_id)
 Init visibility data. More...
 
- Protected Member Functions inherited from ilLMExplorerGUI
 checkLPIcon ($a_id)
 Check learning progress icon. More...
 
- Protected Member Functions inherited from ilTreeExplorerGUI
 preloadChilds ()
 Preload childs. More...
 
 matches ($node)
 Does a node match a search term (or is search term empty) More...
 
 getRootId ()
 
 createNode (\ILIAS\UI\Component\Tree\Node\Factory $factory, $record)
 Creates at tree node, can be overwritten in derivatives if another node type should be used. More...
 
 getNodeStateToggleCmdClasses ($record)
 Should return an array of ilCtrl-enabled command classes which should be used to build the URL for the expand/collapse actions applied on a tree node. More...
 
 render ()
 Render tree. More...
 
- Protected Member Functions inherited from ilExplorerBaseGUI
 isNodeSelectable ($a_node)
 Is node selectable? More...
 
 getNodeToggleOnClick ($a_node)
 Get onclick attribute for node toggling. More...
 
 getSelectOnClick ($a_node)
 Get onclick attribute for selecting radio/checkbox. More...
 
 isNodeOpen ($node_id)
 Get all open nodes. More...
 
 getJSTreePlugins ()
 

Protected Attributes

 $lang
 
 $highlight_node
 
 $export_all_languages
 
 $activation_repo
 
 $complete_tree
 
 $activation_data
 
 $lm
 
 $lm_set
 
 $linker
 
 $focus_id
 
 $service
 
 $tracker
 
- Protected Attributes inherited from ilLMExplorerGUI
 $user
 
 $lp_cache
 
 $cnt_lmobj
 
- Protected Attributes inherited from ilTreeExplorerGUI
 $lng
 
 $httpRequest
 
 $tree = null
 
 $tree_label = ""
 
 $order_field = ""
 
 $order_field_numeric = false
 
 $type_white_list = array()
 
 $type_black_list = array()
 
 $childs = array()
 
 $preloaded = false
 
 $preload_childs = false
 
 $root_node_data = null
 
 $all_childs = array()
 
 $ui
 
- Protected Attributes inherited from ilExplorerBaseGUI
 $log
 
 $ctrl
 
 $tpl
 
 $skip_root_node = false
 
 $ajax = false
 
 $custom_open_nodes = array()
 
 $selected_nodes = array()
 
 $select_postvar = ""
 
 $offline_mode = false
 
 $sec_highl_nodes = array()
 
 $enable_dnd = false
 
 $search_term = ""
 
 $open_nodes = []
 
 $store
 
 $parent_obj
 
 $child_limit = 0
 
 $parent_cmd = ''
 

Additional Inherited Members

- Static Public Member Functions inherited from ilExplorerBaseGUI
static getLocalExplorerJsPath ()
 Get local path of explorer js. More...
 
static getLocalJsTreeJsPath ()
 Get local path of jsTree js. More...
 
static getLocalJsTreeCssPath ()
 Get local path of jsTree js. More...
 
static createHTMLExportDirs ($a_target_dir)
 Create html export directories. More...
 
static init ($a_main_tpl=null)
 Init JS. More...
 
- Static Protected Attributes inherited from ilExplorerBaseGUI
static $js_tree_path = "./libs/bower/bower_components/jstree/dist/jstree.js"
 
static $js_tree_path_css = "./libs/bower/bower_components/jstree/dist/themes/default/style.min.css"
 
static $js_expl_path = "./Services/UIComponent/Explorer2/js/Explorer2.js"
 

Detailed Description

LM presentation (left frame) explorer GUI class.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 12 of file class.ilLMTOCExplorerGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilLMTOCExplorerGUI::__construct (   $a_parent_obj,
  $a_parent_cmd,
ilLMPresentationService  $service,
  $a_lang = "-",
  $a_focus_id = 0,
  $export_all_languages = false 
)

Constructor.

Parameters
object | string$a_parent_objparent gui object
string$a_parent_cmdparent cmd
ilLMPresentationService$service
string$a_langlanguage

Definition at line 68 of file class.ilLMTOCExplorerGUI.php.

75 {
76 global $DIC;
77
78 $this->service = $service;
79 $this->user = $DIC->user();
80 $this->lm = $service->getLearningModule();
81 $this->linker = $service->getLinker();
82 $this->tracker = $service->getTracker();
83
84 $exp_id = (!$this->getOfflineMode() && $this->lm->getProgressIcons())
85 ? "ilLMProgressTree"
86 : "";
87 parent::__construct($a_parent_obj, $a_parent_cmd, $this->lm, $exp_id);
88 $this->lm_set = new ilSetting("lm");
89 $this->lang = $a_lang;
90 if ($a_focus_id > 0) {
91 $this->setSecondaryHighlightedNodes(array($a_focus_id));
92 }
93 if ($this->lm->getTOCMode() != "pages") {
94 $this->setTypeWhiteList(array("st", "du"));
95 }
96 $this->focus_id = $a_focus_id;
97 $this->export_all_languages = $export_all_languages;
98
99 $this->activation_repo = new ilPageActivationDBRepository();
100
101 $this->initTreeData();
102 }
user()
Definition: user.php:4
setSecondaryHighlightedNodes($a_val)
Set secondary (background) highlighted nodes.
getOfflineMode()
Get offline mode.
ILIAS Setting Class.
setTypeWhiteList($a_val)
Set type white list.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$DIC
Definition: xapitoken.php:46

References $DIC, $export_all_languages, $service, ILIAS\GlobalScreen\Provider\__construct(), ilExplorerBaseGUI\getOfflineMode(), initTreeData(), ilExplorerBaseGUI\setSecondaryHighlightedNodes(), ilTreeExplorerGUI\setTypeWhiteList(), and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ getHighlightNode()

ilLMTOCExplorerGUI::getHighlightNode ( )

Get highlighted node.

Returns
int node id

Definition at line 211 of file class.ilLMTOCExplorerGUI.php.

References $highlight_node.

Referenced by isNodeHighlighted().

+ Here is the caller graph for this function:

◆ getNodeContent()

ilLMTOCExplorerGUI::getNodeContent (   $a_node)

Get node content.

Parameters
array$a_nodenode array
Returns
string node content

Reimplemented from ilLMExplorerGUI.

Definition at line 236 of file class.ilLMTOCExplorerGUI.php.

237 {
238 if ($a_node["child"] == $this->getNodeId($this->getRootNode())) {
239 return $this->service->getPresentationStatus()->getLMPresentationTitle();
240 }
241
242 if ($a_node["type"] == "st") {
244 $a_node["child"],
245 ilLMOBject::CHAPTER_TITLE,
246 $this->lm->isActiveNumbering(),
247 false,
248 false,
249 $this->lm->getId(),
250 $this->lang,
251 true
252 );
253 } elseif ($a_node["type"] == "pg") {
255 $a_node["child"],
256 $this->lm->getPageHeader(),
257 $this->lm->isActiveNumbering(),
258 $this->lm_set->get("time_scheduled_page_activation"),
259 true,
260 $this->lm->getId(),
261 $this->lang,
262 true
263 );
264 } elseif ($a_node["child"] == $this->getNodeId($this->getRootNode())) {
265 return $this->lm->getTitle();
266 }
267
268 return $a_node["title"];
269 }
static _getPresentationTitle( $a_pg_id, $a_mode=self::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...
static _getPresentationTitle( $a_st_id, $a_mode=self::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
getNodeId($a_node)
Get id for node.

References ilLMPageObject\_getPresentationTitle(), ilStructureObject\_getPresentationTitle(), ilTreeExplorerGUI\getNodeId(), and getRootNode().

+ Here is the call graph for this function:

◆ getNodeHref()

ilLMTOCExplorerGUI::getNodeHref (   $a_node)

Get href for node.

Parameters
mixed$a_nodenode object/array
Returns
string href attribute

Reimplemented from ilExplorerBaseGUI.

Definition at line 414 of file class.ilLMTOCExplorerGUI.php.

415 {
416 if (!$this->getOfflineMode()) {
417 return $this->linker->getLink("", $a_node["child"]);
418 //return parent::buildLinkTarget($a_node_id, $a_type);
419 } else {
420 if ($a_node["type"] != "pg") {
421 // get next activated page
422 $found = false;
423 while (!$found) {
424 $a_node = $this->getTree()->fetchSuccessorNode($a_node["child"], "pg");
425 $active = ilLMPage::_lookupActive(
426 $a_node["child"],
427 $this->lm->getType(),
428 $this->lm_set->get("time_scheduled_page_activation")
429 );
430
431 if ($a_node["child"] > 0 && !$active) {
432 $found = false;
433 } else {
434 $found = true;
435 }
436 }
437 }
438
439 $lang_suffix = "";
440 if ($this->export_all_languages) {
441 if ($this->lang != "" && $this->lang != "-") {
442 $lang_suffix = "_" . $this->lang;
443 }
444 }
445
446 if ($nid = ilLMPageObject::getExportId($this->lm->getId(), $a_node["child"])) {
447 return "lm_pg_" . $nid . $lang_suffix . ".html";
448 }
449 return "lm_pg_" . $a_node["child"] . $lang_suffix . ".html";
450 }
451 }
static getExportId($a_lm_id, $a_lmobj_id, $a_type="pg")
Get export ID.
static _lookupActive($a_id, $a_parent_type, $a_check_scheduled_activation=false, $a_lang="-")
lookup activation status

References $lang, ilPageObject\_lookupActive(), ilLMObject\getExportId(), ilExplorerBaseGUI\getOfflineMode(), and ilTreeExplorerGUI\getTree().

+ Here is the call graph for this function:

◆ getNodeIcon()

ilLMTOCExplorerGUI::getNodeIcon (   $a_node)

Get node icon.

Parameters
array$a_nodenode array
Returns
string icon path

Reimplemented from ilExplorerBaseGUI.

Definition at line 278 of file class.ilLMTOCExplorerGUI.php.

279 {
280 // overwrite chapter icons with lp info?
281 if (!$this->getOfflineMode() && $a_node["type"] == "st") {
282 $icon = $this->checkLPIcon($a_node["child"]);
283 if ($icon != "") {
284 return $icon;
285 }
286 }
287
288 // use progress icons (does not depend on lp mode)
289 if (!$this->getOfflineMode() && $this->lm->getProgressIcons()) {
290 return $this->tracker->getIconForLMObject($a_node, $this->highlight_node);
291 }
292
293 if ($a_node["type"] == "du") {
294 $a_node["type"] = "lm";
295 }
296 $a_name = "icon_" . $a_node["type"] . ".svg";
297 if ($a_node["type"] == "pg") {
298 $lm_set = new ilSetting("lm");
299 $active = ilLMPage::_lookupActive(
300 $a_node["child"],
301 $this->lm->getType(),
302 $lm_set->get("time_scheduled_page_activation")
303 );
304
305 // is page scheduled?
306 $img_sc = ($lm_set->get("time_scheduled_page_activation") &&
307 ilLMPage::_isScheduledActivation($a_node["child"], $this->lm->getType()) && !$active
308 && !$this->getOfflineMode())
309 ? "_sc"
310 : "";
311
312 $a_name = "icon_pg" . $img_sc . ".svg";
313
314 if (!$active && !$this->getOfflineMode()) {
315 $a_name = "icon_pg_d" . $img_sc . ".svg";
316 }
317 }
318
319 return ilUtil::getImagePath($a_name, false, "output", $this->getOfflineMode());
320 }
checkLPIcon($a_id)
Check learning progress icon.
static _isScheduledActivation($a_id, $a_parent_type, $a_lang="-")
Check whether page is activated by time schedule.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)

References $lm_set, ilPageObject\_isScheduledActivation(), ilPageObject\_lookupActive(), ilLMExplorerGUI\checkLPIcon(), ilUtil\getImagePath(), and ilExplorerBaseGUI\getOfflineMode().

+ Here is the call graph for this function:

◆ getNodeIconAlt()

ilLMTOCExplorerGUI::getNodeIconAlt (   $a_node)

Get node icon alt text.

Parameters
array$a_nodenode array
Returns
string alt text

Reimplemented from ilTreeExplorerGUI.

Definition at line 404 of file class.ilLMTOCExplorerGUI.php.

405 {
406 }

◆ getRootNode()

ilLMTOCExplorerGUI::getRootNode ( )

Get root node.

Reimplemented from ilTreeExplorerGUI.

Definition at line 166 of file class.ilLMTOCExplorerGUI.php.

167 {
168 $root_id = $this->getTree()->readRootId();
169 if ($this->focus_id > 0 && $this->getTree()->isInTree($this->focus_id) &&
170 ilLMObject::_lookupType($this->focus_id) == "st") {
171 // $root_id = $this->focus_id;
172 }
173 return $this->getTree()->getNodeData($root_id);
174 }
static _lookupType($a_obj_id, $a_lm_id=0)
Lookup type.

References ilLMObject\_lookupType(), and ilTreeExplorerGUI\getTree().

Referenced by getNodeContent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTracker()

ilLMTOCExplorerGUI::getTracker ( )

Get tracker.

Returns
ilLMTracker tracker object

Definition at line 191 of file class.ilLMTOCExplorerGUI.php.

References $tracker.

Referenced by isNodeClickable().

+ Here is the caller graph for this function:

◆ initTreeData()

ilLMTOCExplorerGUI::initTreeData ( )
protected

Init tree data.

Parameters

return

Definition at line 109 of file class.ilLMTOCExplorerGUI.php.

110 {
111 $nodes = $this->tree->getCompleteTree();
112 foreach ($nodes as $node) {
113 $this->complete_tree["childs"][$node["parent"]][] = $node;
114 $this->complete_tree["parent"][$node["child"]] = $node["parent"];
115 $this->complete_tree["nodes"][$node["child"]] = $node;
116 }
117
118 $page_ids = array_column($this->complete_tree["nodes"], "child");
119 $this->activation_data = $this->activation_repo->get(
120 "lm",
121 $page_ids,
122 $this->lm_set->get("time_scheduled_page_activation"),
123 $this->lang
124 );
125 $this->initVisibilityData($this->tree->readRootId());
126 }
initVisibilityData($node_id)
Init visibility data.

References initVisibilityData().

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initVisibilityData()

ilLMTOCExplorerGUI::initVisibilityData (   $node_id)
protected

Init visibility data.

Parameters
int$node_id

Definition at line 132 of file class.ilLMTOCExplorerGUI.php.

133 {
134 $current_node = $this->complete_tree["nodes"][$node_id];
135
136 if (is_array($this->complete_tree["childs"][$node_id])) {
137 foreach ($this->complete_tree["childs"][$node_id] as $node) {
138 $this->initVisibilityData($node["child"]);
139 }
140 }
141
142 // pages are visible if they are active or activation info should be shown
143 if ($current_node["type"] == "pg") {
144 $this->complete_tree["visibility"][$node_id] = ($this->activation_data[$node_id]["active"] ||
145 $this->activation_data[$node_id]["show_info"]);
146 } elseif ($current_node["type"] == "st") {
147
148 // make chapters visible as soon as there is one visible child
149 $this->complete_tree["visibility"][$node_id] = false;
150 if (is_array($this->complete_tree["childs"][$node_id])) {
151 foreach ($this->complete_tree["childs"][$node_id] as $node) {
152 if (isset($this->complete_tree["visibility"][$node["child"]]) &&
153 $this->complete_tree["visibility"][$node["child"]]) {
154 $this->complete_tree["visibility"][$node_id] = true;
155 }
156 }
157 }
158 } else {
159 $this->complete_tree["visibility"][$node_id] = true;
160 }
161 }

References initVisibilityData().

Referenced by initTreeData(), and initVisibilityData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isNodeClickable()

ilLMTOCExplorerGUI::isNodeClickable (   $a_node)

Is node clickable.

Parameters
array$a_nodenode array
Returns
bool clickable?

Reimplemented from ilExplorerBaseGUI.

Definition at line 328 of file class.ilLMTOCExplorerGUI.php.

329 {
331
332 $orig_node_id = $a_node["child"];
333
334 // if navigation is restricted based on correct answered questions
335 // check if we have preceeding pages including unsanswered/incorrect answered questions
336 if (!$this->getOfflineMode()) {
337 if ($this->lm->getRestrictForwardNavigation()) {
338 if ($this->getTracker()->hasPredIncorrectAnswers($orig_node_id)) {
339 return false;
340 }
341 }
342 }
343
344 if ($a_node["type"] == "st") {
345 if (!$this->getOfflineMode()) {
346 if ($this->lm->getTOCMode() != "pages") {
347 $a_node = $this->getTree()->fetchSuccessorNode($a_node["child"], "pg");
348 } else {
349 // faster, but needs pages to be in explorer
350 $a_node = $this->getSuccessorNode($a_node["child"], "pg");
351 }
352 if ($a_node["child"] == 0) {
353 return false;
354 }
355 } else {
356 // get next activated page
357 $found = false;
358 while (!$found) {
359 if ($this->lm->getTOCMode() != "pages") {
360 $a_node = $this->getTree()->fetchSuccessorNode($a_node["child"], "pg");
361 } else {
362 $a_node = $this->getSuccessorNode($a_node["child"], "pg");
363 }
364 $active = ilLMPage::_lookupActive(
365 $a_node["child"],
366 $this->lm->getType(),
367 $this->lm_set->get("time_scheduled_page_activation")
368 );
369
370 if ($a_node["child"] > 0 && !$active) {
371 $found = false;
372 } else {
373 $found = true;
374 }
375 }
376 if ($a_node["child"] <= 0) {
377 return false;
378 } else {
379 $path = $this->getTree()->getPathId($a_node["child"]);
380 if (!in_array($orig_node_id, $path)) {
381 return false;
382 }
383 }
384 }
385 }
386
387 if ($a_node["type"] == "pg") {
388 // check public area mode
389 if ($ilUser->getId() == ANONYMOUS_USER_ID && !ilLMObject::_isPagePublic($a_node["child"], true)) {
390 return false;
391 }
392 }
393
394 return true;
395 }
static _isPagePublic($a_node_id, $a_check_public_mode=false)
getSuccessorNode($a_node_id, $a_type="")
Get successor node (currently only(!) based on lft/rgt tree values)
$ilUser
Definition: imgupload.php:18

References $ilUser, ilLMExplorerGUI\$user, ilLMObject\_isPagePublic(), ilPageObject\_lookupActive(), ilExplorerBaseGUI\getOfflineMode(), ilTreeExplorerGUI\getSuccessorNode(), getTracker(), and ilTreeExplorerGUI\getTree().

+ Here is the call graph for this function:

◆ isNodeHighlighted()

ilLMTOCExplorerGUI::isNodeHighlighted (   $a_node)

Is node highlighted?

Parameters
mixed$a_nodenode object/array
Returns
boolean node visible true/false

Reimplemented from ilLMExplorerGUI.

Definition at line 222 of file class.ilLMTOCExplorerGUI.php.

223 {
224 if ($a_node["child"] == $this->getHighlightNode()) {
225 return true;
226 }
227 return false;
228 }
getHighlightNode()
Get highlighted node.

References getHighlightNode().

+ Here is the call graph for this function:

◆ isNodeVisible()

ilLMTOCExplorerGUI::isNodeVisible (   $a_node)

Is node visible?

Parameters
mixed$a_nodenode object/array
Returns
boolean node visible true/false

Reimplemented from ilExplorerBaseGUI.

Definition at line 459 of file class.ilLMTOCExplorerGUI.php.

460 {
461 return (bool) $this->complete_tree["visibility"][$a_node["child"]];
462 }

◆ setHighlightNode()

ilLMTOCExplorerGUI::setHighlightNode (   $a_val)

Set highlighted node.

Parameters
int$a_valnode id

Definition at line 201 of file class.ilLMTOCExplorerGUI.php.

202 {
203 $this->highlight_node = $a_val;
204 }

◆ setTracker()

ilLMTOCExplorerGUI::setTracker (   $a_val)

Set tracker.

Parameters
ilLMTracker$a_valtracker object

Definition at line 181 of file class.ilLMTOCExplorerGUI.php.

182 {
183 $this->tracker = $a_val;
184 }

Field Documentation

◆ $activation_data

ilLMTOCExplorerGUI::$activation_data
protected

Definition at line 31 of file class.ilLMTOCExplorerGUI.php.

◆ $activation_repo

ilLMTOCExplorerGUI::$activation_repo
protected

Definition at line 21 of file class.ilLMTOCExplorerGUI.php.

◆ $complete_tree

ilLMTOCExplorerGUI::$complete_tree
protected

Definition at line 26 of file class.ilLMTOCExplorerGUI.php.

◆ $export_all_languages

ilLMTOCExplorerGUI::$export_all_languages
protected

Definition at line 16 of file class.ilLMTOCExplorerGUI.php.

Referenced by __construct().

◆ $focus_id

ilLMTOCExplorerGUI::$focus_id
protected

Definition at line 48 of file class.ilLMTOCExplorerGUI.php.

◆ $highlight_node

ilLMTOCExplorerGUI::$highlight_node
protected

Definition at line 15 of file class.ilLMTOCExplorerGUI.php.

Referenced by getHighlightNode().

◆ $lang

ilLMTOCExplorerGUI::$lang
protected

Definition at line 14 of file class.ilLMTOCExplorerGUI.php.

Referenced by getNodeHref().

◆ $linker

ilLMTOCExplorerGUI::$linker
protected

Definition at line 46 of file class.ilLMTOCExplorerGUI.php.

◆ $lm

ilLMTOCExplorerGUI::$lm
protected

Definition at line 36 of file class.ilLMTOCExplorerGUI.php.

◆ $lm_set

ilLMTOCExplorerGUI::$lm_set
protected

Definition at line 41 of file class.ilLMTOCExplorerGUI.php.

Referenced by getNodeIcon().

◆ $service

ilLMTOCExplorerGUI::$service
protected

Definition at line 53 of file class.ilLMTOCExplorerGUI.php.

Referenced by __construct().

◆ $tracker

ilLMTOCExplorerGUI::$tracker
protected

Definition at line 58 of file class.ilLMTOCExplorerGUI.php.

Referenced by getTracker().


The documentation for this class was generated from the following file: