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 $ilHelp->setTarget(
"lm_intro");
92 $cmd = $this->ctrl->getCmd(
"frameset");
94 $next_class = $this->ctrl->getNextClass($this);
96 $cmd = $this->ctrl->getCmd(
"frameset");
98 if ($next_class ==
"" && (
$cmd !=
"explorer") && (
$cmd !=
"frameset")
99 && (
$cmd !=
"showImageMap"))
101 switch($this->lm_obj->getType())
105 $next_class =
"ilobjlearningmodulegui";
110 $next_class =
"ilobjdlbookgui";
117 $show_footer = (
$cmd ==
"explorer")
124 case "ilobjdlbookgui":
125 include_once (
"./Modules/LearningModule/classes/class.ilObjDlBook.php");
126 include_once (
"./Modules/LearningModule/classes/class.ilObjDlBookGUI.php");
131 $ret =& $this->ctrl->forwardCommand($book_gui);
132 if (strcmp(
$cmd,
"explorer") != 0)
144 $output = $this->tpl->get(
"DEFAULT",
true,
true, $show_footer,
true);
145 $output = str_replace(
"{",
"{", $output);
146 $output = str_replace(
"}",
"}", $output);
147 header(
'Content-type: text/html; charset=UTF-8');
151 case "ilobjlearningmodulegui":
152 include_once (
"./Modules/LearningModule/classes/class.ilObjLearningModule.php");
153 include_once (
"./Modules/LearningModule/classes/class.ilObjLearningModuleGUI.php");
157 $ret =& $this->ctrl->forwardCommand($lm_gui);
158 if (strcmp(
$cmd,
"explorer") != 0)
170 $output = $this->tpl->get(
"DEFAULT",
true,
true, $show_footer,
true);
171 $output = str_replace(
"{",
"{", $output);
172 $output = str_replace(
"}",
"}", $output);
173 header(
'Content-type: text/html; charset=UTF-8');
190 include_once(
"./Services/Frameset/classes/class.ilFramesetGUI.php");
193 $fs_gui->setFramesetTitle($this->lng->txt(
"editor"));
194 $fs_gui->setMainFrameName(
"content");
195 $fs_gui->setSideFrameName(
"tree");
196 $this->ctrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
198 if ($this->lm_obj->getType() ==
"dbk")
200 $fs_gui->setSideFrameSource(
201 $this->ctrl->getLinkTargetByClass(
"ilobjdlbookgui",
"explorer"));
202 if (
$_GET[
"to_page"]== 1)
204 $fs_gui->setMainFrameSource(
205 $this->ctrl->getLinkTargetByClass(
206 array(
"ilobjdlbookgui",
"illmpageobjectgui"),
211 $fs_gui->setMainFrameSource(
212 $this->ctrl->getLinkTargetByClass(
"ilobjdlbookgui",
"chapters"));
217 $fs_gui->setSideFrameSource(
218 $this->ctrl->getLinkTargetByClass(
"ilobjlearningmodulegui",
"explorer"));
219 if (
$_GET[
"to_page"]== 1)
221 $fs_gui->setMainFrameSource(
222 $this->ctrl->getLinkTargetByClass(
223 array(
"ilobjlearningmodulegui",
"illmpageobjectgui"),
228 $fs_gui->setMainFrameSource(
229 $this->ctrl->getLinkTargetByClass(
"ilobjlearningmodulegui",
"chapters"));
245 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.adm_content.html");
247 $this->tpl->addBlockFile(
"STATUSLINE",
"statusline",
"tpl.statusline.html");
252 $this->tpl->setCurrentBlock(
"ContentStyle");
253 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
255 $this->tpl->parseCurrentBlock();
258 $this->tpl->setCurrentBlock(
"SyntaxStyle");
259 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
261 $this->tpl->parseCurrentBlock();
273 $this->tpl->addBlockFile(
"LOCATOR",
"locator",
"tpl.locator.html",
"Services/Locator");
277 $locations = $this->ctrl->getLocations();
279 foreach ($locations as $key =>
$row)
281 if ($key < count($locations)-$modifier)
283 $this->tpl->touchBlock(
"locator_separator");
286 if (
$row[
"ref_id"]> 0 &&
$row[
"ref_id"] != ROOT_FOLDER_ID)
290 $this->tpl->setCurrentBlock(
"locator_img");
291 $this->tpl->setVariable(
"IMG_SRC",
293 $this->tpl->setVariable(
"IMG_ALT",
294 $lng->txt(
"obj_".$type));
295 $this->tpl->parseCurrentBlock();
298 if (
$row[
"link"] !=
"")
300 $this->tpl->setCurrentBlock(
"locator_item");
301 $this->tpl->setVariable(
"ITEM",
$row[
"title"]);
302 $this->tpl->setVariable(
"LINK_ITEM",
$row[
"link"]);
303 if (
$row[
"target"] !=
"")
305 $this->tpl->setVariable(
"LINK_TARGET",
' target="'.
$row[
"target"].
'" ');
307 $this->tpl->parseCurrentBlock();
311 $this->tpl->setCurrentBlock(
"locator_item");
312 $this->tpl->setVariable(
"PREFIX",
$row[
"title"]);
313 $this->tpl->parseCurrentBlock();
317 $this->tpl->setCurrentBlock(
"locator");
318 $this->tpl->parseCurrentBlock();