function pages()
 {
     global $tree, $tpl, $ilToolbar, $ilCtrl, $lng;
     $this->setTabs();
     $this->setContentSubTabs("pages");
     if (!false) {
         $ilCtrl->setParameter($this, "backcmd", "pages");
         $ilCtrl->setParameterByClass("illmpageobjectgui", "new_type", "pg");
         $ilToolbar->addButton($lng->txt("pg_add"), $ilCtrl->getLinkTargetByClass("illmpageobjectgui", "create"));
         $ilCtrl->setParameterByClass("illmpageobjectgui", "new_type", "");
         include_once "./Modules/LearningModule/classes/class.ilLMPagesTableGUI.php";
         $t = new ilLMPagesTableGUI($this, "pages", $this->object);
         $tpl->setContent($t->getHTML());
         return;
     }
     $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.all_pages.html", "Modules/LearningModule");
     $num = 0;
     $this->tpl->setCurrentBlock("form");
     $this->ctrl->setParameter($this, "backcmd", "pages");
     $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
     $this->tpl->setVariable("HEADER_TEXT", $this->lng->txt("cont_pages"));
     $this->tpl->setVariable("CONTEXT", $this->lng->txt("cont_usage"));
     $this->tpl->setVariable("CHECKBOX_TOP", IL_FIRST_NODE);
     $cnt = 0;
     $pages = ilLMPageObject::getPageList($this->object->getId());
     foreach ($pages as $page) {
         $this->tpl->setCurrentBlock("table_row");
         // check activation
         include_once "./Modules/LearningModule/classes/class.ilLMPage.php";
         $lm_set = new ilSetting("lm");
         $active = ilLMPage::_lookupActive($page["obj_id"], $this->object->getType(), $lm_set->get("time_scheduled_page_activation"));
         // is page scheduled?
         $img_sc = $lm_set->get("time_scheduled_page_activation") && ilLMPage::_isScheduledActivation($page["obj_id"], $this->object->getType()) ? "_sc" : "";
         if (!$active) {
             $this->tpl->setVariable("IMG_OBJ", ilUtil::getImagePath("icon_pg_d" . $img_sc . ".png"));
             $this->tpl->setVariable("IMG_ALT", $this->lng->txt("cont_page_deactivated"));
         } else {
             if (ilLMPage::_lookupContainsDeactivatedElements($page["obj_id"], $this->object->getType())) {
                 $this->tpl->setVariable("IMG_OBJ", ilUtil::getImagePath("icon_pg_del" . $img_sc . ".png"));
                 $this->tpl->setVariable("IMG_ALT", $this->lng->txt("cont_page_deactivated_elements"));
             } else {
                 $this->tpl->setVariable("IMG_OBJ", ilUtil::getImagePath("icon_pg" . $img_sc . ".png"));
                 $this->tpl->setVariable("IMG_ALT", $this->lng->txt("pg"));
             }
         }
         // color changing
         $css_row = ilUtil::switchColor($cnt++, "tblrow1", "tblrow2");
         // checkbox
         $this->tpl->setVariable("CHECKBOX_ID", $page["obj_id"]);
         $this->tpl->setVariable("CSS_ROW", $css_row);
         // link
         $this->ctrl->setParameter($this, "backcmd", "");
         $this->ctrl->setParameterByClass("ilLMPageObjectGUI", "obj_id", $page["obj_id"]);
         //echo "<br>:".$this->ctrl->getLinkTargetByClass("ilLMPageObjectGUI", "view").":";
         $this->tpl->setVariable("LINK_TARGET", $this->ctrl->getLinkTargetByClass("ilLMPageObjectGUI", "edit"));
         // title
         $this->tpl->setVariable("TEXT_CONTENT", $page["title"]);
         // context
         if ($this->lm_tree->isInTree($page["obj_id"])) {
             $path_str = $this->getContextPath($page["obj_id"]);
         } else {
             $path_str = "---";
         }
         // check whether page is header or footer
         $add_str = "";
         if ($page["obj_id"] == $this->object->getHeaderPage()) {
             $add_str = " <b>(" . $this->lng->txt("cont_header") . ")</b>";
         }
         if ($page["obj_id"] == $this->object->getFooterPage()) {
             $add_str = " <b>(" . $this->lng->txt("cont_footer") . ")</b>";
         }
         $this->tpl->setVariable("TEXT_CONTEXT", $path_str . $add_str);
         $this->tpl->parseCurrentBlock();
     }
     if ($cnt == 0) {
         $this->tpl->setCurrentBlock("notfound");
         $this->tpl->setVariable("NUM_COLS", 4);
         $this->tpl->setVariable("TXT_OBJECT_NOT_FOUND", $this->lng->txt("obj_not_found"));
         $this->tpl->parseCurrentBlock();
     } else {
         $acts = array("delete" => "delete", "movePage" => "movePage", "copyPage" => "copyPage", "selectHeader" => "selectHeader", "selectFooter" => "selectFooter", "activatePages" => "cont_de_activate");
         if (ilEditClipboard::getContentObjectType() == "pg" && ilEditClipboard::getAction() == "copy") {
             $acts["pastePage"] = "pastePage";
         }
         /*
         			if (ilEditClipboard::getContentObjectType() == "st")
         			{
         				$acts["pasteChapter"] =  "pasteChapter";
         			}*/
         $this->tpl->setVariable("NUM_COLS", 4);
         $this->showActions($acts);
         // SHOW VALID ACTIONS
         /*
         			$this->tpl->setCurrentBlock("operation_btn");
         			$this->tpl->setVariable("BTN_NAME", "delete");
         			$this->tpl->setVariable("BTN_VALUE", $this->lng->txt("delete"));
         			$this->tpl->parseCurrentBlock();*/
     }
     // SHOW POSSIBLE SUB OBJECTS
     $this->tpl->setVariable("NUM_COLS", 4);
     //$this->showPossibleSubObjects("st");
     $subobj = array("pg");
     $opts = ilUtil::formSelect(12, "new_type", $subobj);
     $this->tpl->setCurrentBlock("add_object");
     $this->tpl->setVariable("SELECT_OBJTYPE", $opts);
     $this->tpl->setVariable("BTN_NAME", "create");
     $this->tpl->setVariable("TXT_ADD", $this->lng->txt("create"));
     $this->tpl->parseCurrentBlock();
     $this->tpl->setCurrentBlock("form");
     $this->tpl->parseCurrentBlock();
 }
 function pages()
 {
     global $tree, $tpl, $ilToolbar, $ilCtrl, $lng;
     $this->setTabs();
     $this->setContentSubTabs("pages");
     $ilCtrl->setParameter($this, "backcmd", "pages");
     $ilCtrl->setParameterByClass("illmpageobjectgui", "new_type", "pg");
     $ilToolbar->addButton($lng->txt("pg_add"), $ilCtrl->getLinkTargetByClass("illmpageobjectgui", "create"));
     $ilCtrl->setParameterByClass("illmpageobjectgui", "new_type", "");
     include_once "./Modules/LearningModule/classes/class.ilLMPagesTableGUI.php";
     $t = new ilLMPagesTableGUI($this, "pages", $this->object);
     $tpl->setContent($t->getHTML());
 }