/** * put chapter into tree */ function putInTree() { //echo "st:putInTree"; // chapters should be behind pages in the tree // so if target is first node, the target is substituted with // the last child of type pg if ($_GET["target"] == IL_FIRST_NODE) { $tree = new ilTree($this->content_object->getId()); $tree->setTableNames('lm_tree', 'lm_data'); $tree->setTreeTablePK("lm_id"); // determine parent node id $parent_id = !empty($_GET["obj_id"]) ? $_GET["obj_id"] : $tree->getRootId(); // determine last child of type pg $childs =& $tree->getChildsByType($parent_id, "pg"); if (count($childs) != 0) { $_GET["target"] = $childs[count($childs) - 1]["obj_id"]; } } if (empty($_GET["target"])) { $_GET["target"] = IL_LAST_NODE; } parent::putInTree(); }
/** * Constructor * * @param object $a_content_obj content object (lm | dbk) * @access public */ function ilLMPageObjectGUI(&$a_content_obj) { global $ilias, $tpl, $lng; parent::ilLMObjectGUI($a_content_obj); }