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",
"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());
75 $this->tree->setTreeTablePK(
"lm_id");
77 $ilNavigationHistory->addItem(
$_GET[
"ref_id"],
78 "ilias.php?baseClass=ilLMEditorGUI&ref_id=".
$_GET[
"ref_id"],
"lm");
90 if (
$_GET[
"to_page"]== 1)
92 $this->ctrl->setParameterByClass(
"illmpageobjectgui",
"obj_id",
$_GET[
"obj_id"]);
93 $this->ctrl->redirectByClass(array(
"ilobjlearningmodulegui",
"illmpageobjectgui"),
"edit");
96 if (
$cmd !=
"showTree")
101 $next_class = $this->ctrl->getNextClass($this);
104 if ($next_class ==
"" && (
$cmd !=
"explorer")
105 && (
$cmd !=
"showImageMap"))
107 switch($this->lm_obj->getType())
111 $next_class =
"ilobjlearningmodulegui";
116 $next_class =
"ilobjdlbookgui";
123 $show_footer = (
$cmd ==
"explorer")
130 case "ilobjdlbookgui":
131 include_once (
"./Modules/LearningModule/classes/class.ilObjDlBook.php");
132 include_once (
"./Modules/LearningModule/classes/class.ilObjDlBookGUI.php");
137 $ret =& $this->ctrl->forwardCommand($book_gui);
138 if (strcmp(
$cmd,
"explorer") != 0)
150 $output = $this->tpl->get(
"DEFAULT",
true,
true, $show_footer,
true);
151 $output = str_replace(
"{",
"{", $output);
152 $output = str_replace(
"}",
"}", $output);
153 header(
'Content-type: text/html; charset=UTF-8');
157 case "ilobjlearningmodulegui":
158 include_once (
"./Modules/LearningModule/classes/class.ilObjLearningModule.php");
159 include_once (
"./Modules/LearningModule/classes/class.ilObjLearningModuleGUI.php");
163 $ret =& $this->ctrl->forwardCommand($lm_gui);
164 if (strcmp(
$cmd,
"explorer") != 0)
176 $output = $this->tpl->get(
"DEFAULT",
true,
true, $show_footer,
true);
177 $output = str_replace(
"{",
"{", $output);
178 $output = str_replace(
"}",
"}", $output);
179 header(
'Content-type: text/html; charset=UTF-8');
199 include_once(
"./Modules/LearningModule/classes/class.ilLMEditorExplorerGUI.php");
201 if (!$exp->handleCommand())
203 $tpl->setLeftNavContent($exp->getHTML());
214 $this->tpl->getStandardTemplate();
217 $this->tpl->setCurrentBlock(
"ContentStyle");
218 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
220 $this->tpl->parseCurrentBlock();
223 $this->tpl->setCurrentBlock(
"SyntaxStyle");
224 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
226 $this->tpl->parseCurrentBlock();
238 $this->tpl->addBlockFile(
"LOCATOR",
"locator",
"tpl.locator.html",
"Services/Locator");
242 $locations = $this->ctrl->getLocations();
244 foreach ($locations as $key =>
$row)
246 if ($key < count($locations)-$modifier)
248 $this->tpl->touchBlock(
"locator_separator");
251 if (
$row[
"ref_id"]> 0 &&
$row[
"ref_id"] != ROOT_FOLDER_ID)
255 $this->tpl->setCurrentBlock(
"locator_img");
256 $this->tpl->setVariable(
"IMG_SRC",
258 $this->tpl->setVariable(
"IMG_ALT",
259 $lng->txt(
"obj_".$type));
260 $this->tpl->parseCurrentBlock();
263 if (
$row[
"link"] !=
"")
265 $this->tpl->setCurrentBlock(
"locator_item");
266 $this->tpl->setVariable(
"ITEM",
$row[
"title"]);
267 $this->tpl->setVariable(
"LINK_ITEM",
$row[
"link"]);
268 if (
$row[
"target"] !=
"")
270 $this->tpl->setVariable(
"LINK_TARGET",
' target="'.
$row[
"target"].
'" ');
272 $this->tpl->parseCurrentBlock();
276 $this->tpl->setCurrentBlock(
"locator_item");
277 $this->tpl->setVariable(
"PREFIX",
$row[
"title"]);
278 $this->tpl->parseCurrentBlock();
282 $this->tpl->setCurrentBlock(
"locator");
283 $this->tpl->parseCurrentBlock();
main_header($a_type)
output main header (title and locator)
GUI class for learning module editor.
getSyntaxStylePath()
get syntax style path
LM editor explorer GUI class.
Class ilLearningModuleGUI.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static _lookupObjId($a_id)
redirection script todo: (a better solution should control the processing via a xml file) ...
setTableNames($a_table_tree, $a_table_obj_data, $a_table_obj_reference="")
set table names The primary key of the table containing your object_data must be 'obj_id' You may use...
displayLocator()
display locator
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
static _lookupType($a_id, $a_reference=false)
lookup object type
getContentStylePath($a_style_id)
get content style path
ilLMEditorGUI()
Constructor public.
& executeCommand()
execute command