4 include_once (
"./Modules/LearningModule/classes/class.ilLMObjectFactory.php");
5 include_once (
"./Services/Utilities/classes/class.ilDOMUtil.php");
6 include_once (
"./Services/COPage/classes/class.ilPageEditorGUI.php");
7 include_once (
"./Services/Style/classes/class.ilObjStyleSheet.php");
8 include_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"));
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());
75 $this->tree->setTreeTablePK(
"lm_id");
77 $ilNavigationHistory->addItem(
$_GET[
"ref_id"],
78 "ilias.php?baseClass=ilLMEditorGUI&ref_id=".
$_GET[
"ref_id"],
"lm");
90 $cmd = $this->ctrl->getCmd(
"frameset");
92 $next_class = $this->ctrl->getNextClass($this);
94 $cmd = $this->ctrl->getCmd(
"frameset");
96 if ($next_class ==
"" && (
$cmd !=
"explorer") && (
$cmd !=
"frameset")
97 && (
$cmd !=
"showImageMap"))
99 switch($this->lm_obj->getType())
103 $next_class =
"ilobjlearningmodulegui";
108 $next_class =
"ilobjdlbookgui";
115 $show_footer = (
$cmd ==
"explorer")
122 case "ilobjdlbookgui":
123 include_once (
"./Modules/LearningModule/classes/class.ilObjDlBook.php");
124 include_once (
"./Modules/LearningModule/classes/class.ilObjDlBookGUI.php");
129 $ret =& $this->ctrl->forwardCommand($book_gui);
130 if (strcmp(
$cmd,
"explorer") != 0)
142 $output = $this->tpl->get(
"DEFAULT",
true,
true, $show_footer,
true);
143 $output = str_replace(
"{",
"{", $output);
144 $output = str_replace(
"}",
"}", $output);
145 header(
'Content-type: text/html; charset=UTF-8');
149 case "ilobjlearningmodulegui":
150 include_once (
"./Modules/LearningModule/classes/class.ilObjLearningModule.php");
151 include_once (
"./Modules/LearningModule/classes/class.ilObjLearningModuleGUI.php");
155 $ret =& $this->ctrl->forwardCommand($lm_gui);
156 if (strcmp(
$cmd,
"explorer") != 0)
168 $output = $this->tpl->get(
"DEFAULT",
true,
true, $show_footer,
true);
169 $output = str_replace(
"{",
"{", $output);
170 $output = str_replace(
"}",
"}", $output);
171 header(
'Content-type: text/html; charset=UTF-8');
188 include_once(
"./Services/Frameset/classes/class.ilFramesetGUI.php");
191 $fs_gui->setFramesetTitle($this->lng->txt(
"editor"));
192 $fs_gui->setMainFrameName(
"content");
193 $fs_gui->setSideFrameName(
"tree");
194 $this->ctrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
196 if ($this->lm_obj->getType() ==
"dbk")
198 $fs_gui->setSideFrameSource(
199 $this->ctrl->getLinkTargetByClass(
"ilobjdlbookgui",
"explorer"));
200 if (
$_GET[
"to_page"]== 1)
202 $fs_gui->setMainFrameSource(
203 $this->ctrl->getLinkTargetByClass(
204 array(
"ilobjdlbookgui",
"illmpageobjectgui"),
209 $fs_gui->setMainFrameSource(
210 $this->ctrl->getLinkTargetByClass(
"ilobjdlbookgui",
"chapters"));
215 $fs_gui->setSideFrameSource(
216 $this->ctrl->getLinkTargetByClass(
"ilobjlearningmodulegui",
"explorer"));
217 if (
$_GET[
"to_page"]== 1)
219 $fs_gui->setMainFrameSource(
220 $this->ctrl->getLinkTargetByClass(
221 array(
"ilobjlearningmodulegui",
"illmpageobjectgui"),
226 if (
$_GET[
"to_props"] == 1)
228 $fs_gui->setMainFrameSource(
229 $this->ctrl->getLinkTargetByClass(
"ilobjlearningmodulegui",
"properties"));
233 $fs_gui->setMainFrameSource(
234 $this->ctrl->getLinkTargetByClass(
"ilobjlearningmodulegui",
"chapters"));
251 $this->tpl->getStandardTemplate();
254 $this->tpl->setCurrentBlock(
"ContentStyle");
255 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
257 $this->tpl->parseCurrentBlock();
260 $this->tpl->setCurrentBlock(
"SyntaxStyle");
261 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
263 $this->tpl->parseCurrentBlock();
275 $this->tpl->addBlockFile(
"LOCATOR",
"locator",
"tpl.locator.html",
"Services/Locator");
279 $locations = $this->ctrl->getLocations();
281 foreach ($locations as $key =>
$row)
283 if ($key < count($locations)-$modifier)
285 $this->tpl->touchBlock(
"locator_separator");
288 if (
$row[
"ref_id"]> 0 &&
$row[
"ref_id"] != ROOT_FOLDER_ID)
292 $this->tpl->setCurrentBlock(
"locator_img");
293 $this->tpl->setVariable(
"IMG_SRC",
295 $this->tpl->setVariable(
"IMG_ALT",
296 $lng->txt(
"obj_".$type));
297 $this->tpl->parseCurrentBlock();
300 if (
$row[
"link"] !=
"")
302 $this->tpl->setCurrentBlock(
"locator_item");
303 $this->tpl->setVariable(
"ITEM",
$row[
"title"]);
304 $this->tpl->setVariable(
"LINK_ITEM",
$row[
"link"]);
305 if (
$row[
"target"] !=
"")
307 $this->tpl->setVariable(
"LINK_TARGET",
' target="'.
$row[
"target"].
'" ');
309 $this->tpl->parseCurrentBlock();
313 $this->tpl->setCurrentBlock(
"locator_item");
314 $this->tpl->setVariable(
"PREFIX",
$row[
"title"]);
315 $this->tpl->parseCurrentBlock();
319 $this->tpl->setCurrentBlock(
"locator");
320 $this->tpl->parseCurrentBlock();