GUI class for learning module editor.
More...
◆ __construct()
ilLMEditorGUI::__construct |
( |
| ) |
|
Constructor public.
Definition at line 43 of file class.ilLMEditorGUI.php.
References $_GET, $ilCtrl, $ilias, $lng, $objDefinition, $tpl, ilLMObject\_lookupContObjID(), array, 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");
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");
Base class for ILIAS Exception handling.
static _lookupContObjID($a_id)
get learning module / digibook id for lm object
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...
Create styles array
The data for the language used.
◆ displayLocator()
ilLMEditorGUI::displayLocator |
( |
| ) |
|
display locator
Definition at line 204 of file class.ilLMEditorGUI.php.
References $lng, $row, $t, ilObject\_lookupObjId(), ilObject\_lookupType(), and ilUtil\getImagePath().
Referenced by executeCommand().
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();
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 94 of file class.ilLMEditorGUI.php.
References $_GET, $cmd, $output, $ret, array, displayLocator(), header, main_header(), and showTree().
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');
main_header($a_type)
output main header (title and locator)
Class ilLearningModuleGUI.
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\+" &#(? foreach( $entity_files as $file) $output
Add a drawing to the header
displayLocator()
display locator
Create styles array
The data for the language used.
◆ main_header()
ilLMEditorGUI::main_header |
( |
|
$a_type | ) |
|
output main header (title and locator)
Definition at line 180 of file class.ilLMEditorGUI.php.
References $lng, ilObjStyleSheet\getContentStylePath(), and ilObjStyleSheet\getSyntaxStylePath().
Referenced by executeCommand().
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();
static getSyntaxStylePath()
get syntax style path
static getContentStylePath($a_style_id)
get content style path
◆ showTree()
ilLMEditorGUI::showTree |
( |
| ) |
|
Show tree.
- Parameters
-
Definition at line 165 of file class.ilLMEditorGUI.php.
References $tpl.
Referenced by executeCommand().
169 include_once(
"./Modules/LearningModule/classes/class.ilLMEditorExplorerGUI.php");
171 if (!$exp->handleCommand())
173 $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: