4include_once(
"./Modules/LearningModule/classes/class.ilLMObjectFactory.php");
5include_once(
"./Services/Utilities/classes/class.ilDOMUtil.php");
6include_once(
"./Services/COPage/classes/class.ilPageEditorGUI.php");
7include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
8include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
66 $this->rbacsystem =
$DIC->rbac()->system();
67 $this->nav_history =
$DIC[
"ilNavigationHistory"];
68 $this->
error = $DIC[
"ilErr"];
69 $this->help =
$DIC[
"ilHelp"];
75 $ilNavigationHistory =
$DIC[
"ilNavigationHistory"];
78 $lng->loadLanguageModule(
"content");
79 $lng->loadLanguageModule(
"lm");
90 $this->ctrl->saveParameter($this, array(
"ref_id",
"transl"));
96 $this->ref_id =
$_GET[
"ref_id"];
97 $this->obj_id =
$_GET[
"obj_id"];
100 $this->tree =
new ilTree($this->lm_obj->getId());
101 $this->tree->setTableNames(
'lm_tree',
'lm_data');
102 $this->tree->setTreeTablePK(
"lm_id");
105 $ilNavigationHistory->addItem(
107 "ilias.php?baseClass=ilLMEditorGUI&ref_id=" .
$_GET[
"ref_id"],
121 $forwards_to_role = $this->ctrl->checkCurrentPathForClass(
"ilobjrolegui");
124 throw new ilException(
"Object ID does not match learning module.");
127 throw new ilException(
"Active node does not match learning module.");
140 if (
$_GET[
"to_page"]== 1) {
141 $this->ctrl->setParameterByClass(
"illmpageobjectgui",
"obj_id",
$_GET[
"obj_id"]);
142 $this->ctrl->redirectByClass(array(
"ilobjlearningmodulegui",
"illmpageobjectgui"),
"edit");
145 if ($cmd !=
"showTree") {
149 $next_class = $this->ctrl->getNextClass($this);
152 if ($next_class ==
"" && ($cmd !=
"explorer")
153 && ($cmd !=
"showImageMap")) {
154 $next_class =
"ilobjlearningmodulegui";
158 $show_footer = ($cmd ==
"explorer")
163 switch ($next_class) {
164 case "ilobjlearningmodulegui":
165 include_once(
"./Modules/LearningModule/classes/class.ilObjLearningModule.php");
166 include_once(
"./Modules/LearningModule/classes/class.ilObjLearningModuleGUI.php");
170 $ret = $this->ctrl->forwardCommand($lm_gui);
171 if (strcmp($cmd,
"explorer") != 0) {
182 $output = $this->tpl->get(
"DEFAULT",
true,
true, $show_footer,
true);
185 header(
'Content-type: text/html; charset=UTF-8');
190 $ret = $this->$cmd();
205 include_once(
"./Modules/LearningModule/classes/class.ilLMEditorExplorerGUI.php");
207 if (!$exp->handleCommand()) {
208 $tpl->setLeftNavContent($exp->getHTML());
219 $this->tpl->getStandardTemplate();
222 $this->tpl->setCurrentBlock(
"ContentStyle");
223 $this->tpl->setVariable(
224 "LOCATION_CONTENT_STYLESHEET",
227 $this->tpl->parseCurrentBlock();
230 $this->tpl->setCurrentBlock(
"SyntaxStyle");
231 $this->tpl->setVariable(
232 "LOCATION_SYNTAX_STYLESHEET",
235 $this->tpl->parseCurrentBlock();
246 $this->tpl->addBlockFile(
"LOCATOR",
"locator",
"tpl.locator.html",
"Services/Locator");
250 $locations = $this->ctrl->getLocations();
252 foreach ($locations as
$key =>
$row) {
253 if (
$key < count($locations)-$modifier) {
254 $this->tpl->touchBlock(
"locator_separator");
257 if (
$row[
"ref_id"]> 0 &&
$row[
"ref_id"] != ROOT_FOLDER_ID) {
260 $this->tpl->setCurrentBlock(
"locator_img");
261 $this->tpl->setVariable(
265 $this->tpl->setVariable(
269 $this->tpl->parseCurrentBlock();
272 if (
$row[
"link"] !=
"") {
273 $this->tpl->setCurrentBlock(
"locator_item");
274 $this->tpl->setVariable(
"ITEM",
$row[
"title"]);
275 $this->tpl->setVariable(
"LINK_ITEM",
$row[
"link"]);
276 if (
$row[
"target"] !=
"") {
277 $this->tpl->setVariable(
"LINK_TARGET",
' target="' .
$row[
"target"] .
'" ');
279 $this->tpl->parseCurrentBlock();
281 $this->tpl->setCurrentBlock(
"locator_item");
282 $this->tpl->setVariable(
"PREFIX",
$row[
"title"]);
283 $this->tpl->parseCurrentBlock();
287 $this->tpl->setCurrentBlock(
"locator");
288 $this->tpl->parseCurrentBlock();
An exception for terminatinating execution or to throw for unit testing.
error($a_errmsg)
set error message @access public
Base class for ILIAS Exception handling.
LM editor explorer GUI class.
GUI class for learning module editor.
checkRequestParameters()
Check request parameters.
__construct()
Constructor @access public.
displayLocator()
display locator
main_header($a_type)
output main header (title and locator)
static _lookupContObjID($a_id)
get learning module / digibook id for lm object
Class ilLearningModuleGUI.
static getSyntaxStylePath()
get syntax style path
static getContentStylePath($a_style_id, $add_random=true)
get content style path
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
static _lookupObjId($a_id)
static _lookupType($a_id, $a_reference=false)
lookup object type
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\s+" &#(? foreach( $entity_files as $file) $output