ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilObjFileAccessSettingsGUI.php
Go to the documentation of this file.
1<?php
2/*
3 +-----------------------------------------------------------------------------+
4 | ILIAS open source |
5 +-----------------------------------------------------------------------------+
6 | Copyright (c) 1998-2001 ILIAS open source, University of Cologne |
7 | |
8 | This program is free software; you can redistribute it and/or |
9 | modify it under the terms of the GNU General Public License |
10 | as published by the Free Software Foundation; either version 2 |
11 | of the License, or (at your option) any later version. |
12 | |
13 | This program is distributed in the hope that it will be useful, |
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | GNU General Public License for more details. |
17 | |
18 | You should have received a copy of the GNU General Public License |
19 | along with this program; if not, write to the Free Software |
20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21 +-----------------------------------------------------------------------------+
22*/
23
27
28include_once "./Services/Object/classes/class.ilObjectGUI.php";
29
43{
44 const INSTALL_README_PATH = '/docs/configuration/install.md';
45 const CMD_EDIT_DOWNLOADING_SETTINGS = 'editDownloadingSettings';
46 const CMD_EDIT_WEBDAV_SETTINGS = 'editWebDAVSettings';
47 const CMD_SANITIZE = 'sanitize';
51 protected $folderSettings;
56
57
63 public function __construct($a_data, $a_id, $a_call_by_reference)
64 {
65 $this->type = "facs";
66 parent::__construct($a_data, $a_id, $a_call_by_reference, false);
67 $this->folderSettings = new ilSetting('fold');
68
69 // Load the disk quota settings object
70 require_once 'Services/WebDAV/classes/class.ilObjDiskQuotaSettings.php';
71 $this->disk_quota_obj = new ilObjDiskQuotaSettings($a_id, $a_call_by_reference);
72 $this->disk_quota_obj->read();
73 }
74
75
82 public function executeCommand()
83 {
84 global $DIC;
85 $ilAccess = $DIC['ilAccess'];
86 $ilias = $DIC['ilias'];
87 $lng = $DIC['lng'];
88
89 $lng->loadLanguageModule("file");
90
91 $next_class = $this->ctrl->getNextClass($this);
92 $cmd = $this->ctrl->getCmd();
93
94 $this->prepareOutput();
95
96 if (!$ilAccess->checkAccess('read', '', $this->object->getRefId())) {
97 $ilias->raiseError($lng->txt('no_permission'), $ilias->error_obj->MESSAGE);
98 }
99
100 switch ($next_class) {
101 case 'ilpermissiongui':
102 $this->tabs_gui->setTabActive('perm_settings');
103 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
104 $perm_gui = new ilPermissionGUI($this);
105 $ret = &$this->ctrl->forwardCommand($perm_gui);
106 break;
107
108 case 'ilfmsettingsgui':
109 $this->tabs_gui->setTabActive('fm_settings_tab');
110 include_once './Services/WebServices/FileManager/classes/class.ilFMSettingsGUI.php';
111 $fmg = new ilFMSettingsGUI($this);
112 $this->ctrl->forwardCommand($fmg);
113 break;
114
115 default:
116 if (!$cmd || $cmd == 'view') {
118 }
119
120 $this->$cmd();
121 break;
122 }
123
124 return true;
125 }
126
127
134 public function getAdminTabs()
135 {
136 global $DIC;
137 $rbacsystem = $DIC['rbacsystem'];
138
139 $GLOBALS['DIC']['lng']->loadLanguageModule('fm');
140
141 if ($rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
142 $this->tabs_gui->addTarget(
143 'downloading_settings',
144 $this->ctrl->getLinkTarget($this, self::CMD_EDIT_DOWNLOADING_SETTINGS),
145 array(self::CMD_EDIT_DOWNLOADING_SETTINGS, "view")
146 );
147
148 $this->tabs_gui->addTarget(
149 'upload_settings',
150 $this->ctrl->getLinkTarget($this, "editUploadSettings"),
151 array("editUploadSettings", "view")
152 );
153
154 $this->tabs_gui->addTarget(
155 'preview_settings',
156 $this->ctrl->getLinkTarget($this, "editPreviewSettings"),
157 array("editPreviewSettings", "view")
158 );
159
160 $this->tabs_gui->addTarget('webdav', $this->ctrl->getLinkTarget($this, "editWebDAVSettings"), array("editWebDAVSettings", "view"));
161
162 $this->tabs_gui->addTarget(
163 'fm_settings_tab',
164 $this->ctrl->getLinkTargetByClass('ilFMSettingsGUI', 'settings'),
165 array(),
166 'ilfmsettingsgui'
167 );
168
169 $this->tabs_gui->addTarget("disk_quota", $this->ctrl->getLinkTarget($this, "editDiskQuotaSettings"), array("editDiskQuota", "view"));
170 }
171 if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
172 $this->tabs_gui->addTarget("perm_settings", $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm"), array(), 'ilpermissiongui');
173 }
174 }
175
176
180 protected function initDownloadingSettingsForm()
181 {
182 global $DIC;
183 $ilCtrl = $DIC['ilCtrl'];
184 $lng = $DIC['lng'];
185
186 require_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
187 require_once("./Services/Form/classes/class.ilCheckboxInputGUI.php");
188 require_once("./Services/Form/classes/class.ilRadioGroupInputGUI.php");
189 require_once("./Services/Form/classes/class.ilRadioOption.php");
190 require_once("./Services/Form/classes/class.ilTextAreaInputGUI.php");
191
192 $form = new ilPropertyFormGUI();
193 $form->setFormAction($ilCtrl->getFormAction($this));
194 $form->setTitle($lng->txt("settings"));
195
196 // Backwards compatibility with ILIAS 3.9: Use the name of the
197 // uploaded file as the filename for the downloaded file instead
198 // of the title of the file object.
199 $dl_prop = new ilCheckboxInputGUI($lng->txt("download_with_uploaded_filename"), "download_with_uploaded_filename");
200 $dl_prop->setValue('1');
201 // default value should reflect previous behaviour (-> 0)
202 $dl_prop->setChecked($this->object->isDownloadWithUploadedFilename() == 1);
203 $dl_prop->setInfo($lng->txt('download_with_uploaded_filename_info'));
204 $form->addItem($dl_prop);
205
206 // Show download action for folder
207 $dl_prop = new ilCheckboxInputGUI($lng->txt("enable_download_folder"), "enable_download_folder");
208 $dl_prop->setValue('1');
209 // default value should reflect previous behaviour (-> 0)
210 $dl_prop->setChecked($this->folderSettings->get("enable_download_folder", 0) == 1);
211 $dl_prop->setInfo($lng->txt('enable_download_folder_info'));
212 $form->addItem($dl_prop);
213
214 // multi download
215 $dl_prop = new ilCheckboxInputGUI($lng->txt("enable_multi_download"), "enable_multi_download");
216 $dl_prop->setValue('1');
217 // default value should reflect previous behaviour (-> 0)
218 $dl_prop->setChecked($this->folderSettings->get("enable_multi_download", 0) == 1);
219 $dl_prop->setInfo($lng->txt('enable_multi_download_info'));
220 $form->addItem($dl_prop);
221
222 // background task
223
224 $lng->loadLanguageModule("bgtask");
225 $dl_bg = new ilCheckboxInputGUI($lng->txt("bgtask_setting"), "enable_bg");
226 $dl_bg->setInfo($lng->txt("bgtask_setting_info"));
227 $dl_bg->setChecked($this->folderSettings->get("bgtask_download", 0));
228 $form->addItem($dl_bg);
229
230 $dl_bgtc = new ilNumberInputGUI($lng->txt("bgtask_setting_threshold_count"), "bg_tcount");
231 $dl_bgtc->setInfo($lng->txt("bgtask_setting_threshold_count_info"));
232 $dl_bgtc->setRequired(true);
233 $dl_bgtc->setSize(10);
234 $dl_bgtc->setMinValue(1);
235 $dl_bgtc->setSuffix($lng->txt("files"));
236 $dl_bgtc->setValue($this->folderSettings->get("bgtask_download_tcount", null));
237 $dl_bg->addSubItem($dl_bgtc);
238
239 $dl_bgts = new ilNumberInputGUI($lng->txt("bgtask_setting_threshold_size"), "bg_tsize");
240 $dl_bgts->setInfo($lng->txt("bgtask_setting_threshold_size_info"));
241 $dl_bgts->setRequired(true);
242 $dl_bgts->setSize(10);
243 $dl_bgts->setMinValue(1);
244 $dl_bgts->setSuffix($lng->txt("lang_size_mb"));
245 $dl_bgts->setValue($this->folderSettings->get("bgtask_download_tsize", null));
246 $dl_bg->addSubItem($dl_bgts);
247
248 $dl_bgl = new ilNumberInputGUI($lng->txt("bgtask_setting_limit"), "bg_limit");
249 $dl_bgl->setInfo($lng->txt("bgtask_setting_limit_info"));
250 $dl_bgl->setRequired(true);
251 $dl_bgl->setSize(10);
252 $dl_bgl->setMinValue(1);
253 $dl_bgl->setSuffix($lng->txt("lang_size_mb"));
254 $dl_bgl->setValue($this->folderSettings->get("bgtask_download_limit", null));
255 $dl_bg->addSubItem($dl_bgl);
256
257 // Inline file extensions
258 $tai_prop = new ilTextAreaInputGUI($lng->txt('inline_file_extensions'), 'inline_file_extensions');
259 $tai_prop->setValue($this->object->getInlineFileExtensions());
260 $tai_prop->setInfo($lng->txt('inline_file_extensions_info'));
261 $tai_prop->setCols(80);
262 $tai_prop->setRows(5);
263 $form->addItem($tai_prop);
264
265 // command buttons
266 $form->addCommandButton('saveDownloadingSettings', $lng->txt('save'));
267 $form->addCommandButton('view', $lng->txt('cancel'));
268
269 return $form;
270 }
271
272
276 public function editDownloadingSettings(ilPropertyFormGUI $a_form = null)
277 {
278 global $DIC, $ilErr;
279
280 // $DIC->toolbar()->addButton($this->lng->txt('generate_sanitize_report'), $this->ctrl->getLinkTarget($this, self::CMD_SANITIZE));
281
282 $this->tabs_gui->setTabActive('downloading_settings');
283
284 if (!$DIC->rbac()->system()->checkAccess("visible,read", $this->object->getRefId())) {
285 $ilErr->raiseError($DIC->language()->txt("no_permission"), $ilErr->WARNING);
286 }
287
288 if (!$a_form) {
289 $a_form = $this->initDownloadingSettingsForm();
290 }
291
292 $DIC->ui()->mainTemplate()->setContent($a_form->getHTML());
293 }
294
295
296 public function sanitize()
297 {
298 global $DIC;
299
300 $report = $DIC->backgroundTasks()->taskFactory()->createTask(SanitationReportJob::class);
301 $ui = $DIC->backgroundTasks()->taskFactory()->createTask(DownloadSanitationReportUserInteraction::class, [$report]);
302
303 $bucket = new BasicBucket();
304 $bucket->setUserId($DIC->user()->getId());
305 $bucket->setTask($ui);
306 $bucket->setTitle("File Sanitiation Report");
307 $bucket->setDescription("");
308
309 $DIC->backgroundTasks()->taskManager()->run($bucket);
310 $this->ctrl->redirect($this, self::CMD_EDIT_DOWNLOADING_SETTINGS);
311 }
312
313
317 public function saveDownloadingSettings()
318 {
319 global $DIC;
320 $rbacsystem = $DIC['rbacsystem'];
321
322 if (!$rbacsystem->checkAccess("write", $this->object->getRefId())) {
323 ilUtil::sendFailure($DIC->language()->txt("no_permission"), true);
324 $DIC->ctrl()->redirect($this, self::CMD_EDIT_DOWNLOADING_SETTINGS);
325 }
326
328 if ($form->checkInput()) {
329 $this->object->setDownloadWithUploadedFilename(ilUtil::stripSlashes($_POST['download_with_uploaded_filename']));
330 $this->object->setInlineFileExtensions(ilUtil::stripSlashes($_POST['inline_file_extensions']));
331 $this->object->update();
332
333 $this->folderSettings->set("enable_download_folder", $_POST["enable_download_folder"] == 1);
334 $this->folderSettings->set("enable_multi_download", $_POST["enable_multi_download"] == 1);
335
336 $this->folderSettings->set("bgtask_download", (bool) $_POST["enable_bg"]);
337 if ((bool) $_POST["enable_bg"]) {
338 $this->folderSettings->set("bgtask_download_limit", (int) $_POST["bg_limit"]);
339 $this->folderSettings->set("bgtask_download_tcount", (int) $_POST["bg_tcount"]);
340 $this->folderSettings->set("bgtask_download_tsize", (int) $_POST["bg_tsize"]);
341 }
342
343 ilUtil::sendSuccess($DIC->language()->txt('settings_saved'), true);
344 $DIC->ctrl()->redirect($this, self::CMD_EDIT_DOWNLOADING_SETTINGS);
345 }
346
347 $form->setValuesByPost();
349 }
350
351
352 protected function initWebDAVSettingsForm()
353 {
354 global $DIC;
355
356 $lng = $DIC->language();
357
358 require_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
359 require_once("./Services/Form/classes/class.ilCheckboxInputGUI.php");
360 require_once("./Services/Form/classes/class.ilRadioGroupInputGUI.php");
361 require_once("./Services/Form/classes/class.ilRadioOption.php");
362 require_once("./Services/Form/classes/class.ilTextAreaInputGUI.php");
363
364 $form = new ilPropertyFormGUI();
365 $form->setFormAction($DIC->ctrl()->getFormAction($this));
366 $form->setTitle($lng->txt("settings"));
367
368 // Enable webdav
369 $cb_prop = new ilCheckboxInputGUI($lng->txt("enable_webdav"), "enable_webdav");
370 $cb_prop->setValue('1');
371 $cb_prop->setChecked($this->object->isWebdavEnabled());
372 $cb_prop->setInfo($this->getAdditionalWebDAVInformation());
373 $form->addItem($cb_prop);
374
375 $rgi_prop = new ilRadioGroupInputGUI($lng->txt('webfolder_instructions'), 'custom_webfolder_instructions_choice');
376 $rgi_prop->addOption(new ilRadioOption($lng->txt('use_default_instructions'), 'default'));
377 $rgi_prop->addOption(new ilRadioOption($lng->txt('use_customized_instructions'), 'custom'));
378 $rgi_prop->setValue($this->object->isCustomWebfolderInstructionsEnabled() ? 'custom' : 'default');
379 $form->addItem($rgi_prop);
380 $tai_prop = new ilTextAreaInputGUI('', 'custom_webfolder_instructions');
381 $tai_prop->setValue($this->object->getCustomWebfolderInstructions());
382 $tai_prop->setInfo($lng->txt("webfolder_instructions_info"));
383 $tai_prop->setRows(20);
384 $form->addItem($tai_prop);
385
386 // command buttons
387 $form->addCommandButton('saveWebDAVSettings', $lng->txt('save'));
388 $form->addCommandButton('view', $lng->txt('cancel'));
389
390 return $form;
391 }
392
393
397 public function editWebDAVSettings()
398 {
399 global $DIC;
400 $rbacsystem = $DIC['rbacsystem'];
401 $ilErr = $DIC['ilErr'];
402 $tpl = $DIC['tpl'];
403 $ilCtrl = $DIC['ilCtrl'];
404 $lng = $DIC['lng'];
405
406 $this->tabs_gui->setTabActive('webdav');
407
408 if (!$rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
409 $ilErr->raiseError($lng->txt("no_permission"), $ilErr->WARNING);
410 }
411
412 $form = $this->initWebDAVSettingsForm();
413 $tpl->setContent($form->getHTML());
414 }
415
416
420 public function saveWebDAVSettings()
421 {
422 global $DIC;
423 $rbacsystem = $DIC['rbacsystem'];
424 $ilErr = $DIC['ilErr'];
425 $tpl = $DIC['tpl'];
426 $ilCtrl = $DIC['ilCtrl'];
427 $lng = $DIC['lng'];
428
429 if (!$rbacsystem->checkAccess("write", $this->object->getRefId())) {
430 ilUtil::sendFailure($DIC->language()->txt('no_permission'), true);
431 $DIC->ctrl()->redirect($this, self::CMD_EDIT_WEBDAV_SETTINGS);
432 }
433
434 $form = $this->initWebDAVSettingsForm();
435 if ($form->checkInput()) {
436 $this->object->setWebdavEnabled($_POST['enable_webdav'] == '1');
437 // $this->object->setWebdavActionsVisible($_POST['webdav_actions_visible'] == '1');
438 $this->object->setCustomWebfolderInstructionsEnabled($_POST['custom_webfolder_instructions_choice'] == 'custom');
439 $this->object->setCustomWebfolderInstructions(ilUtil::stripSlashes($_POST['custom_webfolder_instructions'], false));
440 $this->object->update();
441 ilUtil::sendSuccess($lng->txt('settings_saved'), true);
442 $ilCtrl->redirect($this, self::CMD_EDIT_WEBDAV_SETTINGS);
443 } else {
444 $form->setValuesByPost();
445 $tpl->setContent($form->getHTML());
446 }
447 }
448
449
451 {
452 global $DIC;
453 $lng = $DIC->language();
454
455 return $furtherInformation = sprintf($lng->txt('webdav_additional_information'), $this->getInstallationDocsLink());
456 }
457
458
459 public function getInstallationDocsLink()
460 {
462 }
463
464
468 public function setTitleAndDescription()
469 {
470 parent::setTitleAndDescription();
471 $this->tpl->setDescription($this->object->getDescription());
472 }
473
474
475 // DISK QUOTA --------------------------------------------------------------
476
477
481 public function addDiskQuotaSubtabs($a_active_subtab)
482 {
483 global $DIC;
484 $ilCtrl = $DIC['ilCtrl'];
485 $ilTabs = $DIC['ilTabs'];
486
487 include_once("./Services/COPage/classes/class.ilPageEditorSettings.php");
488
489 $ilTabs->addSubTabTarget("settings", $ilCtrl->getLinkTarget($this, "editDiskQuotaSettings"), array("editDiskQuotaSettings"));
490
491 require_once 'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
493 $ilTabs->addSubTabTarget("disk_quota_report", $ilCtrl->getLinkTarget($this, "viewDiskQuotaReport"), array("viewDiskQuotaReport"));
494 }
495
496 $ilTabs->addSubTabTarget(
497 "disk_quota_reminder_mail",
498 $ilCtrl->getLinkTarget($this, "editDiskQuotaMailTemplate"),
499 array("editDiskQuotaMailTemplate")
500 );
501
502 $ilTabs->setSubTabActive($a_active_subtab);
503 }
504
505
509 public function editDiskQuotaSettings()
510 {
511 global $DIC;
512 $rbacsystem = $DIC['rbacsystem'];
513 $ilErr = $DIC['ilErr'];
514 $ilSetting = $DIC['ilSetting'];
515 $tpl = $DIC['tpl'];
516 $lng = $DIC['lng'];
517 $ilCtrl = $DIC['ilCtrl'];
518
519 if (!$rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
520 $ilErr->raiseError($lng->txt("no_permission"), $ilErr->WARNING);
521 }
522
523 $this->tabs_gui->setTabActive('disk_quota');
524 $this->addDiskQuotaSubtabs('settings');
525
526 require_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
527 require_once("./Services/Form/classes/class.ilCheckboxInputGUI.php");
528 require_once("./Services/Form/classes/class.ilRadioGroupInputGUI.php");
529 require_once("./Services/Form/classes/class.ilRadioOption.php");
530 require_once("./Services/Form/classes/class.ilTextAreaInputGUI.php");
531
532 $lng->loadLanguageModule("file");
533
534 $form = new ilPropertyFormGUI();
535 $form->setFormAction($ilCtrl->getFormAction($this));
536 $form->setTitle($lng->txt("settings"));
537
538 include_once "Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php";
540
541 /*
542 // command buttons
543 $form->addCommandButton('saveDiskQuotaSettings', $lng->txt('save'));
544 $form->addCommandButton('editDiskQuotaSettings', $lng->txt('cancel'));
545 */
546
547 $tpl->setContent($form->getHTML());
548 }
549
550
554 public function saveDiskQuotaSettings()
555 {
556 global $DIC;
557 $rbacsystem = $DIC['rbacsystem'];
558 $ilErr = $DIC['ilErr'];
559 $ilCtrl = $DIC['ilCtrl'];
560 $lng = $DIC['lng'];
561
562 if (!$rbacsystem->checkAccess("write", $this->object->getRefId())) {
563 $ilErr->raiseError($lng->txt("no_permission"), $ilErr->WARNING);
564 }
565
566 // ilUtil::sendInfo($lng->txt('settings_saved'),true);
567 $ilCtrl->redirect($this, "editDiskQuotaSettings");
568 }
569
570
575 public function viewDiskQuotaReport()
576 {
577 global $DIC;
578 $rbacsystem = $DIC['rbacsystem'];
579 $ilErr = $DIC['ilErr'];
580 $ilSetting = $DIC['ilSetting'];
581 $lng = $DIC['lng'];
582
583 if (!$rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
584 $ilErr->raiseError($lng->txt("no_permission"), $ilErr->WARNING);
585 }
586
587 $this->tabs_gui->setTabActive('disk_quota');
588 $this->addDiskQuotaSubtabs('disk_quota_report');
589
590 // nothing to do if disk quota is not active
591 require_once 'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
593 return;
594 }
595
596 // get the form
597 $this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.disk_quota_report.html', "Services/WebDAV");
598
599 // get the date of the last update
600 require_once("./Services/WebDAV/classes/class.ilDiskQuotaChecker.php");
602 if ($last_update == null) {
603 // nothing to do if disk usage report has not been run
604 $this->tpl->setVariable('LAST_UPDATE_TEXT', $lng->txt('disk_quota_report_not_run_yet'));
605
606 return;
607 } else {
608 $this->tpl->setVariable(
609 'LAST_UPDATE_TEXT',
610 $lng->txt('last_update') . ': ' . ilDatePresentation::formatDate(new ilDateTime($last_update, IL_CAL_DATETIME))
611 );
612 }
613
614 // Filter
615 $_SESSION['quota_usage_filter'] = isset($_POST['usage_filter']) ? $_POST['usage_filter'] : $_SESSION['quota_usage_filter'];
616 if ($_SESSION['quota_usage_filter'] == 0) {
617 $_SESSION['quota_usage_filter'] = 4;
618 }
619 $_SESSION['quota_access_filter'] = isset($_POST['access_filter']) ? $_POST['access_filter'] : $_SESSION['quota_access_filter'];
620 if ($_SESSION['quota_access_filter'] == 0) {
621 $_SESSION['quota_access_filter'] = 1;
622 }
623 $usage_action[1] = $lng->txt('all_users');
624 $usage_action[2] = $lng->txt('filter_users_without_disk_usage');
625 $usage_action[3] = $lng->txt('filter_users_with_disk_usage');
626 $usage_action[4] = $lng->txt('filter_users_with_exceeded_disk_quota');
627 $access_action[1] = $lng->txt('all_users');
628 $access_action[2] = $lng->txt('filter_users_with_access');
629 $access_action[3] = $lng->txt('filter_users_without_access');
630
631 $select_usage_filter = ilUtil::formSelect($_SESSION['quota_usage_filter'], "usage_filter", $usage_action, false, true);
632 $select_access_filter = ilUtil::formSelect($_SESSION['quota_access_filter'], "access_filter", $access_action, false, true);
633
634 $this->tpl->setCurrentBlock("filter");
635 $this->tpl->setVariable("FILTER_TXT_FILTER", $lng->txt('filter'));
636 $this->tpl->setVariable("SELECT_USAGE_FILTER", $select_usage_filter);
637 $this->tpl->setVariable("SELECT_ACCESS_FILTER", $select_access_filter);
638 $this->tpl->setVariable("FILTER_ACTION", $this->ctrl->getLinkTarget($this, 'viewDiskQuotaReport'));
639 $this->tpl->setVariable("FILTER_NAME", 'view');
640 $this->tpl->setVariable("FILTER_VALUE", $lng->txt('apply_filter'));
641 $this->tpl->parseCurrentBlock();
642
643 // load templates for table
644 $a_tpl = new ilTemplate('tpl.table.html', true, true);
645 $a_tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.obj_tbl_rows.html");
646
647 // create table
648 require_once './Services/Table/classes/class.ilTableGUI.php';
649 $tbl = new ilTableGUI(0, false);
650 $tbl->setTitle('');
651
652 // title & header columns
653 $header_vars = array('login', 'firstname', 'lastname', 'email', 'access_until', 'last_login', 'disk_quota', 'disk_usage', 'last_reminder');
654 $tbl->setHeaderNames(array(
655 $lng->txt('login'),
656 $lng->txt('firstname'),
657 $lng->txt('lastname'),
658 $lng->txt('email'),
659 $lng->txt('access_until'),
660 $lng->txt('last_login'),
661 $lng->txt('disk_quota'),
662 $lng->txt('disk_usage'),
663 $lng->txt('last_reminder'),
664 ));
665 $tbl->setHeaderVars($header_vars, $this->ctrl->getParameterArray($this, 'viewDiskQuotaReport', false));
666
667 $tbl->enable("numinfo_header");
668 $tbl->setFormName("cmd");
669 $tbl->setSelectAllCheckbox("id");
670
671 // sorting
672 $tbl->setOrderColumn($_GET["sort_by"]);
673 $tbl->setOrderDirection($_GET["sort_order"]);
674
675 // fetch the data
677 $_SESSION['quota_usage_filter'],
678 $_SESSION['quota_access_filter'],
679 $header_vars[$tbl->getOrderColumn()],
680 $tbl->getOrderDirection()
681 );
682
683 // paging
684 $tbl->setLimit($_GET["limit"]);
685 $tbl->setOffset($_GET["offset"]);
686 $tbl->setMaxCount(count($data));
687
688 // footer
689 $tbl->setFooter("tblfooter", $lng->txt("previous"), $lng->txt("next"));
690
691 // render table
692 $tbl->setTemplate($a_tpl);
693
694 // render rows
695 $count = 0;
696 for ($i = $tbl->getOffset(); $i < count($data) && $i < $tbl->getOffset() + $tbl->getLimit(); $i++) {
697 $row = $data[$i];
698
699 // build columns
700 foreach ($header_vars as $key) {
701 switch ($key) {
702 case 'login':
703 //build link
704 $this->ctrl->setParameterByClass("ilobjusergui", "ref_id", "7");
705 $this->ctrl->setParameterByClass("ilobjusergui", "obj_id", $row["usr_id"]);
706 $link = $this->ctrl->getLinkTargetByClass("ilobjusergui", "view");
707 $tbl_content_cell = '<a href="' . $link . '">' . htmlspecialchars($row[$key]) . '</a>';
708 break;
709 case 'disk_quota':
710 if ($row['role_id'] == SYSTEM_ROLE_ID) {
711 $tbl_content_cell = "<span class=\"smallgreen\">" . $lng->txt('access_unlimited') . '</span>';
712 } else {
713 $tbl_content_cell = ilUtil::formatSize($row[$key], 'short');
714 }
715 break;
716 case 'disk_usage':
717 if ($row['last_update'] == null) {
718 $tbl_content_cell = $lng->txt('unknown');
719 } else {
720 if ($row['disk_usage'] > $row['disk_quota']) {
721 $tbl_content_cell = "<span class=\"smallred\">" . ilUtil::formatSize($row[$key], 'short') . '</span>';
722 } else {
723 $tbl_content_cell = ilUtil::formatSize($row[$key], 'short');
724 }
725 }
726 break;
727 case 'access_until':
728 if (!$row['active']) {
729 $tbl_content_cell = "<span class=\"smallred\">" . $lng->txt('inactive') . '</span>';
730 } else {
731 if ($row['time_limit_unlimited']) {
732 $tbl_content_cell = "<span class=\"smallgreen\">" . $lng->txt('access_unlimited') . '</span>';
733 } else {
734 if ($row['expired']) {
735 $tbl_content_cell = "<span class=\"smallred\">" . $lng->txt('access_expired') . '</span>';
736 } else {
738 }
739 }
740 }
741 break;
742 case 'last_login':
743 case 'last_reminder':
744 if ($row[$key] == null) {
745 $tbl_content_cell = $lng->txt('no_date');
746 } else {
748 }
749 break;
750 default:
751 $tbl_content_cell = htmlspecialchars($row[$key]);
752 }
753
754 $tbl->getTemplateObject()->setCurrentBlock("tbl_content_cell");
755 $tbl->getTemplateObject()->setVariable("TBL_CONTENT_CELL", $tbl_content_cell);
756
757 $tbl->getTemplateObject()->parseCurrentBlock();
758 }
759
760 $tbl->getTemplateObject()->setCurrentBlock("tbl_content_row");
761 $rowcolor = ilUtil::switchColor($count, "tblrow1", "tblrow2");
762 $tbl->getTemplateObject()->setVariable("ROWCOLOR", $rowcolor);
763 $tbl->getTemplateObject()->parseCurrentBlock();
764
765 $count++;
766 }
767 $tbl->render();
768
769 // Add table to page
770 $this->tpl->setVariable("USER_TABLE", $a_tpl->get());
771 }
772
773
774 protected function initDiskQuotaMailTemplateForm()
775 {
776 global $DIC;
777 $lng = $DIC['lng'];
778
779 $lng->loadLanguageModule("meta");
780 $lng->loadLanguageModule("mail");
781
782 include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
783 $form = new ilPropertyFormGUI();
784 $form->setFormAction($this->ctrl->getFormAction($this));
785
786 $form->setTitle($lng->txt("disk_quota_reminder_mail"));
787 $form->setDescription($lng->txt("disk_quota_reminder_mail_desc"));
788
789 foreach ($lng->getInstalledLanguages() as $lang_key) {
790 $lang_def = ($lang_key == $lng->getDefaultLanguage()) ? " (" . $lng->txt("default") . ")" : "";
791
792 $sec = new ilFormSectionHeaderGUI();
793 $sec->setTitle($lng->txt("meta_l_" . $lang_key) . $lang_def);
794 $form->addItem($sec);
795
796 $subj = new ilTextInputGUI($lng->txt("subject"), "subject_" . $lang_key);
797 $subj->setRequired(true);
798 $form->addItem($subj);
799
800 $sal_g = new ilTextInputGUI($lng->txt("mail_salutation_general"), "sal_g_" . $lang_key);
801 $sal_g->setRequired(true);
802 $form->addItem($sal_g);
803
804 $sal_f = new ilTextInputGUI($lng->txt("mail_salutation_female"), "sal_f_" . $lang_key);
805 $sal_f->setRequired(true);
806 $form->addItem($sal_f);
807
808 $sal_m = new ilTextInputGUI($lng->txt("mail_salutation_male"), "sal_m_" . $lang_key);
809 $sal_m->setRequired(true);
810 $form->addItem($sal_m);
811
812 $body = new ilTextAreaInputGUI($lng->txt("message_content"), "body_" . $lang_key);
813 $body->setRequired(true);
814 $body->setRows(10);
815 $form->addItem($body);
816
817 // current values
819 $subj->setValue($amail["subject"]);
820 $sal_g->setValue($amail["sal_g"]);
821 $sal_f->setValue($amail["sal_f"]);
822 $sal_m->setValue($amail["sal_m"]);
823 $body->setValue($amail["body"]);
824 }
825
826 $form->addCommandButton("saveDiskQuotaMailTemplate", $lng->txt("save"));
827 $form->addCommandButton("editDiskQuotaSettings", $lng->txt("cancel"));
828
829 return $form;
830 }
831
832
836 public function editDiskQuotaMailTemplate(ilPropertyFormGUI $a_form = null)
837 {
838 global $DIC;
839 $rbacsystem = $DIC['rbacsystem'];
840 $ilErr = $DIC['ilErr'];
841 $lng = $DIC['lng'];
842
843 if (!$rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
844 $ilErr->raiseError($lng->txt("no_permission"), $ilErr->WARNING);
845 }
846
847 $this->tabs_gui->setTabActive("disk_quota");
848 $this->addDiskQuotaSubtabs("disk_quota_reminder_mail");
849
850 if (!$a_form) {
851 $a_form = $this->initDiskQuotaMailTemplateForm();
852 }
853
854 $tpl = new ilTemplate("tpl.disk_quota_reminder_mail.html", true, true, "Services/WebDAV");
855 $tpl->setVariable("TXT_USE_PLACEHOLDERS", $lng->txt("mail_nacc_use_placeholder"));
856 $tpl->setVariable("TXT_MAIL_SALUTATION", $lng->txt("mail_nacc_salutation"));
857 $tpl->setVariable("TXT_FIRST_NAME", $lng->txt("firstname"));
858 $tpl->setVariable("TXT_LAST_NAME", $lng->txt("lastname"));
859 $tpl->setVariable("TXT_EMAIL", $lng->txt("email"));
860 $tpl->setVariable("TXT_LOGIN", $lng->txt("mail_nacc_login"));
861 $tpl->setVariable("TXT_DISK_QUOTA", $lng->txt("disk_quota"));
862 $tpl->setVariable("TXT_DISK_USAGE", $lng->txt("disk_usage"));
863 $tpl->setVariable("TXT_DISK_USAGE_DETAILS", $lng->txt("disk_usage_details"));
864 $tpl->setVariable("TXT_ADMIN_MAIL", $lng->txt("mail_nacc_admin_mail"));
865 $tpl->setVariable("TXT_ILIAS_URL", $lng->txt("mail_nacc_ilias_url"));
866 $tpl->setVariable("TXT_CLIENT_NAME", $lng->txt("mail_nacc_client_name"));
867
868 include_once "Services/UIComponent/Panel/classes/class.ilPanelGUI.php";
871 $legend->setHeading($lng->txt("mail_nacc_use_placeholder"));
872 $legend->setBody($tpl->get());
873
874 $this->tpl->setContent($a_form->getHTML() . $legend->getHTML());
875 }
876
877
879 {
880 global $DIC;
881 $lng = $DIC['lng'];
882
884 if ($form->checkInput()) {
885 foreach ($lng->getInstalledLanguages() as $lang_key) {
886 $this->disk_quota_obj->_writeReminderMailTemplate(
887 $lang_key,
888 $form->getInput("subject_" . $lang_key),
889 $form->getInput("sal_g_" . $lang_key),
890 $form->getInput("sal_f_" . $lang_key),
891 $form->getInput("sal_m_" . $lang_key),
892 $form->getInput("body_" . $lang_key)
893 );
894 }
895
896 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
897 $this->ctrl->redirect($this, "editDiskQuotaMailTemplate");
898 }
899
900 $form->setValuesByPost();
902 }
903
904
908 private function initUploadSettingsForm()
909 {
910 global $DIC;
911 $ilCtrl = $DIC['ilCtrl'];
912 $lng = $DIC['lng'];
913
914 require_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
915 $form = new ilPropertyFormGUI();
916 $form->setFormAction($ilCtrl->getFormAction($this));
917 $form->setTitle($lng->txt("settings"));
918
919 require_once("Services/FileUpload/classes/class.ilFileUploadSettings.php");
920
921 // drag and drop file upload
922 $chk_enabled = new ilCheckboxInputGUI($lng->txt("enable_dnd_upload"), "enable_dnd_upload");
923 $chk_enabled->setValue('1');
924 $chk_enabled->setChecked(ilFileUploadSettings::isDragAndDropUploadEnabled());
925 $chk_enabled->setInfo($lng->txt('enable_dnd_upload_info'));
926 $form->addItem($chk_enabled);
927
928 // drag and drop file upload in repository
929 $chk_repo = new ilCheckboxInputGUI($lng->txt("enable_repository_dnd_upload"), "enable_repository_dnd_upload");
930 $chk_repo->setValue('1');
932 $chk_repo->setInfo($lng->txt('enable_repository_dnd_upload_info'));
933 $chk_enabled->addSubItem($chk_repo);
934
935 // concurrent uploads
936 $num_prop = new ilNumberInputGUI($lng->txt("concurrent_uploads"), "concurrent_uploads");
937 $num_prop->setDecimals(0);
938 $num_prop->setMinValue(1);
939 $num_prop->setMinvalueShouldBeGreater(false);
940 $num_prop->setMaxValue(ilFileUploadSettings::CONCURRENT_UPLOADS_MAX);
941 $num_prop->setMaxvalueShouldBeLess(false);
942 $num_prop->setMaxLength(5);
943 $num_prop->setSize(10);
944 $num_prop->setValue(ilFileUploadSettings::getConcurrentUploads());
945 $num_prop->setInfo($lng->txt('concurrent_uploads_info'));
946 $chk_enabled->addSubItem($num_prop);
947
948 include_once("./Services/Utilities/classes/class.ilFileUtils.php");
949
950 // default white list
951 $ne = new ilNonEditableValueGUI($this->lng->txt("file_suffix_default_white"), "");
952 $ne->setValue(implode(", ", ilFileUtils::getDefaultValidExtensionWhiteList()));
953 $ne->setInfo($this->lng->txt("file_suffix_default_white_info"));
954 $form->addItem($ne);
955
956 // file suffix custom black list
957 $ta = new ilTextAreaInputGUI($this->lng->txt("file_suffix_custom_black"), "suffix_repl_additional");
958 $ta->setInfo($this->lng->txt("file_suffix_custom_black_info"));
959 $ta->setRows(5);
960 $form->addItem($ta);
961
962 // file suffix custom white list
963 $ta = new ilTextAreaInputGUI($this->lng->txt("file_suffix_custom_white"), "suffix_custom_white_list");
964 $ta->setInfo($this->lng->txt("file_suffix_custom_white_info"));
965 $ta->setRows(5);
966 $form->addItem($ta);
967
968 // resulting overall white list
969 $ne = new ilNonEditableValueGUI($this->lng->txt("file_suffix_overall_white"), "");
970 $ne->setValue(implode(", ", ilFileUtils::getValidExtensions()));
971 $ne->setInfo($this->lng->txt("file_suffix_overall_white_info"));
972 $form->addItem($ne);
973
974 // command buttons
975 $form->addCommandButton('saveUploadSettings', $lng->txt('save'));
976 $form->addCommandButton('view', $lng->txt('cancel'));
977
978 return $form;
979 }
980
981
985 public function editUploadSettings()
986 {
987 global $DIC;
988 $rbacsystem = $DIC['rbacsystem'];
989 $ilErr = $DIC['ilErr'];
990 $tpl = $DIC['tpl'];
991 $lng = $DIC['lng'];
992 $ilSetting = $DIC['ilSetting'];
993
994 $this->tabs_gui->setTabActive('upload_settings');
995
996 if (!$rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
997 $ilErr->raiseError($lng->txt("no_permission"), $ilErr->WARNING);
998 }
999
1000 // get form
1001 $form = $this->initUploadSettingsForm();
1002
1003 require_once("Services/FileUpload/classes/class.ilFileUploadSettings.php");
1004
1005 // set current values
1006 $val = array();
1007 $val["enable_dnd_upload"] = ilFileUploadSettings::isDragAndDropUploadEnabled();
1008 $val["enable_repository_dnd_upload"] = ilFileUploadSettings::isRepositoryDragAndDropUploadEnabled();
1009 $val["concurrent_uploads"] = ilFileUploadSettings::getConcurrentUploads();
1010 $val["suffix_repl_additional"] = $ilSetting->get("suffix_repl_additional");
1011 $val["suffix_custom_white_list"] = $ilSetting->get("suffix_custom_white_list");
1012 $form->setValuesByArray($val);
1013
1014 // set content
1015 $tpl->setContent($form->getHTML());
1016 }
1017
1018
1022 public function saveUploadSettings()
1023 {
1024 global $DIC;
1025 $rbacsystem = $DIC['rbacsystem'];
1026 $ilErr = $DIC['ilErr'];
1027 $ilCtrl = $DIC['ilCtrl'];
1028 $lng = $DIC['lng'];
1029 $tpl = $DIC['tpl'];
1030 $ilSetting = $DIC['ilSetting'];
1031
1032 if (!$rbacsystem->checkAccess("write", $this->object->getRefId())) {
1033 $ilErr->raiseError($lng->txt("no_permission"), $ilErr->WARNING);
1034 }
1035
1036 // get form
1037 $form = $this->initUploadSettingsForm();
1038 if ($form->checkInput()) {
1039 require_once("Services/FileUpload/classes/class.ilFileUploadSettings.php");
1041 ilFileUploadSettings::setRepositoryDragAndDropUploadEnabled($_POST["enable_repository_dnd_upload"] == 1);
1043
1044 // file suffic replacements
1045 $ilSetting->set("suffix_repl_additional", $_POST["suffix_repl_additional"]);
1046 $ilSetting->set("suffix_custom_white_list", $_POST["suffix_custom_white_list"]);
1047
1048 ilUtil::sendSuccess($lng->txt('settings_saved'), true);
1049 $ilCtrl->redirect($this, "editUploadSettings");
1050 } else {
1051 $form->setValuesByPost();
1052 $tpl->setContent($form->getHTML());
1053 }
1054 }
1055
1056
1060 private function initPreviewSettingsForm()
1061 {
1062 global $DIC;
1063 $ilCtrl = $DIC['ilCtrl'];
1064 $lng = $DIC['lng'];
1065
1066 require_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
1067 $form = new ilPropertyFormGUI();
1068 $form->setFormAction($ilCtrl->getFormAction($this));
1069 $form->setTitle($lng->txt("settings"));
1070
1071 require_once("Services/Preview/classes/class.ilPreviewSettings.php");
1072
1073 // drag and drop file upload in repository
1074 $chk_prop = new ilCheckboxInputGUI($lng->txt("enable_preview"), "enable_preview");
1075 $chk_prop->setValue('1');
1076 $chk_prop->setChecked(ilPreviewSettings::isPreviewEnabled());
1077 $chk_prop->setInfo($lng->txt('enable_preview_info'));
1078 $form->addItem($chk_prop);
1079
1080 $num_prop = new ilNumberInputGUI($lng->txt("max_previews_per_object"), "max_previews_per_object");
1081 $num_prop->setDecimals(0);
1082 $num_prop->setMinValue(1);
1083 $num_prop->setMinvalueShouldBeGreater(false);
1084 $num_prop->setMaxValue(ilPreviewSettings::MAX_PREVIEWS_MAX);
1085 $num_prop->setMaxvalueShouldBeLess(false);
1086 $num_prop->setMaxLength(5);
1087 $num_prop->setSize(10);
1088 $num_prop->setValue(ilPreviewSettings::getMaximumPreviews());
1089 $num_prop->setInfo($lng->txt('max_previews_per_object_info'));
1090 $form->addItem($num_prop);
1091
1092 // command buttons
1093 $form->addCommandButton('savePreviewSettings', $lng->txt('save'));
1094 $form->addCommandButton('view', $lng->txt('cancel'));
1095
1096 return $form;
1097 }
1098
1099
1103 public function editPreviewSettings()
1104 {
1105 global $DIC;
1106 $rbacsystem = $DIC['rbacsystem'];
1107 $ilErr = $DIC['ilErr'];
1108 $tpl = $DIC['tpl'];
1109 $lng = $DIC['lng'];
1110
1111 $this->tabs_gui->setTabActive('preview_settings');
1112
1113 if (!$rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
1114 $ilErr->raiseError($lng->txt("no_permission"), $ilErr->WARNING);
1115 }
1116
1117 // set warning if ghostscript not installed
1118 include_once("./Services/Preview/classes/class.ilGhostscriptRenderer.php");
1120 ilUtil::sendInfo($lng->txt("ghostscript_not_configured"));
1121 }
1122
1123 // get form
1124 $form = $this->initPreviewSettingsForm();
1125
1126 // set current values
1127 require_once("Services/Preview/classes/class.ilPreviewSettings.php");
1128
1129 $val = array();
1130 $val["enable_preview"] = ilPreviewSettings::isPreviewEnabled();
1131 $val["max_previews_per_object"] = ilPreviewSettings::getMaximumPreviews();
1132 $form->setValuesByArray($val);
1133
1134 $html = $form->getHTML();
1135
1136 // build renderer HTML
1137 require_once("Services/Preview/classes/class.ilRendererFactory.php");
1138 require_once("Services/Preview/classes/class.ilRendererTableGUI.php");
1139
1140 $renderers = ilRendererFactory::getRenderers();
1141
1142 $table = new ilRendererTableGUI($this, array("editPreviewSettings", "view"));
1143 $table->setMaxCount(sizeof($renderers));
1144 $table->setData($renderers);
1145
1146 $html .= "<br/>" . $table->getHTML();
1147
1148 // set content
1149 $tpl->setContent($html);
1150 }
1151
1152
1156 public function savePreviewSettings()
1157 {
1158 global $DIC;
1159 $rbacsystem = $DIC['rbacsystem'];
1160 $ilErr = $DIC['ilErr'];
1161 $ilCtrl = $DIC['ilCtrl'];
1162 $tpl = $DIC['tpl'];
1163 $lng = $DIC['lng'];
1164
1165 $this->tabs_gui->setTabActive('preview_settings');
1166
1167 if (!$rbacsystem->checkAccess("write", $this->object->getRefId())) {
1168 $ilErr->raiseError($lng->txt("no_permission"), $ilErr->WARNING);
1169 }
1170
1171 // get form
1172 $form = $this->initPreviewSettingsForm();
1173 if ($form->checkInput()) {
1174 require_once("Services/Preview/classes/class.ilPreviewSettings.php");
1175 ilPreviewSettings::setPreviewEnabled($_POST["enable_preview"] == 1);
1176 ilPreviewSettings::setMaximumPreviews($_POST["max_previews_per_object"]);
1177
1178 ilUtil::sendSuccess($lng->txt('settings_saved'), true);
1179 $ilCtrl->redirect($this, "editPreviewSettings");
1180 } else {
1181 $form->setValuesByPost();
1182 $tpl->setContent($form->getHTML());
1183 }
1184 }
1185
1186
1187 public function addToExternalSettingsForm($a_form_id)
1188 {
1189 global $DIC;
1190 $ilSetting = $DIC['ilSetting'];
1191
1192 switch ($a_form_id) {
1194
1195 $fields = array('file_suffix_repl' => $ilSetting->get("suffix_repl_additional"));
1196
1197 return array(array("editUploadSettings", $fields));
1198 }
1199 }
1200}
$_GET["client_id"]
$_POST["username"]
$_SESSION["AccountId"]
An exception for terminatinating execution or to throw for unit testing.
const IL_CAL_DATETIME
static addFieldsToForm($a_form_id, ilPropertyFormGUI $a_form, ilObjectGUI $a_parent_gui)
This class represents a checkbox property in a property form.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date @access public.
@classDescription Date and time handling
static _lookupDiskUsageReportLastUpdate()
Returns the SQL datetime of the last update of the disk usage report.
static _fetchDiskQuotaReport($a_usage_filter=3, $a_access_filter=1, $a_order_column='disk_usage', $a_order_by='desc')
Reads disk quota/disk usage report of the user accounts.
File manager settings.
static setRepositoryDragAndDropUploadEnabled($newValue)
Sets whether drag and drop file upload in the repository is enabled.
static isRepositoryDragAndDropUploadEnabled()
Gets whether drag and drop file upload in the repository is enabled.
static isDragAndDropUploadEnabled()
Gets whether drag and drop file upload is enabled.
static setConcurrentUploads($newValue)
Sets the number of files that can be uploaded at the same time.
static setDragAndDropUploadEnabled($newValue)
Sets whether drag and drop file upload is enabled.
static getConcurrentUploads()
Gets the number of files that can be uploaded at the same time.
static getDefaultValidExtensionWhiteList()
Valid extensions.
static getValidExtensions()
Valid extensions.
This class represents a section header in a property form.
static isGhostscriptInstalled()
Determines whether Ghostscript is installed.
This class represents a non editable value in a property form.
This class represents a number property in a property form.
static _lookupReminderMailTemplate($a_lang)
Looks up the mail template for the specified language.
addDiskQuotaSubtabs($a_active_subtab)
Add disk quota subtabs.
setTitleAndDescription()
called by prepare output
initPreviewSettingsForm()
Initializes the preview settings form.
initUploadSettingsForm()
Initializes the upload settings form.
editDownloadingSettings(ilPropertyFormGUI $a_form=null)
Edit settings.
saveDiskQuotaSettings()
Save disk quota settings.
editDiskQuotaSettings()
Edit disk quota settings.
viewDiskQuotaReport()
The disk quota report list shows user accounts, their disk quota and their disk usage,...
editDiskQuotaMailTemplate(ilPropertyFormGUI $a_form=null)
Edit disk quota settings.
__construct($a_data, $a_id, $a_call_by_reference)
Constructor.
Class ilObjectGUI Basic methods of all Output classes.
prepareOutput($a_show_subobjects=true)
prepare output
const HEADING_STYLE_BLOCK
static getInstance()
Get instance.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static isPreviewEnabled()
Gets whether the preview functionality is enabled.
static setMaximumPreviews($a_value)
Sets the maximum number of preview pictures per object.
static getMaximumPreviews()
Gets the maximum number of preview pictures per object.
static setPreviewEnabled($a_value)
Sets whether the preview functionality is enabled.
This class represents a property form user interface.
This class represents a property in a property form.
This class represents an option in a radio group.
static getRenderers()
Gets an array containing all available preview renderers.
Displays an overview of all loaded preview renderers.
ILIAS Setting Class.
Class ilTableGUI.
special template class to simplify handling of ITX/PEAR
This class represents a text area property in a property form.
This class represents a text property in a property form.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static _getHttpPath()
static switchColor($a_num, $a_css1, $a_css2)
switches style sheets for each even $a_num (used for changing colors of different result rows)
static formatSize($size, $a_mode='short', $a_lng=null)
Returns the specified file size value in a human friendly form.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static formSelect( $selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
$key
Definition: croninfo.php:18
$i
Definition: disco.tpl.php:19
$html
Definition: example_001.php:87
$tbl
Definition: example_048.php:81
$legend
global $ilCtrl
Definition: ilias.php:18
$row
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
$ret
Definition: parser.php:6
global $ilSetting
Definition: privfeed.php:17
if(empty($password)) $table
Definition: pwgen.php:24
if(isset($_POST['submit'])) $form
global $DIC
Definition: saml.php:7