/** * build link target */ function buildLinkTarget($a_node_id, $a_type) { if (!$this->offlineMode()) { return parent::buildLinkTarget($a_node_id, $a_type); } else { if ($a_node_id < 1) { $a_node_id = $this->tree->getRootId(); } if ($a_type != "pg") { // get next activated page $found = false; while (!$found) { $a_node = $this->tree->fetchSuccessorNode($a_node_id, "pg"); $a_node_id = $a_node["child"]; include_once "./Modules/LearningModule/classes/class.ilLMPage.php"; $active = ilLMPage::_lookupActive($a_node_id, $this->lm_obj->getType(), $this->lm_set->get("time_scheduled_page_activation")); if ($a_node_id > 0 && !$active) { $found = false; } else { $found = true; } } } if (!$this->lm_obj->cleanFrames()) { return "frame_" . $a_node_id . "_maincontent.html"; } else { return "lm_pg_" . $a_node_id . ".html"; } } }
/** * build link target */ function buildLinkTarget($a_node_id, $a_type) { if (!$this->offlineMode()) { return parent::buildLinkTarget($a_node_id, $a_type); } else { if ($a_node_id < 1) { $a_node_id = $this->tree->getRootId(); } if ($a_type != "pg") { // get next activated page $found = false; while (!$found) { $a_node = $this->tree->fetchSuccessorNode($a_node_id, "pg"); $a_node_id = $a_node["child"]; include_once "./Services/COPage/classes/class.ilPageObject.php"; $active = ilPageObject::_lookupActive($a_node_id, $this->lm_obj->getType(), $this->lm_set->get("time_scheduled_page_activation")); if ($a_node_id > 0 && !$active) { $found = false; } else { $found = true; } } } if ($nid = ilLMPageObject::getExportId($this->lm_obj->getId(), $a_node_id)) { return "lm_pg_" . $nid . ".html"; } else { return "lm_pg_" . $a_node_id . ".html"; } } }