ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilLMEditorGUI Class Reference

GUI class for learning module editor. More...

+ Collaboration diagram for ilLMEditorGUI:

Public Member Functions

 __construct ()
 Constructor @access public. More...
 
 showTree ()
 Show tree. More...
 
 main_header ()
 output main header (title and locator) More...
 
 displayLocator ()
 Display locator. More...
 

Protected Member Functions

 checkRequestParameters ()
 Check request parameters. More...
 

Protected Attributes

 $ctrl
 
 $rbacsystem
 
 $nav_history
 
 $error
 
 $help
 
 $tpl
 
 $lng
 
 $objDefinition
 
 $ref_id
 
 $lm_obj
 
 $tree
 
 $obj_id
 

Detailed Description

GUI class for learning module editor.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e

@ilCtrl_Calls ilLMEditorGUI: ilObjLearningModuleGUI

Definition at line 15 of file class.ilLMEditorGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilLMEditorGUI::__construct ( )

Constructor @access public.

Definition at line 81 of file class.ilLMEditorGUI.php.

82 {
83 global $DIC;
84
85 $this->rbacsystem = $DIC->rbac()->system();
86 $this->nav_history = $DIC["ilNavigationHistory"];
87 $this->error = $DIC["ilErr"];
88 $this->help = $DIC["ilHelp"];
89 $tpl = $DIC["tpl"];
90 $lng = $DIC->language();
91 $objDefinition = $DIC["objDefinition"];
92 $ilCtrl = $DIC->ctrl();
93 $rbacsystem = $DIC->rbac()->system();
94 $ilNavigationHistory = $DIC["ilNavigationHistory"];
95 $ilErr = $DIC["ilErr"];
96
97 $lng->loadLanguageModule("content");
98 $lng->loadLanguageModule("lm");
99
100 // check write permission
101 if (!$rbacsystem->checkAccess("write", $_GET["ref_id"])) {
102 $ilErr->raiseError($lng->txt("permission_denied"), $ilErr->MESSAGE);
103 }
104
105 $this->ctrl = $ilCtrl;
106 $this->tool_context = $DIC->globalScreen()->tool()->context();
107
108 $this->ctrl->saveParameter($this, array("ref_id", "transl"));
109
110 // initiate variables
111 $this->tpl = $tpl;
112 $this->lng = $lng;
113 $this->objDefinition = $objDefinition;
114 $this->ref_id = $_GET["ref_id"];
115 $this->obj_id = $_GET["obj_id"];
116
117 $this->lm_obj = ilObjectFactory::getInstanceByRefId($this->ref_id);
118 $this->tree = new ilTree($this->lm_obj->getId());
119 $this->tree->setTableNames('lm_tree', 'lm_data');
120 $this->tree->setTreeTablePK("lm_id");
121
122
123 $ilNavigationHistory->addItem(
124 $_GET["ref_id"],
125 "ilias.php?baseClass=ilLMEditorGUI&ref_id=" . $_GET["ref_id"],
126 "lm"
127 );
128
129 $this->checkRequestParameters();
130 }
$_GET["client_id"]
error($a_errmsg)
set error message @access public
checkRequestParameters()
Check request parameters.
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
help()
Definition: help.php:2
global $ilCtrl
Definition: ilias.php:18
$ilErr
Definition: raiseError.php:18
$DIC
Definition: xapitoken.php:46

References $_GET, $DIC, $ilCtrl, $ilErr, $lng, $objDefinition, $rbacsystem, $tpl, checkRequestParameters(), error(), ilObjectFactory\getInstanceByRefId(), and help().

+ Here is the call graph for this function:

Member Function Documentation

◆ checkRequestParameters()

ilLMEditorGUI::checkRequestParameters ( )
protected

Check request parameters.

Exceptions
ilCtrlException
ilException

Definition at line 137 of file class.ilLMEditorGUI.php.

