GUI class for learning module editor.
More...
◆ displayLocator()
ilLMEditorGUI::displayLocator |
( |
| ) |
|
display locator
Definition at line 234 of file class.ilLMEditorGUI.php.
References $lng, $row, $t, ilObject\_lookupObjId(), ilObject\_lookupType(), and ilUtil\getImagePath().
Referenced by executeCommand().
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();
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static _lookupObjId($a_id)
static _lookupType($a_id, $a_reference=false)
lookup object type
◆ executeCommand()
& ilLMEditorGUI::executeCommand |
( |
| ) |
|
execute command
Definition at line 85 of file class.ilLMEditorGUI.php.
References $_GET, $cmd, $ret, displayLocator(), main_header(), and showTree().
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');
main_header($a_type)
output main header (title and locator)
Class ilLearningModuleGUI.
displayLocator()
display locator
◆ ilLMEditorGUI()
ilLMEditorGUI::ilLMEditorGUI |
( |
| ) |
|
Constructor public.
Definition at line 43 of file class.ilLMEditorGUI.php.
References $_GET, $ilCtrl, $ilias, $lng, $objDefinition, $tpl, and ilTree\setTableNames().
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");
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...
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
◆ main_header()
ilLMEditorGUI::main_header |
( |
|
$a_type | ) |
|
output main header (title and locator)
Definition at line 210 of file class.ilLMEditorGUI.php.
References $lng, ilObjStyleSheet\getContentStylePath(), and ilObjStyleSheet\getSyntaxStylePath().
Referenced by executeCommand().
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();
getSyntaxStylePath()
get syntax style path
getContentStylePath($a_style_id)
get content style path
◆ showTree()
ilLMEditorGUI::showTree |
( |
| ) |
|
Show tree.
- Parameters
-
Definition at line 195 of file class.ilLMEditorGUI.php.
References $tpl.
Referenced by executeCommand().
199 include_once(
"./Modules/LearningModule/classes/class.ilLMEditorExplorerGUI.php");
201 if (!$exp->handleCommand())
203 $tpl->setLeftNavContent($exp->getHTML());
LM editor explorer GUI class.
◆ $ilias
◆ $lm_obj
◆ $lng
◆ $obj_id
◆ $objDefinition
ilLMEditorGUI::$objDefinition |
◆ $ref_id
◆ $tpl
◆ $tree
The documentation for this class was generated from the following file: