ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilObjLoggingSettingsGUI Class Reference
+ Inheritance diagram for ilObjLoggingSettingsGUI:
+ Collaboration diagram for ilObjLoggingSettingsGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
 Constructor. More...
 
 getLogger ()
 
 executeCommand ()
 Execute command. More...
 
 getAdminTabs ()
 Get tabs. More...
 
 setSubTabs ($a_section)
 
 getSettings ()
 Get log settings. More...
 
 settings (ilPropertyFormGUI $form=null)
 Show settings @access public. More...
 
 updateSettings ()
 Save settings @access public. More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page @access public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 

Data Fields

const SECTION_SETTINGS = 'settings'
 
const SUB_SECTION_MAIN = 'log_general_settings'
 
const SUB_SECTION_COMPONENTS = 'log_components'
 
const SUB_SECTION_ERROR = 'log_error_settings'
 
 $tpl
 
 $lng
 
 $ctrl
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $ilias
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Protected Member Functions

 initSettings ()
 
 initFormSettings ()
 Init settings form. More...
 
 components ()
 Show components. More...
 
 saveComponentLevels ()
 Save form. More...
 
 resetComponentLevels ()
 
 errorSettings ()
 
 updateErrorSettings ()
 
 initFormErrorSettings ()
 
 initErrorSettings ()
 
 getErrorSettings ()
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs @access public More...
 
 setAdminTabs ()
 set admin tabs @access public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Protected Attributes

 $tabs_gui
 
 $form
 
 $settings
 
 $log
 
- Protected Attributes inherited from ilObjectGUI
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 

Detailed Description

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

@ilCtrl_Calls ilObjLoggingSettingsGUI: ilPermissionGUI

Definition at line 14 of file class.ilObjLoggingSettingsGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjLoggingSettingsGUI::__construct (   $a_data,
  $a_id,
  $a_call_by_reference,
  $a_prepare_output = true 
)

Constructor.

@access public

Definition at line 39 of file class.ilObjLoggingSettingsGUI.php.

40 {
41 global $lng,$tpl,$ilCtrl,$ilTabs;
42
43 $this->type = 'logs';
44 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
45
46 $this->lng = $lng;
47
48 $this->tpl = $tpl;
49 $this->lng = $lng;
50 $this->ctrl = $ilCtrl;
51 $this->tabs_gui = $ilTabs;
52
53 $this->initSettings();
54 $this->initErrorSettings();
55 $this->lng->loadLanguageModule('logging');
56 $this->lng->loadLanguageModule('log');
57
58 include_once './Services/Logging/classes/public/class.ilLoggerFactory.php';
59 $this->log = ilLoggerFactory::getLogger('log');
60
61 }
static getLogger($a_component_id)
Get component logger.
global $ilCtrl
Definition: ilias.php:18

References $ilCtrl, $lng, $tpl, ilLoggerFactory\getLogger(), initErrorSettings(), and initSettings().

+ Here is the call graph for this function:

Member Function Documentation

◆ components()

ilObjLoggingSettingsGUI::components ( )
protected

Show components.

Definition at line 302 of file class.ilObjLoggingSettingsGUI.php.

303 {
304 $this->tabs_gui->activateTab(static::SECTION_SETTINGS);
305 $this->setSubTabs(static::SUB_SECTION_COMPONENTS);
306
307 include_once './Services/Logging/classes/class.ilLogComponentTableGUI.php';
308 $table = new ilLogComponentTableGUI($this, 'components');
309 $table->init();
310 $table->parse();
311
312 $GLOBALS['tpl']->setContent($table->getHTML());
313
314 }
Component logger with individual log levels by component id.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.

References $GLOBALS, and setSubTabs().

+ Here is the call graph for this function:

◆ errorSettings()

ilObjLoggingSettingsGUI::errorSettings ( )
protected

Definition at line 349 of file class.ilObjLoggingSettingsGUI.php.

349 {
350 global $ilAccess,$ilErr;
351
352 if(!$ilAccess->checkAccess('read','',$this->object->getRefId())) {
353 $ilErr->raiseError($this->lng->txt('permission_denied'),$ilErr->MESSAGE);
354 }
355
356 $this->tabs_gui->setTabActive(static::SECTION_SETTINGS);
357 $this->setSubTabs(static::SUB_SECTION_ERROR);
358
359 if(!$form instanceof ilPropertyFormGUI) {
360 $form = $this->initFormErrorSettings();
361 }
362 $this->tpl->setContent($form->getHTML());
363
364 $this->getLogger()->debug('Currrent level is '.$this->getSettings()->getLevel());
365 }
This class represents a property form user interface.
global $ilErr
Definition: raiseError.php:16

References $form, $ilErr, getLogger(), getSettings(), initFormErrorSettings(), and setSubTabs().

Referenced by updateErrorSettings().

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

◆ executeCommand()

ilObjLoggingSettingsGUI::executeCommand ( )

Execute command.

@access public

Reimplemented from ilObjectGUI.

Definition at line 78 of file class.ilObjLoggingSettingsGUI.php.

79 {
80 $next_class = $this->ctrl->getNextClass($this);
81 $cmd = $this->ctrl->getCmd();
82 $this->prepareOutput();
83
84 switch($next_class)
85 {
86 case 'ilpermissiongui':
87 $this->tabs_gui->setTabActive('perm_settings');
88 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
89 $perm_gui = new ilPermissionGUI($this);
90 $ret =& $this->ctrl->forwardCommand($perm_gui);
91 break;
92
93 default:
94 if($cmd == "" || $cmd == "view")
95 {
96 $cmd = "settings";
97 }
98 $this->$cmd();
99
100 break;
101 }
102 return true;
103 }
prepareOutput($a_show_subobjects=true)
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
$ret
Definition: parser.php:6
$cmd
Definition: sahs_server.php:35

References $cmd, $ret, and ilObjectGUI\prepareOutput().

+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjLoggingSettingsGUI::getAdminTabs ( )

Get tabs.

@access public

Reimplemented from ilObjectGUI.

Definition at line 112 of file class.ilObjLoggingSettingsGUI.php.

113 {
114 global $rbacsystem, $ilAccess;
115
116 if ($ilAccess->checkAccess("read",'',$this->object->getRefId()))
117 {
118 $this->tabs_gui->addTarget(
119 static::SECTION_SETTINGS,
120 $this->ctrl->getLinkTargetByClass('ilobjloggingsettingsgui', "settings")
121 );
122 }
123 if ($ilAccess->checkAccess('edit_permission','',$this->object->getRefId()))
124 {
125 $this->tabs_gui->addTarget(
126 "perm_settings",
127 $this->ctrl->getLinkTargetByClass('ilpermissiongui',"perm")
128 );
129 }
130 }

◆ getErrorSettings()

ilObjLoggingSettingsGUI::getErrorSettings ( )
protected

Definition at line 418 of file class.ilObjLoggingSettingsGUI.php.

418 {
419 return $this->error_settings;
420 }

Referenced by initFormErrorSettings(), and updateErrorSettings().

+ Here is the caller graph for this function:

◆ getLogger()

ilObjLoggingSettingsGUI::getLogger ( )
Returns
ilLogger

Definition at line 67 of file class.ilObjLoggingSettingsGUI.php.

References $log.

Referenced by errorSettings(), initFormSettings(), settings(), and updateSettings().

+ Here is the caller graph for this function:

◆ getSettings()

ilObjLoggingSettingsGUI::getSettings ( )

Get log settings.

Returns
ilLogSettings

Definition at line 163 of file class.ilObjLoggingSettingsGUI.php.

References $settings.

Referenced by errorSettings(), initFormSettings(), settings(), and updateSettings().

+ Here is the caller graph for this function:

◆ initErrorSettings()

ilObjLoggingSettingsGUI::initErrorSettings ( )
protected

Definition at line 413 of file class.ilObjLoggingSettingsGUI.php.

413 {
414 require_once("Services/Logging/classes/error/class.ilLoggingErrorSettings.php");
415 $this->error_settings = ilLoggingErrorSettings::getInstance();
416 }

References ilLoggingErrorSettings\getInstance().

Referenced by __construct().

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

◆ initFormErrorSettings()

ilObjLoggingSettingsGUI::initFormErrorSettings ( )
protected

Definition at line 388 of file class.ilObjLoggingSettingsGUI.php.

388 {
389 global $lng,$ilDB, $ilAccess;
390
391 require_once './Services/Form/classes/class.ilPropertyFormGUI.php';
392 require_once './Services/Search/classes/class.ilSearchSettings.php';
393
394 $form = new ilPropertyFormGUI();
395 $form->setTitle($this->lng->txt('logs_settings'));
396 $form->setFormAction($this->ctrl->getFormAction($this));
397
398 if($ilAccess->checkAccess('write','',$this->object->getRefId())) {
399 $form->addCommandButton('updateErrorSettings', $this->lng->txt('save'));
400 }
401
402 $folder = new ilNonEditableValueGUI($this->lng->txt('log_error_folder'), 'error_folder');
403 $folder->setValue($this->getErrorSettings()->folder());
404 $form->addItem($folder);
405
406 $mail = new ilTextInputGUI($this->lng->txt('log_error_mail'), 'error_mail');
407 $mail->setValue($this->getErrorSettings()->mail());
408 $form->addItem($mail);
409
410 return $form;
411 }
This class represents a non editable value in a property form.
This class represents a text property in a property form.
mail($to, $subject, $message, $additional_headers=null, $additional_parameters=null)
global $ilDB

References $form, $ilDB, $lng, getErrorSettings(), and Monolog\Handler\mail().

Referenced by errorSettings(), and updateErrorSettings().

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

◆ initFormSettings()

ilObjLoggingSettingsGUI::initFormSettings ( )
protected

Init settings form.

Definition at line 241 of file class.ilObjLoggingSettingsGUI.php.

242 {
243 global $lng,$ilDB, $ilAccess;
244
245 include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
246 include_once './Services/Search/classes/class.ilSearchSettings.php';
247
248 $form = new ilPropertyFormGUI();
249 $form->setTitle($this->lng->txt('logs_settings'));
250 $form->setFormAction($this->ctrl->getFormAction($this));
251
252 if($ilAccess->checkAccess('write','',$this->object->getRefId()))
253 {
254 $form->addCommandButton('updateSettings', $this->lng->txt('save'));
255 }
256
257 $level = new ilSelectInputGUI($this->lng->txt('log_log_level'),'level');
258 $level->setOptions(ilLogLevel::getLevelOptions());
259 $level->setValue($this->getSettings()->getLevel());
260 $form->addItem($level);
261
262 $cache = new ilCheckboxInputGUI($this->lng->txt('log_cache_'), 'cache');
263 $cache->setInfo($this->lng->txt('log_cache_info'));
264 $cache->setValue(1);
265 $cache->setChecked($this->getSettings()->isCacheEnabled());
266 $form->addItem($cache);
267
268 $cache_level = new ilSelectInputGUI($this->lng->txt('log_cache_level'), 'cache_level');
269 $cache_level->setOptions(ilLogLevel::getLevelOptions());
270 $cache_level->setValue($this->getSettings()->getCacheLevel());
271 $cache->addSubItem($cache_level);
272
273 $memory = new ilCheckboxInputGUI($this->lng->txt('log_memory'),'memory');
274 $memory->setValue(1);
275 $memory->setChecked($this->getSettings()->isMemoryUsageEnabled());
276 $form->addItem($memory);
277
278 // Browser handler
279 $browser = new ilCheckboxInputGUI($this->lng->txt('log_browser'),'browser');
280 $browser->setValue(1);
281 $browser->setChecked($this->getSettings()->isBrowserLogEnabled());
282 $form->addItem($browser);
283
284 // users
285 $users = new ilTextInputGUI($this->lng->txt('log_browser_users'), 'browser_users');
286 $users->setValue(current($this->getSettings()->getBrowserLogUsers()));
287 $users->setMulti(TRUE);
288 $users->setMultiValues($this->getSettings()->getBrowserLogUsers());
289
290 $this->getLogger()->debug(print_r($this->getSettings()->getBrowserLogUsers(),TRUE));
291
292 $browser->addSubItem($users);
293
294
295 return $form;
296 }
This class represents a checkbox property in a property form.
static getLevelOptions()
Get log level options.
This class represents a selection list property in a property form.

References $form, $ilDB, $lng, ilLogLevel\getLevelOptions(), getLogger(), and getSettings().

Referenced by settings(), and updateSettings().

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

