4 include_once
'./Services/Object/classes/class.ilObjectGUI.php';
39 public function __construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output =
true)
46 $ilTabs = $DIC[
'ilTabs'];
49 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
56 $this->tabs_gui = $ilTabs;
60 $this->lng->loadLanguageModule(
'logging');
61 $this->lng->loadLanguageModule(
'log');
63 include_once
'./Services/Logging/classes/public/class.ilLoggerFactory.php';
84 $next_class = $this->ctrl->getNextClass($this);
85 $cmd = $this->ctrl->getCmd();
88 switch ($next_class) {
89 case 'ilpermissiongui':
90 $this->tabs_gui->setTabActive(
'perm_settings');
91 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
93 $ret = &$this->ctrl->forwardCommand($perm_gui);
97 if ($cmd ==
"" || $cmd ==
"view") {
118 $ilAccess = $DIC[
'ilAccess'];
120 if ($ilAccess->checkAccess(
"read",
'', $this->object->getRefId())) {
121 $this->tabs_gui->addTarget(
122 static::SECTION_SETTINGS,
123 $this->ctrl->getLinkTargetByClass(
'ilobjloggingsettingsgui',
"settings")
126 if ($ilAccess->checkAccess(
'edit_permission',
'', $this->object->getRefId())) {
127 $this->tabs_gui->addTarget(
129 $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm")
136 $this->tabs_gui->addSubTab(
137 static::SUB_SECTION_MAIN,
138 $this->lng->txt(static::SUB_SECTION_MAIN),
139 $this->ctrl->getLinkTarget($this,
'settings')
141 $this->tabs_gui->addSubTab(
142 static::SUB_SECTION_ERROR,
143 $this->lng->txt(static::SUB_SECTION_ERROR),
144 $this->ctrl->getLinkTarget($this,
'errorSettings')
146 $this->tabs_gui->addSubTab(
147 static::SUB_SECTION_COMPONENTS,
148 $this->lng->txt(static::SUB_SECTION_COMPONENTS),
149 $this->ctrl->getLinkTarget($this,
'components')
152 $this->tabs_gui->activateSubTab($a_section);
157 include_once(
"Services/Logging/classes/class.ilLoggingDBSettings.php");
178 $ilAccess = $DIC[
'ilAccess'];
181 if (!$ilAccess->checkAccess(
'read',
'', $this->object->getRefId())) {
182 $ilErr->raiseError($this->lng->txt(
'permission_denied'),
$ilErr->MESSAGE);
185 $this->tabs_gui->setTabActive(static::SECTION_SETTINGS);
191 $this->tpl->setContent(
$form->getHTML());
204 include_once
'Services/WebServices/RPC/classes/class.ilRPCServerSettings.php';
208 $rbacsystem = $DIC[
'rbacsystem'];
210 if (!$rbacsystem->checkAccess(
'write', $this->object->getRefId())) {
211 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"), $this->
ilias->error_obj->MESSAGE);
216 if (
$form->checkInput()) {
224 $this->
getLogger()->info(print_r(
$form->getInput(
'browser_users'),
true));
228 ilUtil::sendSuccess($this->lng->txt(
'settings_saved'),
true);
229 $this->ctrl->redirect($this,
'settings');
234 $form->setValuesByPost();
249 $ilDB = $DIC[
'ilDB'];
250 $ilAccess = $DIC[
'ilAccess'];
252 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
253 include_once
'./Services/Search/classes/class.ilSearchSettings.php';
256 $form->setTitle($this->lng->txt(
'logs_settings'));
257 $form->setFormAction($this->ctrl->getFormAction($this));
259 if ($ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
260 $form->addCommandButton(
'updateSettings', $this->lng->txt(
'save'));
265 $level->setValue($this->
getSettings()->getLevel());
266 $form->addItem($level);
269 $cache->
setInfo($this->lng->txt(
'log_cache_info'));
271 $cache->setChecked($this->
getSettings()->isCacheEnabled());
272 $form->addItem($cache);
274 $cache_level =
new ilSelectInputGUI($this->lng->txt(
'log_cache_level'),
'cache_level');
276 $cache_level->setValue($this->
getSettings()->getCacheLevel());
277 $cache->addSubItem($cache_level);
281 $memory->setChecked($this->
getSettings()->isMemoryUsageEnabled());
282 $form->addItem($memory);
310 $this->tabs_gui->activateTab(static::SECTION_SETTINGS);
311 $this->
setSubTabs(static::SUB_SECTION_COMPONENTS);
313 include_once
'./Services/Logging/classes/class.ilLogComponentTableGUI.php';
329 foreach (
$_POST[
'level'] as $component_id => $value) {
332 include_once
'./Services/Logging/classes/class.ilLogComponentLevel.php';
337 ilUtil::sendSuccess($this->lng->txt(
'settings_saved'),
true);
338 $this->ctrl->redirect($this,
'components');
346 $component->setLevel(null);
347 $component->update();
349 ilUtil::sendSuccess($this->lng->txt(
'settings_saved'),
true);
350 $this->ctrl->redirect($this,
'components');
357 $ilAccess = $DIC[
'ilAccess'];
360 if (!$ilAccess->checkAccess(
'read',
'', $this->object->getRefId())) {
361 $ilErr->raiseError($this->lng->txt(
'permission_denied'),
$ilErr->MESSAGE);
364 $this->tabs_gui->setTabActive(static::SECTION_SETTINGS);
370 $this->tpl->setContent(
$form->getHTML());
379 $rbacsystem = $DIC[
'rbacsystem'];
381 if (!$rbacsystem->checkAccess(
'write', $this->object->getRefId())) {
382 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"), $this->
ilias->error_obj->MESSAGE);
386 if (
$form->checkInput()) {
390 ilUtil::sendSuccess($this->lng->txt(
'error_settings_saved'),
true);
391 $this->ctrl->redirect($this,
'errorSettings');
395 $form->setValuesByPost();
404 $ilDB = $DIC[
'ilDB'];
405 $ilAccess = $DIC[
'ilAccess'];
407 require_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
408 require_once
'./Services/Search/classes/class.ilSearchSettings.php';
411 $form->setTitle($this->lng->txt(
'logs_settings'));
412 $form->setFormAction($this->ctrl->getFormAction($this));
414 if ($ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
415 $form->addCommandButton(
'updateErrorSettings', $this->lng->txt(
'save'));
420 $form->addItem($folder);
422 $mail =
new ilTextInputGUI($this->lng->txt(
'log_error_mail'),
'error_mail');
424 $form->addItem($mail);
431 require_once(
"Services/Logging/classes/error/class.ilLoggingErrorSettings.php");
437 return $this->error_settings;
initFormSettings()
Init settings form.
setValue($a_value)
Set Value.
const SUB_SECTION_COMPONENTS
static getLevelOptions()
Get log level options.
components()
Show components.
mail($to, $subject, $message, $additional_headers=null, $additional_parameters=null)
executeCommand()
Execute command.
prepareOutput($a_show_subobjects=true)
prepare output
getSettings()
Get log settings.
Class ilObjectGUI Basic methods of all Output classes.
This class represents a text property in a property form.
redirection script todo: (a better solution should control the processing via a xml file) ...
settings(ilPropertyFormGUI $form=null)
Show settings public.
individual log levels for components
static getInstance()
Get instance.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
saveComponentLevels()
Save form.
updateSettings()
Save settings public.
This class represents a non editable value in a property form.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static getLogger($a_component_id)
Get component logger.
__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
Constructor.
if(empty($password)) $table
setValue($a_value)
Set Value.
Component logger with individual log levels by component id.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.