4include_once (
"./Modules/LearningModule/classes/class.ilLMObjectFactory.php");
5include_once (
"./Services/Utilities/classes/class.ilDOMUtil.php");
6include_once (
"./Services/COPage/classes/class.ilPageEditorGUI.php");
7include_once (
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
8include_once (
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
46 $rbacsystem, $ilNavigationHistory;
50 $lng->loadLanguageModule(
"content");
53 if (!$rbacsystem->checkAccess(
"write",
$_GET[
"ref_id"]))
55 $ilias->raiseError(
$lng->txt(
"permission_denied"),
$ilias->error_obj->MESSAGE);
62 $this->ctrl->saveParameter($this, array(
"ref_id",
"transl"));
69 $this->ref_id =
$_GET[
"ref_id"];
70 $this->obj_id =
$_GET[
"obj_id"];
72 $this->lm_obj = $this->
ilias->obj_factory->getInstanceByRefId($this->ref_id);
73 $this->tree =
new ilTree($this->lm_obj->getId());
74 $this->tree->setTableNames(
'lm_tree',
'lm_data');
75 $this->tree->setTreeTablePK(
"lm_id");
79 throw new ilException(
"Object ID does not match learning module.");
83 throw new ilException(
"Active node does not match learning module.");
86 $ilNavigationHistory->addItem(
$_GET[
"ref_id"],
87 "ilias.php?baseClass=ilLMEditorGUI&ref_id=".
$_GET[
"ref_id"],
"lm");
99 if (
$_GET[
"to_page"]== 1)
101 $this->ctrl->setParameterByClass(
"illmpageobjectgui",
"obj_id",
$_GET[
"obj_id"]);
102 $this->ctrl->redirectByClass(array(
"ilobjlearningmodulegui",
"illmpageobjectgui"),
"edit");
105 if (
$cmd !=
"showTree")
110 $next_class = $this->ctrl->getNextClass($this);
113 if ($next_class ==
"" && (
$cmd !=
"explorer")
114 && (
$cmd !=
"showImageMap"))
116 $next_class =
"ilobjlearningmodulegui";
120 $show_footer = (
$cmd ==
"explorer")
127 case "ilobjlearningmodulegui":
128 include_once (
"./Modules/LearningModule/classes/class.ilObjLearningModule.php");
129 include_once (
"./Modules/LearningModule/classes/class.ilObjLearningModuleGUI.php");
133 $ret = $this->ctrl->forwardCommand($lm_gui);
134 if (strcmp(
$cmd,
"explorer") != 0)
146 $output = $this->tpl->get(
"DEFAULT",
true,
true, $show_footer,
true);
149 header(
'Content-type: text/html; charset=UTF-8');
169 include_once(
"./Modules/LearningModule/classes/class.ilLMEditorExplorerGUI.php");
171 if (!$exp->handleCommand())
173 $tpl->setLeftNavContent($exp->getHTML());
184 $this->tpl->getStandardTemplate();
187 $this->tpl->setCurrentBlock(
"ContentStyle");
188 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
190 $this->tpl->parseCurrentBlock();
193 $this->tpl->setCurrentBlock(
"SyntaxStyle");
194 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
196 $this->tpl->parseCurrentBlock();
208 $this->tpl->addBlockFile(
"LOCATOR",
"locator",
"tpl.locator.html",
"Services/Locator");
212 $locations = $this->ctrl->getLocations();
214 foreach ($locations as $key =>
$row)
216 if ($key < count($locations)-$modifier)
218 $this->tpl->touchBlock(
"locator_separator");
221 if (
$row[
"ref_id"]> 0 &&
$row[
"ref_id"] != ROOT_FOLDER_ID)
225 $this->tpl->setCurrentBlock(
"locator_img");
226 $this->tpl->setVariable(
"IMG_SRC",
228 $this->tpl->setVariable(
"IMG_ALT",
229 $lng->txt(
"obj_".$type));
230 $this->tpl->parseCurrentBlock();
233 if (
$row[
"link"] !=
"")
235 $this->tpl->setCurrentBlock(
"locator_item");
236 $this->tpl->setVariable(
"ITEM",
$row[
"title"]);
237 $this->tpl->setVariable(
"LINK_ITEM",
$row[
"link"]);
238 if (
$row[
"target"] !=
"")
240 $this->tpl->setVariable(
"LINK_TARGET",
' target="'.
$row[
"target"].
'" ');
242 $this->tpl->parseCurrentBlock();
246 $this->tpl->setCurrentBlock(
"locator_item");
247 $this->tpl->setVariable(
"PREFIX",
$row[
"title"]);
248 $this->tpl->parseCurrentBlock();
252 $this->tpl->setCurrentBlock(
"locator");
253 $this->tpl->parseCurrentBlock();
An exception for terminatinating execution or to throw for unit testing.
Base class for ILIAS Exception handling.
LM editor explorer GUI class.
GUI class for learning module editor.
executeCommand()
execute command
__construct()
Constructor @access public.
displayLocator()
display locator
main_header($a_type)
output main header (title and locator)
static _lookupContObjID($a_id)
get learning module / digibook id for lm object
Class ilLearningModuleGUI.
static getSyntaxStylePath()
get syntax style path
static getContentStylePath($a_style_id)
get content style path
static _lookupObjId($a_id)
static _lookupType($a_id, $a_reference=false)
lookup object type
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\s+" &#(? foreach( $entity_files as $file) $output
redirection script todo: (a better solution should control the processing via a xml file)