/** * Constructor * * @param object $a_parent_obj parent gui object * @param string $a_parent_cmd parent cmd * @param ilLMPresentationGUI $a_lm_pres learning module presentation gui object * @param string $a_lang language */ function __construct($a_parent_obj, $a_parent_cmd, ilLMPresentationGUI $a_lm_pres, $a_lang = "-") { parent::__construct($a_parent_obj, $a_parent_cmd, $a_lm_pres, $a_lang); include_once "./Modules/LearningModule/classes/class.ilLMObject.php"; $chaps = ilLMObject::_getAllLMObjectsOfLM($this->lm->getId(), $a_type = "st"); foreach ($chaps as $c) { $this->setNodeOpen($c); } }
/** * table of contents */ function ilTOC($a_get_explorer = false) { include_once "./Modules/LearningModule/classes/class.ilLMTOCExplorerGUI.php"; $exp = new ilLMTOCExplorerGUI($this, "ilTOC", $this, $this->lang, $this->focus_id); $exp->setTracker($this->getTracker()); if (!$exp->handleCommand()) { // determine highlighted and force open nodes $page_id = $this->getCurrentPageId(); if ($this->deactivated_page) { $page_id = $_GET["obj_id"]; } if ($page_id > 0) { $exp->setPathOpen((int) $page_id); } // empty chapter if ($this->chapter_has_no_active_page && ilLMObject::_lookupType($_GET["obj_id"]) == "st") { $exp->setHighlightNode($_GET["obj_id"]); } else { if ($this->lm->getTOCMode() == "pages") { if ($this->deactivated_page) { $exp->setHighlightNode($_GET["obj_id"]); } else { $exp->setHighlightNode($page_id); } } else { $exp->setHighlightNode($this->lm_tree->getParentId($page_id)); } } if ($this->offlineMode()) { $exp->setOfflineMode(true); } if ($a_get_explorer) { return $exp; } else { $this->tpl->setCurrentBlock("il_toc"); $this->tpl->setVariable("EXPLORER", $exp->getHTML()); $this->tpl->parseCurrentBlock(); } } }