◆ initSettings()

ilObjLoggingSettingsGUI::initSettings ( )
protected

Definition at line 153 of file class.ilObjLoggingSettingsGUI.php.

154 {
155 include_once("Services/Logging/classes/class.ilLoggingDBSettings.php");
157 }
static getInstance()
Get instance.
settings(ilPropertyFormGUI $form=null)
Show settings @access public.

References ilLoggingDBSettings\getInstance(), and settings().

Referenced by __construct().

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

◆ resetComponentLevels()

ilObjLoggingSettingsGUI::resetComponentLevels ( )
protected

Definition at line 337 of file class.ilObjLoggingSettingsGUI.php.

338 {
339 foreach(ilLogComponentLevels::getInstance()->getLogComponents() as $component)
340 {
341 $component->setLevel(null);
342 $component->update();
343 }
344 ilUtil::sendSuccess($this->lng->txt('settings_saved'),TRUE);
345 $this->ctrl->redirect($this, 'components');
346
347 }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.

References ilLogComponentLevels\getInstance(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ saveComponentLevels()

ilObjLoggingSettingsGUI::saveComponentLevels ( )
protected

Save form.

Definition at line 319 of file class.ilObjLoggingSettingsGUI.php.

320 {
322
323 foreach($_POST['level'] as $component_id => $value)
324 {
325 ilLoggerFactory::getLogger('log')->debug($component_id);
326 ilLoggerFactory::getLogger('log')->debug($value);
327 include_once './Services/Logging/classes/class.ilLogComponentLevel.php';
328 $level = new ilLogComponentLevel($component_id);
329 $level->setLevel($value);
330 $level->update();
331 }
332
333 ilUtil::sendSuccess($this->lng->txt('settings_saved'),TRUE);
334 $this->ctrl->redirect($this, 'components');
335 }
$_POST["username"]
individual log levels for components

References $_POST, ilLogLevel\DEBUG, ilLoggerFactory\getLogger(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ setSubTabs()

ilObjLoggingSettingsGUI::setSubTabs (   $a_section)

Definition at line 132 of file class.ilObjLoggingSettingsGUI.php.

133 {
134 $this->tabs_gui->addSubTab(
135 static::SUB_SECTION_MAIN,
136 $this->lng->txt(static::SUB_SECTION_MAIN),
137 $this->ctrl->getLinkTarget($this,'settings')
138 );
139 $this->tabs_gui->addSubTab(
140 static::SUB_SECTION_ERROR,
141 $this->lng->txt(static::SUB_SECTION_ERROR),
142 $this->ctrl->getLinkTarget($this,'errorSettings')
143 );
144 $this->tabs_gui->addSubTab(
145 static::SUB_SECTION_COMPONENTS,
146 $this->lng->txt(static::SUB_SECTION_COMPONENTS),
147 $this->ctrl->getLinkTarget($this,'components')
148 );
149
150 $this->tabs_gui->activateSubTab($a_section);
151 }

Referenced by components(), errorSettings(), and settings().

+ Here is the caller graph for this function:

◆ settings()

ilObjLoggingSettingsGUI::settings ( ilPropertyFormGUI  $form = null)

Show settings @access public.

Definition at line 172 of file class.ilObjLoggingSettingsGUI.php.

173 {
174 global $ilAccess,$ilErr;
175
176 if(!$ilAccess->checkAccess('read','',$this->object->getRefId()))
177 {
178 $ilErr->raiseError($this->lng->txt('permission_denied'),$ilErr->MESSAGE);
179 }
180
181 $this->tabs_gui->setTabActive(static::SECTION_SETTINGS);
182 $this->setSubTabs(static::SUB_SECTION_MAIN);
183
184 if(!$form instanceof ilPropertyFormGUI)
185 {
186 $form = $this->initFormSettings();
187 }
188 $this->tpl->setContent($form->getHTML());
189
190 $this->getLogger()->debug('Currrent level is '.$this->getSettings()->getLevel());
191
192 return TRUE;
193 }

References $form, $ilErr, getLogger(), getSettings(), initFormSettings(), and setSubTabs().

Referenced by initSettings(), and updateSettings().

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

◆ updateErrorSettings()

ilObjLoggingSettingsGUI::updateErrorSettings ( )
protected

Definition at line 367 of file class.ilObjLoggingSettingsGUI.php.

367 {
368 global $rbacsystem;
369
370 if(!$rbacsystem->checkAccess('write',$this->object->getRefId())) {
371 $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
372 }
373
374 $form = $this->initFormErrorSettings();
375 if($form->checkInput()) {
376 $this->getErrorSettings()->setMail($form->getInput('error_mail'));
377 $this->getErrorSettings()->update();
378
379 ilUtil::sendSuccess($this->lng->txt('error_settings_saved'),TRUE);
380 $this->ctrl->redirect($this,'errorSettings');
381 }
382
383 ilUtil::sendFailure($this->lng->txt('err_check_input'));
384 $form->setValuesByPost();
385 $this->errorSettings($form);
386 }
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
redirection script todo: (a better solution should control the processing via a xml file)

References $form, errorSettings(), getErrorSettings(), initFormErrorSettings(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ updateSettings()

ilObjLoggingSettingsGUI::updateSettings ( )

Save settings @access public.

Definition at line 199 of file class.ilObjLoggingSettingsGUI.php.

200 {
201 include_once 'Services/WebServices/RPC/classes/class.ilRPCServerSettings.php';
202
203 global $rbacsystem;
204
205 if(!$rbacsystem->checkAccess('write',$this->object->getRefId()))
206 {
207 $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
208 }
209
210
211 $form = $this->initFormSettings();
212 if($form->checkInput())
213 {
214 $this->getSettings()->setLevel($form->getInput('level'));
215 $this->getSettings()->enableCaching($form->getInput('cache'));
216 $this->getSettings()->setCacheLevel($form->getInput('cache_level'));
217 $this->getSettings()->enableMemoryUsage($form->getInput('memory'));
218 $this->getSettings()->enableBrowserLog($form->getInput('browser'));
219 $this->getSettings()->setBrowserUsers($form->getInput('browser_users'));
220
221 $this->getLogger()->info(print_r($form->getInput('browser_users'),TRUE));
222
223 $this->getSettings()->update();
224
225 ilUtil::sendSuccess($this->lng->txt('settings_saved'),TRUE);
226 $this->ctrl->redirect($this,'settings');
227 return TRUE;
228 }
229
230 ilUtil::sendFailure($this->lng->txt('err_check_input'));
231 $form->setValuesByPost();
232 $this->settings($form);
233
234 return TRUE;
235 }

References $form, getLogger(), getSettings(), initFormSettings(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and settings().

+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilObjLoggingSettingsGUI::$ctrl

Definition at line 24 of file class.ilObjLoggingSettingsGUI.php.

◆ $form

ilObjLoggingSettingsGUI::$form
protected

◆ $lng

ilObjLoggingSettingsGUI::$lng

◆ $log

ilObjLoggingSettingsGUI::$log
protected

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

Referenced by getLogger().

◆ $settings

ilObjLoggingSettingsGUI::$settings
protected

Definition at line 27 of file class.ilObjLoggingSettingsGUI.php.

Referenced by getSettings().

◆ $tabs_gui

ilObjLoggingSettingsGUI::$tabs_gui
protected

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

◆ $tpl

ilObjLoggingSettingsGUI::$tpl

Definition at line 22 of file class.ilObjLoggingSettingsGUI.php.

Referenced by __construct().

◆ SECTION_SETTINGS

const ilObjLoggingSettingsGUI::SECTION_SETTINGS = 'settings'

Definition at line 16 of file class.ilObjLoggingSettingsGUI.php.

◆ SUB_SECTION_COMPONENTS

const ilObjLoggingSettingsGUI::SUB_SECTION_COMPONENTS = 'log_components'

Definition at line 18 of file class.ilObjLoggingSettingsGUI.php.

◆ SUB_SECTION_ERROR

const ilObjLoggingSettingsGUI::SUB_SECTION_ERROR = 'log_error_settings'

Definition at line 19 of file class.ilObjLoggingSettingsGUI.php.

◆ SUB_SECTION_MAIN

const ilObjLoggingSettingsGUI::SUB_SECTION_MAIN = 'log_general_settings'

Definition at line 17 of file class.ilObjLoggingSettingsGUI.php.


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