138 {
139 $forwards_to_role = $this->ctrl->checkCurrentPathForClass("ilobjrolegui");
140
141 if (!$forwards_to_role && $this->obj_id > 0 && ilLMObject::_lookupContObjID($this->obj_id) != $this->lm_obj->getId()) {
142 throw new ilException("Object ID does not match learning module.");
143 }
144 if ($_REQUEST["active_node"] > 0 && ilLMObject::_lookupContObjID((int) $_REQUEST["active_node"]) != $this->lm_obj->getId()) {
145 throw new ilException("Active node does not match learning module.");
146 }
147 }
Base class for ILIAS Exception handling.
static _lookupContObjID($a_id)
get learning module / digibook id for lm object

References ilLMObject\_lookupContObjID().

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ displayLocator()

ilLMEditorGUI::displayLocator ( )

Display locator.

Definition at line 257 of file class.ilLMEditorGUI.php.

258 {
259 $this->tpl->setLocator();
260 }

◆ main_header()

ilLMEditorGUI::main_header ( )

output main header (title and locator)

Definition at line 232 of file class.ilLMEditorGUI.php.

233 {
234 $this->tpl->loadStandardTemplate();
235
236 // content style
237 $this->tpl->setCurrentBlock("ContentStyle");
238 $this->tpl->setVariable(
239 "LOCATION_CONTENT_STYLESHEET",
240 ilObjStyleSheet::getContentStylePath($this->lm_obj->getStyleSheetId())
241 );
242 $this->tpl->parseCurrentBlock();
243
244 // syntax style
245 $this->tpl->setCurrentBlock("SyntaxStyle");
246 $this->tpl->setVariable(
247 "LOCATION_SYNTAX_STYLESHEET",
249 );
250 $this->tpl->parseCurrentBlock();
251 }
static getSyntaxStylePath()
get syntax style path
static getContentStylePath($a_style_id, $add_random=true, $add_token=true)
get content style path

References ilObjStyleSheet\getContentStylePath(), and ilObjStyleSheet\getSyntaxStylePath().

+ Here is the call graph for this function:

◆ showTree()

ilLMEditorGUI::showTree ( )

Show tree.

Definition at line 217 of file class.ilLMEditorGUI.php.

218 {
220
221 $this->tool_context->current()->addAdditionalData(ilLMEditGSToolProvider::SHOW_TREE, true);
222
223 $exp = new ilLMEditorExplorerGUI($this, "showTree", $this->lm_obj);
224 if (!$exp->handleCommand()) {
225// $tpl->setLeftNavContent($exp->getHTML());
226 }
227 }
LM editor explorer GUI class.

References $tpl, and ilLMEditGSToolProvider\SHOW_TREE.

Field Documentation

◆ $ctrl

ilLMEditorGUI::$ctrl
protected

Definition at line 20 of file class.ilLMEditorGUI.php.

◆ $error

ilLMEditorGUI::$error
protected

Definition at line 35 of file class.ilLMEditorGUI.php.

◆ $help

ilLMEditorGUI::$help
protected

Definition at line 40 of file class.ilLMEditorGUI.php.

◆ $lm_obj

ilLMEditorGUI::$lm_obj
protected

Definition at line 65 of file class.ilLMEditorGUI.php.

◆ $lng

ilLMEditorGUI::$lng
protected

Definition at line 50 of file class.ilLMEditorGUI.php.

Referenced by __construct().

◆ $nav_history

ilLMEditorGUI::$nav_history
protected

Definition at line 30 of file class.ilLMEditorGUI.php.

◆ $obj_id

ilLMEditorGUI::$obj_id
protected

Definition at line 75 of file class.ilLMEditorGUI.php.

◆ $objDefinition

ilLMEditorGUI::$objDefinition
protected

Definition at line 55 of file class.ilLMEditorGUI.php.

Referenced by __construct().

◆ $rbacsystem

ilLMEditorGUI::$rbacsystem
protected

Definition at line 25 of file class.ilLMEditorGUI.php.

Referenced by __construct().

◆ $ref_id

ilLMEditorGUI::$ref_id
protected

Definition at line 60 of file class.ilLMEditorGUI.php.

◆ $tpl

ilLMEditorGUI::$tpl
protected

Definition at line 45 of file class.ilLMEditorGUI.php.

Referenced by __construct(), and showTree().

◆ $tree

ilLMEditorGUI::$tree
protected

Definition at line 70 of file class.ilLMEditorGUI.php.


The documentation for this class was generated from the following file: