Public Member Functions | |
ilLMEditorGUI () | |
Constructor public. | |
& | executeCommand () |
execute command | |
_forwards () | |
frameset () | |
output main frameset of editor left frame: explorer tree of chapters right frame: editor content | |
showImageMap () | |
show image map | |
main_header ($a_type) | |
output main header (title and locator) | |
displayLocator () | |
display locator | |
Data Fields | |
$ilias | |
$tpl | |
$lng | |
$objDefinition | |
$ref_id | |
$lm_obj | |
$tree | |
$obj_id |
Definition at line 41 of file class.ilLMEditorGUI.php.
ilLMEditorGUI::_forwards | ( | ) |
Definition at line 170 of file class.ilLMEditorGUI.php.
{ return array("ilObjDlBookGUI", "ilMetaDataGUI", "ilObjLearningModuleGUI"); }
ilLMEditorGUI::displayLocator | ( | ) |
display locator
Definition at line 261 of file class.ilLMEditorGUI.php.
Referenced by executeCommand().
{ global $lng; $this->tpl->addBlockFile("LOCATOR", "locator", "tpl.locator.html"); $modifier = 1; $locations = $this->ctrl->getLocations(); foreach ($locations as $key => $row) { if ($key < count($locations)-$modifier) { $this->tpl->touchBlock("locator_separator"); } $this->tpl->setCurrentBlock("locator_item"); $this->tpl->setVariable("ITEM", $row["title"]); $this->tpl->setVariable("LINK_ITEM", $row["link"]); $this->tpl->parseCurrentBlock(); } $this->tpl->setCurrentBlock("locator"); $this->tpl->parseCurrentBlock(); }
& ilLMEditorGUI::executeCommand | ( | ) |
execute command
Definition at line 88 of file class.ilLMEditorGUI.php.
References $_GET, $cmd, $output, displayLocator(), and main_header().
{ $cmd = $this->ctrl->getCmd("frameset"); $next_class = $this->ctrl->getNextClass($this); //echo "lmeditorgui:$next_class:".$this->ctrl->getCmdClass().":<br>"; $cmd = $this->ctrl->getCmd("frameset"); if ($next_class == "" && ($cmd != "explorer") && ($cmd != "frameset") && ($cmd != "showImageMap")) { switch($this->lm_obj->getType()) { case "lm": //$this->ctrl->setCmdClass("ilObjLearningModuleGUI"); $next_class = "ilobjlearningmodulegui"; break; case "dbk": //$this->ctrl->setCmdClass("ilObjDlBookGUI"); $next_class = "ilobjdlbookgui"; break; } //$next_class = $this->ctrl->getNextClass($this); } // show footer $show_footer = ($cmd == "explorer") ? false : true; // if ($this->lm_obj->getType() switch($next_class) { case "ilobjdlbookgui": include_once ("content/classes/class.ilObjDlBook.php"); include_once ("content/classes/class.ilObjDlBookGUI.php"); $this->main_header($this->lm_obj->getType()); $book_gui =& new ilObjDlBookGUI("", $_GET["ref_id"], true, false); //$ret =& $book_gui->executeCommand(); $ret =& $this->ctrl->forwardCommand($book_gui); $this->displayLocator(); // (horrible) workaround for preventing template engine // from hiding paragraph text that is enclosed // in curly brackets (e.g. "{a}", see ilPageObjectGUI::showPage()) $output = $this->tpl->get("DEFAULT", true, true, $show_footer); $output = str_replace("{", "{", $output); $output = str_replace("}", "}", $output); header('Content-type: text/html; charset=UTF-8'); echo $output; break; case "ilobjlearningmodulegui": include_once ("content/classes/class.ilObjLearningModule.php"); include_once ("content/classes/class.ilObjLearningModuleGUI.php"); $this->main_header($this->lm_obj->getType()); $lm_gui =& new ilObjLearningModuleGUI("", $_GET["ref_id"], true, false); //$ret =& $lm_gui->executeCommand(); $ret =& $this->ctrl->forwardCommand($lm_gui); $this->displayLocator(); // (horrible) workaround for preventing template engine // from hiding paragraph text that is enclosed // in curly brackets (e.g. "{a}", see ilPageObjectGUI::showPage()) $output = $this->tpl->get("DEFAULT", true, true, $show_footer); $output = str_replace("{", "{", $output); $output = str_replace("}", "}", $output); header('Content-type: text/html; charset=UTF-8'); echo $output; break; default: $ret =& $this->$cmd(); break; } }
ilLMEditorGUI::frameset | ( | ) |
output main frameset of editor left frame: explorer tree of chapters right frame: editor content
Definition at line 180 of file class.ilLMEditorGUI.php.
References $_GET.
{ $this->tpl = new ilTemplate("tpl.lm_edit_frameset.html", false, false, "content"); if ($this->lm_obj->getType() == "dbk") { $this->tpl->setVariable("HREF_EXPLORER", $this->ctrl->getLinkTargetByClass("ilobjdlbookgui", "explorer")); if ($_GET["to_page"]== 1) { $this->tpl->setVariable("HREF_EDITOR", $this->ctrl->getLinkTargetByClass( array("ilobjdlbookgui", "illmpageobjectgui"), "view")); } else { $this->tpl->setVariable("HREF_EDITOR", $this->ctrl->getLinkTargetByClass("ilobjdlbookgui", "properties")); } } else { $this->tpl->setVariable("HREF_EXPLORER", $this->ctrl->getLinkTargetByClass("ilobjlearningmodulegui", "explorer")); if ($_GET["to_page"]== 1) { $this->tpl->setVariable("HREF_EDITOR", $this->ctrl->getLinkTargetByClass( array("ilobjlearningmodulegui", "illmpageobjectgui"), "view")); } else { $this->tpl->setVariable("HREF_EDITOR", $this->ctrl->getLinkTargetByClass("ilobjlearningmodulegui", "properties")); } } $this->tpl->show(); }
ilLMEditorGUI::ilLMEditorGUI | ( | ) |
Constructor public.
Definition at line 62 of file class.ilLMEditorGUI.php.
References $_GET, $ilCtrl, $ilias, $lng, $objDefinition, and $tpl.
{ global $ilias, $tpl, $lng, $objDefinition, $ilCtrl; $this->ctrl =& $ilCtrl; $this->ctrl->saveParameter($this, array("ref_id", "obj_id")); // initiate variables $this->ilias =& $ilias; $this->tpl =& $tpl; $this->lng =& $lng; $this->objDefinition =& $objDefinition; $this->ref_id = $_GET["ref_id"]; $this->obj_id = $_GET["obj_id"]; $this->lm_obj =& $this->ilias->obj_factory->getInstanceByRefId($this->ref_id); $this->tree = new ilTree($this->lm_obj->getId()); $this->tree->setTableNames('lm_tree','lm_data'); $this->tree->setTreeTablePK("lm_id"); }
ilLMEditorGUI::main_header | ( | $ | a_type | ) |
output main header (title and locator)
Definition at line 233 of file class.ilLMEditorGUI.php.
References $lng, ilObjStyleSheet::getContentStylePath(), and ilObjStyleSheet::getSyntaxStylePath().
Referenced by executeCommand().
{ global $lng; $this->tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html"); //$this->tpl->setVariable("HEADER", $a_header_title); $this->tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html"); //$this->tpl->setVariable("TXT_LOCATOR",$this->lng->txt("locator")); //$this->displayLocator($a_type); // content style $this->tpl->setCurrentBlock("ContentStyle"); $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath($this->lm_obj->getStyleSheetId())); $this->tpl->parseCurrentBlock(); // syntax style $this->tpl->setCurrentBlock("SyntaxStyle"); $this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath()); $this->tpl->parseCurrentBlock(); }
ilLMEditorGUI::showImageMap | ( | ) |
show image map
Definition at line 223 of file class.ilLMEditorGUI.php.
References $_GET.
{ $item =& new ilMediaItem($_GET["item_id"]); $item->outputMapWorkCopy(); }
ilLMEditorGUI::$ilias |
Definition at line 48 of file class.ilLMEditorGUI.php.
Referenced by ilLMEditorGUI().
ilLMEditorGUI::$lm_obj |
Definition at line 53 of file class.ilLMEditorGUI.php.
ilLMEditorGUI::$lng |
Definition at line 50 of file class.ilLMEditorGUI.php.
Referenced by displayLocator(), ilLMEditorGUI(), and main_header().
ilLMEditorGUI::$obj_id |
Definition at line 56 of file class.ilLMEditorGUI.php.
ilLMEditorGUI::$objDefinition |
Definition at line 51 of file class.ilLMEditorGUI.php.
Referenced by ilLMEditorGUI().
ilLMEditorGUI::$ref_id |
Definition at line 52 of file class.ilLMEditorGUI.php.
ilLMEditorGUI::$tpl |
Definition at line 49 of file class.ilLMEditorGUI.php.
Referenced by ilLMEditorGUI().
ilLMEditorGUI::$tree |
Definition at line 55 of file class.ilLMEditorGUI.php.