/** * Determine layout */ function determineLayout() { if ($this->getExportFormat() == "scorm") { $layout = "1window"; } else { $layout = $this->lm->getLayout(); if ($this->lm->getLayoutPerPage()) { $pg_id = $this->getCurrentPageId(); if (!in_array($_GET["frame"], array("", "_blank")) && $_GET["from_page"] > 0) { $pg_id = (int) $_GET["from_page"]; } // this is needed, e.g. lm is toc2win, page is 3window and media linked to media frame if (in_array($_GET["cmd"], array("media", "glossary")) && $_GET["back_pg"] > 0) { $pg_id = (int) $_GET["back_pg"]; } if ($pg_id > 0) { $lay = ilLMObject::lookupLayout($pg_id); if ($lay != "") { $layout = $lay; } } } } return $layout; }
/** * Fill table row */ protected function fillRow($a_set) { global $lng, $ilCtrl; //var_dump($a_set); // icon... // check activation include_once "./Modules/LearningModule/classes/class.ilLMPage.php"; $active = ilLMPage::_lookupActive($a_set["obj_id"], $this->lm->getType(), $this->lm_set->get("time_scheduled_page_activation")); // is page scheduled? $img_sc = $this->lm_set->get("time_scheduled_page_activation") && ilLMPage::_isScheduledActivation($a_set["obj_id"], $this->lm->getType()) ? "_sc" : ""; if (!$active) { $img = "icon_pg_d" . $img_sc . ".svg"; $alt = $lng->txt("cont_page_deactivated"); } else { if (ilLMPage::_lookupContainsDeactivatedElements($a_set["obj_id"], $this->lm->getType())) { $img = "icon_pg_del" . $img_sc . ".svg"; $alt = $lng->txt("cont_page_deactivated_elements"); } else { $img = "icon_pg" . $img_sc . ".svg"; $alt = $this->lng->txt("pg"); } } $this->tpl->setVariable("ICON", ilUtil::img(ilUtil::getImagePath($img), $alt)); // title/link $ilCtrl->setParameter($this, "backcmd", ""); $ilCtrl->setParameterByClass("ilLMPageObjectGUI", "obj_id", $a_set["obj_id"]); $this->tpl->setVariable("HREF_TITLE", $ilCtrl->getLinkTargetByClass("ilLMPageObjectGUI", "edit")); $this->tpl->setVariable("TITLE", $a_set["title"]); $this->tpl->setVariable("ID", $a_set["obj_id"]); // context if ($this->lm->lm_tree->isInTree($a_set["obj_id"])) { $path_str = $this->parent_obj->getContextPath($a_set["obj_id"]); } else { $path_str = "---"; } // check whether page is header or footer $add_str = ""; if ($a_set["obj_id"] == $this->lm->getHeaderPage()) { $add_str = " <b>(" . $lng->txt("cont_header") . ")</b>"; } if ($a_set["obj_id"] == $this->lm->getFooterPage()) { $add_str .= " <b>(" . $lng->txt("cont_footer") . ")</b>"; } $this->tpl->setVariable("USAGE", $path_str . $add_str); // layout if ($this->lm->getLayoutPerPage()) { if (($l = ilLMObject::lookupLayout($a_set["obj_id"])) != "") { $this->tpl->setVariable("LAYOUT", $lng->txt("cont_layout_" . $l)); } } }
/** * Determine layout */ function determineLayout() { if ($this->getExportFormat() == "scorm") { $layout = "1window"; } else { $layout = $this->lm->getLayout(); if ($this->lm->getLayoutPerPage()) { $pg_id = $this->getCurrentPageId(); if ((in_array($_GET["cmd"], array("media", "glossary")) || !in_array($_GET["frame"], array("", "_blank"))) && $_GET["from_page"] > 0) { $pg_id = (int) $_GET["from_page"]; } if ($pg_id > 0) { $lay = ilLMObject::lookupLayout($pg_id); if ($lay != "") { $layout = $lay; } } } } return $layout; }