/** * Get chapters * * @param * @return */ function getChapters() { $hc = ilSession::get("help_chap"); $lm_tree = $this->parent_obj->object->getTree(); if ($hc > 0 && $lm_tree->isInTree($hc)) { //$node = $lm_tree->getNodeData($hc); //$chaps = $lm_tree->getSubTree($node); $chaps = $lm_tree->getFilteredSubTree($hc, array("pg")); unset($chaps[0]); } else { $chaps = ilStructureObject::getChapterList($this->parent_obj->object->getId()); } $this->setData($chaps); }
/** * Constructor */ function __construct($a_parent_obj, $a_parent_cmd, $a_validation = false, $a_oh_mode = false) { global $ilCtrl, $lng, $ilAccess, $lng; $this->setOnlineHelpMode($a_oh_mode); $this->setId("lm_expids"); $this->validation = $a_validation; parent::__construct($a_parent_obj, $a_parent_cmd); include_once "./Modules/LearningModule/classes/class.ilLMPageObject.php"; if ($this->getOnlineHelpMode()) { $this->setData(ilStructureObject::getChapterList($this->parent_obj->object->getId())); $this->cnt_exp_ids = ilLMPageObject::getDuplicateExportIDs($this->parent_obj->object->getId(), "st"); } else { $this->setData(ilLMPageObject::getPageList($this->parent_obj->object->getId())); $this->cnt_exp_ids = ilLMPageObject::getDuplicateExportIDs($this->parent_obj->object->getId()); } $this->setTitle($lng->txt("cont_html_export_ids")); $this->addColumn($this->lng->txt("pg"), "title"); $this->addColumn($this->lng->txt("cont_export_id")); $this->setFormAction($ilCtrl->getFormAction($a_parent_obj)); $this->setRowTemplate("tpl.export_id_row.html", "Modules/LearningModule"); $this->setDefaultOrderField("title"); $this->setDefaultOrderDirection("asc"); $this->addCommandButton("saveExportIDs", $lng->txt("save")); }