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

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference)
 Constructor @access public. More...
 
 executeCommand ()
 Execute command. More...
 
 getAdminTabs ()
 Get tabs. More...
 
 editDownloadingSettings (ilPropertyFormGUI $a_form=null)
 Edit settings. More...
 
 saveDownloadingSettings ()
 Save settings. More...
 
 editWebDAVSettings ()
 Edit settings. More...
 
 saveWebDAVSettings ()
 Save settings. More...
 
 setTitleAndDescription ()
 called by prepare output More...
 
 addDiskQuotaSubtabs ($a_active_subtab)
 Add disk quota subtabs. More...
 
 editDiskQuotaSettings ()
 Edit disk quota settings. More...
 
 saveDiskQuotaSettings ()
 Save disk quota settings. More...
 
 viewDiskQuotaReport ()
 
 editDiskQuotaMailTemplate (ilPropertyFormGUI $a_form=null)
 Edit disk quota settings. More...
 
 saveDiskQuotaMailTemplate ()
 
 editUploadSettings ()
 Edit upload settings. More...
 
 saveUploadSettings ()
 Save upload settings. More...
 
 editPreviewSettings ()
 Edit preview settings. More...
 
 savePreviewSettings ()
 Save preview settings. More...
 
 addToExternalSettingsForm ($a_form_id)
 
- 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...
 

Protected Member Functions

 initDownloadingSettingsForm ()
 Edit settings. More...
 
 initDiskQuotaMailTemplateForm ()
 
- 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...
 

Private Member Functions

 initUploadSettingsForm ()
 Initializes the upload settings form. More...
 
 initPreviewSettingsForm ()
 Initializes the preview settings form. More...
 

Private Attributes

 $disk_quota_obj
 

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...
 
- 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 Attributes inherited from ilObjectGUI
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilObjFileAccessSettingsGUI::__construct (   $a_data,
  $a_id,
  $a_call_by_reference 
)

Constructor @access public.

Definition at line 47 of file class.ilObjFileAccessSettingsGUI.php.

48 {
49 global $DIC;
50 $tree = $DIC['tree'];
51
52 $this->type = "facs";
53 parent::__construct($a_data,$a_id,$a_call_by_reference, false);
54 $this->folderSettings = new ilSetting('fold');
55
56 // Load the disk quota settings object
57 require_once 'Services/WebDAV/classes/class.ilObjDiskQuotaSettings.php';
58 $this->disk_quota_obj = new ilObjDiskQuotaSettings($a_id, $a_call_by_reference);
59 $this->disk_quota_obj->read();
60 }
ILIAS Setting Class.
global $DIC

References $DIC, and ilObjectGUI\$tree.

Member Function Documentation

◆ addDiskQuotaSubtabs()

ilObjFileAccessSettingsGUI::addDiskQuotaSubtabs (   $a_active_subtab)

Add disk quota subtabs.

Definition at line 428 of file class.ilObjFileAccessSettingsGUI.php.

429 {
430 global $DIC;
431 $ilCtrl = $DIC['ilCtrl'];
432 $ilTabs = $DIC['ilTabs'];
433
434 include_once("./Services/COPage/classes/class.ilPageEditorSettings.php");
435
436 $ilTabs->addSubTabTarget("settings",
437 $ilCtrl->getLinkTarget($this, "editDiskQuotaSettings"),
438 array("editDiskQuotaSettings"));
439
440 require_once 'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
442 {
443 $ilTabs->addSubTabTarget("disk_quota_report",
444 $ilCtrl->getLinkTarget($this, "viewDiskQuotaReport"),
445 array("viewDiskQuotaReport"));
446 }
447
448 $ilTabs->addSubTabTarget("disk_quota_reminder_mail",
449 $ilCtrl->getLinkTarget($this, "editDiskQuotaMailTemplate"),
450 array("editDiskQuotaMailTemplate"));
451
452 $ilTabs->setSubTabActive($a_active_subtab);
453 }
global $ilCtrl
Definition: ilias.php:18

References $DIC, $ilCtrl, and ilDiskQuotaActivationChecker\_isActive().

Referenced by editDiskQuotaMailTemplate(), editDiskQuotaSettings(), and viewDiskQuotaReport().

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

◆ addToExternalSettingsForm()

ilObjFileAccessSettingsGUI::addToExternalSettingsForm (   $a_form_id)

Definition at line 1183 of file class.ilObjFileAccessSettingsGUI.php.

1184 {
1185 global $DIC;
1186 $ilSetting = $DIC['ilSetting'];
1187
1188 switch($a_form_id)
1189 {
1191
1192 $fields = array('file_suffix_repl' => $ilSetting->get("suffix_repl_additional"));
1193
1194 return array(array("editUploadSettings", $fields));
1195 }
1196 }
global $ilSetting
Definition: privfeed.php:17

References $DIC, $ilSetting, and ilAdministrationSettingsFormHandler\FORM_SECURITY.

◆ editDiskQuotaMailTemplate()

ilObjFileAccessSettingsGUI::editDiskQuotaMailTemplate ( ilPropertyFormGUI  $a_form = null)

Edit disk quota settings.

Definition at line 825 of file class.ilObjFileAccessSettingsGUI.php.

826 {
827 global $DIC;
828 $rbacsystem = $DIC['rbacsystem'];
829 $ilErr = $DIC['ilErr'];
830 $lng = $DIC['lng'];
831
832 if (! $rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
833 {
834 $ilErr->raiseError($lng->txt("no_permission"),$ilErr->WARNING);
835 }
836
837 $this->tabs_gui->setTabActive("disk_quota");
838 $this->addDiskQuotaSubtabs("disk_quota_reminder_mail");
839
840 if(!$a_form)
841 {
842 $a_form = $this->initDiskQuotaMailTemplateForm();
843 }
844
845 $tpl = new ilTemplate("tpl.disk_quota_reminder_mail.html", true, true, "Services/WebDAV");
846 $tpl->setVariable("TXT_USE_PLACEHOLDERS", $lng->txt("mail_nacc_use_placeholder"));
847 $tpl->setVariable("TXT_MAIL_SALUTATION", $lng->txt("mail_nacc_salutation"));
848 $tpl->setVariable("TXT_FIRST_NAME", $lng->txt("firstname"));
849 $tpl->setVariable("TXT_LAST_NAME", $lng->txt("lastname"));
850 $tpl->setVariable("TXT_EMAIL", $lng->txt("email"));
851 $tpl->setVariable("TXT_LOGIN", $lng->txt("mail_nacc_login"));
852 $tpl->setVariable("TXT_DISK_QUOTA", $lng->txt("disk_quota"));
853 $tpl->setVariable("TXT_DISK_USAGE", $lng->txt("disk_usage"));
854 $tpl->setVariable("TXT_DISK_USAGE_DETAILS", $lng->txt("disk_usage_details"));
855 $tpl->setVariable("TXT_ADMIN_MAIL", $lng->txt("mail_nacc_admin_mail"));
856 $tpl->setVariable("TXT_ILIAS_URL", $lng->txt("mail_nacc_ilias_url"));
857 $tpl->setVariable("TXT_CLIENT_NAME", $lng->txt("mail_nacc_client_name"));
858
859 include_once "Services/UIComponent/Panel/classes/class.ilPanelGUI.php";
862 $legend->setHeading($lng->txt("mail_nacc_use_placeholder"));
863 $legend->setBody($tpl->get());
864
865 $this->tpl->setContent($a_form->getHTML().$legend->getHTML());
866 }
addDiskQuotaSubtabs($a_active_subtab)
Add disk quota subtabs.
const HEADING_STYLE_BLOCK
static getInstance()
Get instance.
special template class to simplify handling of ITX/PEAR
global $ilErr
Definition: raiseError.php:16

References $DIC, $ilErr, $legend, ilObjectGUI\$lng, ilObjectGUI\$tpl, addDiskQuotaSubtabs(), ilPanelGUI\getInstance(), ilPanelGUI\HEADING_STYLE_BLOCK, and initDiskQuotaMailTemplateForm().

Referenced by saveDiskQuotaMailTemplate().

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

◆ editDiskQuotaSettings()

ilObjFileAccessSettingsGUI::editDiskQuotaSettings ( )

Edit disk quota settings.

Definition at line 459 of file class.ilObjFileAccessSettingsGUI.php.

460 {
461 global $DIC;
462 $rbacsystem = $DIC['rbacsystem'];
463 $ilErr = $DIC['ilErr'];
464 $ilSetting = $DIC['ilSetting'];
465 $tpl = $DIC['tpl'];
466 $lng = $DIC['lng'];
467 $ilCtrl = $DIC['ilCtrl'];
468
469
470 if (! $rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
471 {
472 $ilErr->raiseError($lng->txt("no_permission"),$ilErr->WARNING);
473 }
474
475 $this->tabs_gui->setTabActive('disk_quota');
476 $this->addDiskQuotaSubtabs('settings');
477
478 require_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
479 require_once("./Services/Form/classes/class.ilCheckboxInputGUI.php");
480 require_once("./Services/Form/classes/class.ilRadioGroupInputGUI.php");
481 require_once("./Services/Form/classes/class.ilRadioOption.php");
482 require_once("./Services/Form/classes/class.ilTextAreaInputGUI.php");
483 require_once("./Services/WebDAV/classes/class.ilDAVServer.php");
484
485 $lng->loadLanguageModule("file");
486
487 $form = new ilPropertyFormGUI();
488 $form->setFormAction($ilCtrl->getFormAction($this));
489 $form->setTitle($lng->txt("settings"));
490
491 include_once "Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php";
494 $form,
495 $this
496 );
497
498 /*
499 // command buttons
500 $form->addCommandButton('saveDiskQuotaSettings', $lng->txt('save'));
501 $form->addCommandButton('editDiskQuotaSettings', $lng->txt('cancel'));
502 */
503
504 $tpl->setContent($form->getHTML());
505 }
static addFieldsToForm($a_form_id, ilPropertyFormGUI $a_form, ilObjectGUI $a_parent_gui)
This class represents a property form user interface.

References $DIC, $ilCtrl, $ilErr, $ilSetting, ilObjectGUI\$lng, ilObjectGUI\$tpl, addDiskQuotaSubtabs(), ilAdministrationSettingsFormHandler\addFieldsToForm(), and ilAdministrationSettingsFormHandler\FORM_FILES_QUOTA.

+ Here is the call graph for this function:

◆ editDownloadingSettings()

ilObjFileAccessSettingsGUI::editDownloadingSettings ( ilPropertyFormGUI  $a_form = null)

Edit settings.

Definition at line 268 of file class.ilObjFileAccessSettingsGUI.php.

269 {
270 global $rbacsystem, $ilErr, $tpl, $lng;
271
272 $this->tabs_gui->setTabActive('downloading_settings');
273
274 if (! $rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
275 {
276 $ilErr->raiseError($lng->txt("no_permission"),$ilErr->WARNING);
277 }
278
279 if(!$a_form)
280 {
281 $a_form = $this->initDownloadingSettingsForm();
282 }
283
284 $tpl->setContent($a_form->getHTML());
285 }

References $ilErr, ilObjectGUI\$lng, ilObjectGUI\$tpl, and initDownloadingSettingsForm().

Referenced by saveDownloadingSettings().

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

◆ editPreviewSettings()

ilObjFileAccessSettingsGUI::editPreviewSettings ( )

Edit preview settings.

Definition at line 1095 of file class.ilObjFileAccessSettingsGUI.php.

1096 {
1097 global $DIC;
1098 $rbacsystem = $DIC['rbacsystem'];
1099 $ilErr = $DIC['ilErr'];
1100 $tpl = $DIC['tpl'];
1101 $lng = $DIC['lng'];
1102
1103 $this->tabs_gui->setTabActive('preview_settings');
1104
1105 if (!$rbacsystem->checkAccess("visible,read", $this->object->getRefId()))
1106 {
1107 $ilErr->raiseError($lng->txt("no_permission"),$ilErr->WARNING);
1108 }
1109
1110 // set warning if ghostscript not installed
1111 include_once("./Services/Preview/classes/class.ilGhostscriptRenderer.php");
1113 {
1114 ilUtil::sendInfo($lng->txt("ghostscript_not_configured"));
1115 }
1116
1117 // get form
1118 $form = $this->initPreviewSettingsForm();
1119
1120 // set current values
1121 require_once("Services/Preview/classes/class.ilPreviewSettings.php");
1122
1123 $val = array();
1124 $val["enable_preview"] = ilPreviewSettings::isPreviewEnabled();
1125 $val["max_previews_per_object"] = ilPreviewSettings::getMaximumPreviews();
1126 $form->setValuesByArray($val);
1127
1128 $html = $form->getHTML();
1129
1130 // build renderer HTML
1131 require_once("Services/Preview/classes/class.ilRendererFactory.php");
1132 require_once("Services/Preview/classes/class.ilRendererTableGUI.php");
1133
1134 $renderers = ilRendererFactory::getRenderers();
1135
1136 $table = new ilRendererTableGUI($this, array("editPreviewSettings", "view"));
1137 $table->setMaxCount(sizeof($renderers));
1138 $table->setData($renderers);
1139
1140 $html .= "<br/>" . $table->getHTML();
1141
1142 // set content
1143 $tpl->setContent($html);
1144 }
static isGhostscriptInstalled()
Determines whether Ghostscript is installed.
initPreviewSettingsForm()
Initializes the preview settings form.
static isPreviewEnabled()
Gets whether the preview functionality is enabled.
static getMaximumPreviews()
Gets the maximum number of preview pictures per object.
static getRenderers()
Gets an array containing all available preview renderers.
Displays an overview of all loaded preview renderers.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
$html
Definition: example_001.php:87

References $DIC, $html, $ilErr, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilPreviewSettings\getMaximumPreviews(), ilRendererFactory\getRenderers(), initPreviewSettingsForm(), ilGhostscriptRenderer\isGhostscriptInstalled(), ilPreviewSettings\isPreviewEnabled(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ editUploadSettings()

ilObjFileAccessSettingsGUI::editUploadSettings ( )

Edit upload settings.

Definition at line 975 of file class.ilObjFileAccessSettingsGUI.php.

976 {
977 global $DIC;
978 $rbacsystem = $DIC['rbacsystem'];
979 $ilErr = $DIC['ilErr'];
980 $tpl = $DIC['tpl'];
981 $lng = $DIC['lng'];
982 $ilSetting = $DIC['ilSetting'];
983
984 $this->tabs_gui->setTabActive('upload_settings');
985
986 if (!$rbacsystem->checkAccess("visible,read", $this->object->getRefId()))
987 {
988 $ilErr->raiseError($lng->txt("no_permission"),$ilErr->WARNING);
989 }
990
991 // get form
992 $form = $this->initUploadSettingsForm();
993
994 require_once("Services/FileUpload/classes/class.ilFileUploadSettings.php");
995
996 // set current values
997 $val = array();
998 $val["enable_dnd_upload"] = ilFileUploadSettings::isDragAndDropUploadEnabled();
999 $val["enable_repository_dnd_upload"] = ilFileUploadSettings::isRepositoryDragAndDropUploadEnabled();
1000 $val["concurrent_uploads"] = ilFileUploadSettings::getConcurrentUploads();
1001 $val["suffix_repl_additional"] = $ilSetting->get("suffix_repl_additional");
1002 $val["suffix_custom_white_list"] = $ilSetting->get("suffix_custom_white_list");
1003 $form->setValuesByArray($val);
1004
1005 // set content
1006 $tpl->setContent($form->getHTML());
1007 }
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 getConcurrentUploads()
Gets the number of files that can be uploaded at the same time.
initUploadSettingsForm()
Initializes the upload settings form.

References $DIC, $ilErr, $ilSetting, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilFileUploadSettings\getConcurrentUploads(), initUploadSettingsForm(), ilFileUploadSettings\isDragAndDropUploadEnabled(), and ilFileUploadSettings\isRepositoryDragAndDropUploadEnabled().

+ Here is the call graph for this function:

◆ editWebDAVSettings()

ilObjFileAccessSettingsGUI::editWebDAVSettings ( )

Edit settings.

Definition at line 332 of file class.ilObjFileAccessSettingsGUI.php.

333 {
334 global $DIC;
335 $rbacsystem = $DIC['rbacsystem'];
336 $ilErr = $DIC['ilErr'];
337 $ilTabs = $DIC['ilTabs'];
338 global $DIC;
339 $tpl = $DIC['tpl'];
340 $ilCtrl = $DIC['ilCtrl'];
341 $lng = $DIC['lng'];
342 $tree = $DIC['tree'];
343
344
345 $this->tabs_gui->setTabActive('webdav');
346
347 if (! $rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
348 {
349 $ilErr->raiseError($lng->txt("no_permission"),$ilErr->WARNING);
350 }
351
352 require_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
353 require_once("./Services/Form/classes/class.ilCheckboxInputGUI.php");
354 require_once("./Services/Form/classes/class.ilRadioGroupInputGUI.php");
355 require_once("./Services/Form/classes/class.ilRadioOption.php");
356 require_once("./Services/Form/classes/class.ilTextAreaInputGUI.php");
357 require_once("./Services/WebDAV/classes/class.ilDAVServer.php");
358
359 $form = new ilPropertyFormGUI();
360 $form->setFormAction($ilCtrl->getFormAction($this));
361 $form->setTitle($lng->txt("settings"));
362
363 // Enable webdav
364 $ilDAVServer = ilDAVServer::getInstance();
365 $cb_prop = new ilCheckboxInputGUI($lng->txt("enable_webdav"), "enable_webdav");
366 $cb_prop->setValue('1');
367 $cb_prop->setChecked($this->object->isWebdavEnabled());
368 $form->addItem($cb_prop);
369
370 $rgi_prop = new ilRadioGroupInputGUI($lng->txt('webfolder_instructions'), 'custom_webfolder_instructions_choice');
371 $rgi_prop->addOption(new ilRadioOption($lng->txt('use_default_instructions'), 'default'));
372 $rgi_prop->addOption(new ilRadioOption($lng->txt('use_customized_instructions'), 'custom'));
373 $rgi_prop->setValue($this->object->isCustomWebfolderInstructionsEnabled() ? 'custom':'default');
374 $form->addItem($rgi_prop);
375 $tai_prop = new ilTextAreaInputGUI('', 'custom_webfolder_instructions');
376 $tai_prop->setValue($this->object->getCustomWebfolderInstructions());
377 $tai_prop->setInfo($lng->txt("webfolder_instructions_info"));
378 $tai_prop->setRows(20);
379 $form->addItem($tai_prop);
380
381 // command buttons
382 $form->addCommandButton('saveWebDAVSettings', $lng->txt('save'));
383 $form->addCommandButton('view', $lng->txt('cancel'));
384
385 $tpl->setContent($form->getHTML());
386 }
This class represents a checkbox property in a property form.
static getInstance()
Get singelton instance.
This class represents a property in a property form.
This class represents an option in a radio group.
This class represents a text area property in a property form.

References $DIC, $ilCtrl, $ilErr, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObjectGUI\$tree, and ilDAVServer\getInstance().

+ Here is the call graph for this function:

◆ executeCommand()

ilObjFileAccessSettingsGUI::executeCommand ( )

Execute command.

@access public

Reimplemented from ilObjectGUI.

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

68 {
69 global $DIC;
70 $ilAccess = $DIC['ilAccess'];
71 $ilias = $DIC['ilias'];
72 $lng = $DIC['lng'];
73
74 $lng->loadLanguageModule("file");
75
76 $next_class = $this->ctrl->getNextClass($this);
77 $cmd = $this->ctrl->getCmd();
78
79 $this->prepareOutput();
80
81 if(!$ilAccess->checkAccess('read','',$this->object->getRefId()))
82 {
83 $ilias->raiseError($lng->txt('no_permission'),$ilias->error_obj->MESSAGE);
84 }
85
86 switch($next_class)
87 {
88 case 'ilpermissiongui':
89 $this->tabs_gui->setTabActive('perm_settings');
90 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
91 $perm_gui = new ilPermissionGUI($this);
92 $ret =& $this->ctrl->forwardCommand($perm_gui);
93 break;
94
95 case 'ilfmsettingsgui':
96 $this->tabs_gui->setTabActive('fm_settings_tab');
97 include_once './Services/WebServices/FileManager/classes/class.ilFMSettingsGUI.php';
98 $fmg = new ilFMSettingsGUI($this);
99 $this->ctrl->forwardCommand($fmg);
100 break;
101
102 default:
103 if(!$cmd || $cmd == 'view')
104 {
105 $cmd = "editDownloadingSettings";
106 }
107
108 $this->$cmd();
109 break;
110 }
111 return true;
112 }
File manager settings.
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, $DIC, ilObjectGUI\$ilias, ilObjectGUI\$lng, $ret, and ilObjectGUI\prepareOutput().

+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjFileAccessSettingsGUI::getAdminTabs ( )

Get tabs.

@access public

Reimplemented from ilObjectGUI.

Definition at line 120 of file class.ilObjFileAccessSettingsGUI.php.

121 {
122 global $DIC;
123 $rbacsystem = $DIC['rbacsystem'];
124 $ilAccess = $DIC['ilAccess'];
125
126 $GLOBALS['DIC']['lng']->loadLanguageModule('fm');
127
128 if ($rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
129 {
130 $this->tabs_gui->addTarget('downloading_settings',
131 $this->ctrl->getLinkTarget($this, "editDownloadingSettings"),
132 array("editDownloadingSettings", "view"));
133
134 $this->tabs_gui->addTarget('upload_settings',
135 $this->ctrl->getLinkTarget($this, "editUploadSettings"),
136 array("editUploadSettings", "view"));
137
138 $this->tabs_gui->addTarget('preview_settings',
139 $this->ctrl->getLinkTarget($this, "editPreviewSettings"),
140 array("editPreviewSettings", "view"));
141
142 $this->tabs_gui->addTarget('webdav',
143 $this->ctrl->getLinkTarget($this, "editWebDAVSettings"),
144 array("editWebDAVSettings", "view"));
145
146 $this->tabs_gui->addTarget(
147 'fm_settings_tab',
148 $this->ctrl->getLinkTargetByClass('ilFMSettingsGUI','settings'),
149 array(),
150 'ilfmsettingsgui'
151 );
152
153 $this->tabs_gui->addTarget("disk_quota",
154 $this->ctrl->getLinkTarget($this, "editDiskQuotaSettings"),
155 array("editDiskQuota", "view"));
156 }
157 if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
158 {
159 $this->tabs_gui->addTarget("perm_settings",
160 $this->ctrl->getLinkTargetByClass('ilpermissiongui',"perm"),
161 array(),'ilpermissiongui');
162 }
163 }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.

References $DIC, and $GLOBALS.

◆ initDiskQuotaMailTemplateForm()

ilObjFileAccessSettingsGUI::initDiskQuotaMailTemplateForm ( )
protected

Definition at line 761 of file class.ilObjFileAccessSettingsGUI.php.

762 {
763 global $DIC;
764 $lng = $DIC['lng'];
765
766 $lng->loadLanguageModule("meta");
767 $lng->loadLanguageModule("mail");
768
769 include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
770 $form = new ilPropertyFormGUI();
771 $form->setFormAction($this->ctrl->getFormAction($this));
772
773 $form->setTitle($lng->txt("disk_quota_reminder_mail"));
774 $form->setDescription($lng->txt("disk_quota_reminder_mail_desc"));
775
776 foreach($lng->getInstalledLanguages() as $lang_key)
777 {
778 $lang_def = ($lang_key == $lng->getDefaultLanguage())
779 ? " (".$lng->txt("default").")"
780 : "";
781
782 $sec = new ilFormSectionHeaderGUI();
783 $sec->setTitle($lng->txt("meta_l_".$lang_key).$lang_def);
784 $form->addItem($sec);
785
786 $subj = new ilTextInputGUI($lng->txt("subject"), "subject_".$lang_key);
787 $subj->setRequired(true);
788 $form->addItem($subj);
789
790 $sal_g = new ilTextInputGUI($lng->txt("mail_salutation_general"), "sal_g_".$lang_key);
791 $sal_g->setRequired(true);
792 $form->addItem($sal_g);
793
794 $sal_f = new ilTextInputGUI($lng->txt("mail_salutation_female"), "sal_f_".$lang_key);
795 $sal_f->setRequired(true);
796 $form->addItem($sal_f);
797
798 $sal_m = new ilTextInputGUI($lng->txt("mail_salutation_male"), "sal_m_".$lang_key);
799 $sal_m->setRequired(true);
800 $form->addItem($sal_m);
801
802 $body = new ilTextAreaInputGUI($lng->txt("message_content"), "body_".$lang_key);
803 $body->setRequired(true);
804 $body->setRows(10);
805 $form->addItem($body);
806
807 // current values
809 $subj->setValue($amail["subject"]);
810 $sal_g->setValue($amail["sal_g"]);
811 $sal_f->setValue($amail["sal_f"]);
812 $sal_m->setValue($amail["sal_m"]);
813 $body->setValue($amail["body"]);
814 }
815
816 $form->addCommandButton("saveDiskQuotaMailTemplate", $lng->txt("save"));
817 $form->addCommandButton("editDiskQuotaSettings", $lng->txt("cancel"));
818
819 return $form;
820 }
This class represents a section header in a property form.
static _lookupReminderMailTemplate($a_lang)
Looks up the mail template for the specified language.
This class represents a text property in a property form.

References $DIC, ilObjectGUI\$lng, and ilObjDiskQuotaSettings\_lookupReminderMailTemplate().

Referenced by editDiskQuotaMailTemplate(), and saveDiskQuotaMailTemplate().

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

◆ initDownloadingSettingsForm()

ilObjFileAccessSettingsGUI::initDownloadingSettingsForm ( )
protected

Edit settings.

Definition at line 168 of file class.ilObjFileAccessSettingsGUI.php.

169 {
170 global $DIC;
171 global $DIC;
172 $tpl = $DIC['tpl'];
173 $ilCtrl = $DIC['ilCtrl'];
174 $lng = $DIC['lng'];
175 $tree = $DIC['tree'];
176
177 require_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
178 require_once("./Services/Form/classes/class.ilCheckboxInputGUI.php");
179 require_once("./Services/Form/classes/class.ilRadioGroupInputGUI.php");
180 require_once("./Services/Form/classes/class.ilRadioOption.php");
181 require_once("./Services/Form/classes/class.ilTextAreaInputGUI.php");
182
183 $form = new ilPropertyFormGUI();
184 $form->setFormAction($ilCtrl->getFormAction($this));
185 $form->setTitle($lng->txt("settings"));
186
187 // Backwards compatibility with ILIAS 3.9: Use the name of the
188 // uploaded file as the filename for the downloaded file instead
189 // of the title of the file object.
190 $dl_prop = new ilCheckboxInputGUI($lng->txt("download_with_uploaded_filename"), "download_with_uploaded_filename");
191 $dl_prop->setValue('1');
192 // default value should reflect previous behaviour (-> 0)
193 $dl_prop->setChecked($this->object->isDownloadWithUploadedFilename() == 1);
194 $dl_prop->setInfo($lng->txt('download_with_uploaded_filename_info'));
195 $form->addItem($dl_prop);
196
197 // Show download action for folder
198 $dl_prop = new ilCheckboxInputGUI($lng->txt("enable_download_folder"), "enable_download_folder");
199 $dl_prop->setValue('1');
200 // default value should reflect previous behaviour (-> 0)
201 $dl_prop->setChecked($this->folderSettings->get("enable_download_folder", 0) == 1);
202 $dl_prop->setInfo($lng->txt('enable_download_folder_info'));
203 $form->addItem($dl_prop);
204
205 // multi download
206 $dl_prop = new ilCheckboxInputGUI($lng->txt("enable_multi_download"), "enable_multi_download");
207 $dl_prop->setValue('1');
208 // default value should reflect previous behaviour (-> 0)
209 $dl_prop->setChecked($this->folderSettings->get("enable_multi_download", 0) == 1);
210 $dl_prop->setInfo($lng->txt('enable_multi_download_info'));
211 $form->addItem($dl_prop);
212
213
214 // background task
215
216 $lng->loadLanguageModule("bgtask");
217 $dl_bg = new ilCheckboxInputGUI($lng->txt("bgtask_setting"), "enable_bg");
218 $dl_bg->setInfo($lng->txt("bgtask_setting_info"));
219 $dl_bg->setChecked($this->folderSettings->get("bgtask_download", 0));
220 $form->addItem($dl_bg);
221
222 $dl_bgtc = new ilNumberInputGUI($lng->txt("bgtask_setting_threshold_count"), "bg_tcount");
223 $dl_bgtc->setInfo($lng->txt("bgtask_setting_threshold_count_info"));
224 $dl_bgtc->setRequired(true);
225 $dl_bgtc->setSize(10);
226 $dl_bgtc->setMinValue(1);
227 $dl_bgtc->setSuffix($lng->txt("files"));
228 $dl_bgtc->setValue($this->folderSettings->get("bgtask_download_tcount", null));
229 $dl_bg->addSubItem($dl_bgtc);
230
231 $dl_bgts = new ilNumberInputGUI($lng->txt("bgtask_setting_threshold_size"), "bg_tsize");
232 $dl_bgts->setInfo($lng->txt("bgtask_setting_threshold_size_info"));
233 $dl_bgts->setRequired(true);
234 $dl_bgts->setSize(10);
235 $dl_bgts->setMinValue(1);
236 $dl_bgts->setSuffix($lng->txt("lang_size_mb"));
237 $dl_bgts->setValue($this->folderSettings->get("bgtask_download_tsize", null));
238 $dl_bg->addSubItem($dl_bgts);
239
240 $dl_bgl = new ilNumberInputGUI($lng->txt("bgtask_setting_limit"), "bg_limit");
241 $dl_bgl->setInfo($lng->txt("bgtask_setting_limit_info"));
242 $dl_bgl->setRequired(true);
243 $dl_bgl->setSize(10);
244 $dl_bgl->setMinValue(1);
245 $dl_bgl->setSuffix($lng->txt("lang_size_mb"));
246 $dl_bgl->setValue($this->folderSettings->get("bgtask_download_limit", null));
247 $dl_bg->addSubItem($dl_bgl);
248
249
250 // Inline file extensions
251 $tai_prop = new ilTextAreaInputGUI($lng->txt('inline_file_extensions'), 'inline_file_extensions');
252 $tai_prop->setValue($this->object->getInlineFileExtensions());
253 $tai_prop->setInfo($lng->txt('inline_file_extensions_info'));
254 $tai_prop->setCols(80);
255 $tai_prop->setRows(5);
256 $form->addItem($tai_prop);
257
258 // command buttons
259 $form->addCommandButton('saveDownloadingSettings', $lng->txt('save'));
260 $form->addCommandButton('view', $lng->txt('cancel'));
261
262 return $form;
263 }
This class represents a number property in a property form.

References $DIC, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, and ilObjectGUI\$tree.

Referenced by editDownloadingSettings(), and saveDownloadingSettings().

+ Here is the caller graph for this function:

◆ initPreviewSettingsForm()

ilObjFileAccessSettingsGUI::initPreviewSettingsForm ( )
private

Initializes the preview settings form.

Definition at line 1053 of file class.ilObjFileAccessSettingsGUI.php.

1054 {
1055 global $DIC;
1056 $ilCtrl = $DIC['ilCtrl'];
1057 $lng = $DIC['lng'];
1058
1059 require_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
1060 $form = new ilPropertyFormGUI();
1061 $form->setFormAction($ilCtrl->getFormAction($this));
1062 $form->setTitle($lng->txt("settings"));
1063
1064 require_once("Services/Preview/classes/class.ilPreviewSettings.php");
1065
1066 // drag and drop file upload in repository
1067 $chk_prop = new ilCheckboxInputGUI($lng->txt("enable_preview"), "enable_preview");
1068 $chk_prop->setValue('1');
1069 $chk_prop->setChecked(ilPreviewSettings::isPreviewEnabled());
1070 $chk_prop->setInfo($lng->txt('enable_preview_info'));
1071 $form->addItem($chk_prop);
1072
1073 $num_prop = new ilNumberInputGUI($lng->txt("max_previews_per_object"), "max_previews_per_object");
1074 $num_prop->setDecimals(0);
1075 $num_prop->setMinValue(1);
1076 $num_prop->setMinvalueShouldBeGreater(false);
1077 $num_prop->setMaxValue(ilPreviewSettings::MAX_PREVIEWS_MAX);
1078 $num_prop->setMaxvalueShouldBeLess(false);
1079 $num_prop->setMaxLength(5);
1080 $num_prop->setSize(10);
1081 $num_prop->setValue(ilPreviewSettings::getMaximumPreviews());
1082 $num_prop->setInfo($lng->txt('max_previews_per_object_info'));
1083 $form->addItem($num_prop);
1084
1085 // command buttons
1086 $form->addCommandButton('savePreviewSettings', $lng->txt('save'));
1087 $form->addCommandButton('view', $lng->txt('cancel'));
1088
1089 return $form;
1090 }

References $DIC, $ilCtrl, ilObjectGUI\$lng, ilPreviewSettings\getMaximumPreviews(), ilPreviewSettings\isPreviewEnabled(), and ilPreviewSettings\MAX_PREVIEWS_MAX.

Referenced by editPreviewSettings(), and savePreviewSettings().

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

◆ initUploadSettingsForm()

ilObjFileAccessSettingsGUI::initUploadSettingsForm ( )
private

Initializes the upload settings form.

Definition at line 899 of file class.ilObjFileAccessSettingsGUI.php.

900 {
901 global $DIC;
902 $ilCtrl = $DIC['ilCtrl'];
903 $lng = $DIC['lng'];
904
905 require_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
906 $form = new ilPropertyFormGUI();
907 $form->setFormAction($ilCtrl->getFormAction($this));
908 $form->setTitle($lng->txt("settings"));
909
910 require_once("Services/FileUpload/classes/class.ilFileUploadSettings.php");
911
912 // drag and drop file upload
913 $chk_enabled = new ilCheckboxInputGUI($lng->txt("enable_dnd_upload"), "enable_dnd_upload");
914 $chk_enabled->setValue('1');
915 $chk_enabled->setChecked(ilFileUploadSettings::isDragAndDropUploadEnabled());
916 $chk_enabled->setInfo($lng->txt('enable_dnd_upload_info'));
917 $form->addItem($chk_enabled);
918
919 // drag and drop file upload in repository
920 $chk_repo = new ilCheckboxInputGUI($lng->txt("enable_repository_dnd_upload"), "enable_repository_dnd_upload");
921 $chk_repo->setValue('1');
923 $chk_repo->setInfo($lng->txt('enable_repository_dnd_upload_info'));
924 $chk_enabled->addSubItem($chk_repo);
925
926 // concurrent uploads
927 $num_prop = new ilNumberInputGUI($lng->txt("concurrent_uploads"), "concurrent_uploads");
928 $num_prop->setDecimals(0);
929 $num_prop->setMinValue(1);
930 $num_prop->setMinvalueShouldBeGreater(false);
931 $num_prop->setMaxValue(ilFileUploadSettings::CONCURRENT_UPLOADS_MAX);
932 $num_prop->setMaxvalueShouldBeLess(false);
933 $num_prop->setMaxLength(5);
934 $num_prop->setSize(10);
935 $num_prop->setValue(ilFileUploadSettings::getConcurrentUploads());
936 $num_prop->setInfo($lng->txt('concurrent_uploads_info'));
937 $chk_enabled->addSubItem($num_prop);
938
939 include_once("./Services/Utilities/classes/class.ilFileUtils.php");
940
941 // default white list
942 $ne = new ilNonEditableValueGUI($this->lng->txt("file_suffix_default_white"), "");
943 $ne->setValue(implode(", ", ilFileUtils::getDefaultValidExtensionWhiteList()));
944 $ne->setInfo($this->lng->txt("file_suffix_default_white_info"));
945 $form->addItem($ne);
946
947 // file suffix custom black list
948 $ta = new ilTextAreaInputGUI($this->lng->txt("file_suffix_custom_black"), "suffix_repl_additional");
949 $ta->setInfo($this->lng->txt("file_suffix_custom_black_info"));
950 $ta->setRows(5);
951 $form->addItem($ta);
952
953 // file suffix custom white list
954 $ta = new ilTextAreaInputGUI($this->lng->txt("file_suffix_custom_white"), "suffix_custom_white_list");
955 $ta->setInfo($this->lng->txt("file_suffix_custom_white_info"));
956 $ta->setRows(5);
957 $form->addItem($ta);
958
959 // resulting overall white list
960 $ne = new ilNonEditableValueGUI($this->lng->txt("file_suffix_overall_white"), "");
961 $ne->setValue(implode(", ", ilFileUtils::getValidExtensions()));
962 $ne->setInfo($this->lng->txt("file_suffix_overall_white_info"));
963 $form->addItem($ne);
964
965 // command buttons
966 $form->addCommandButton('saveUploadSettings', $lng->txt('save'));
967 $form->addCommandButton('view', $lng->txt('cancel'));
968
969 return $form;
970 }
static getDefaultValidExtensionWhiteList()
Valid extensions.
static getValidExtensions()
This class represents a non editable value in a property form.

References $DIC, $ilCtrl, ilObjectGUI\$lng, ilFileUploadSettings\CONCURRENT_UPLOADS_MAX, ilFileUploadSettings\getConcurrentUploads(), ilFileUtils\getDefaultValidExtensionWhiteList(), ilFileUtils\getValidExtensions(), ilFileUploadSettings\isDragAndDropUploadEnabled(), and ilFileUploadSettings\isRepositoryDragAndDropUploadEnabled().

Referenced by editUploadSettings(), and saveUploadSettings().

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

◆ saveDiskQuotaMailTemplate()

ilObjFileAccessSettingsGUI::saveDiskQuotaMailTemplate ( )

Definition at line 868 of file class.ilObjFileAccessSettingsGUI.php.

869 {
870 global $DIC;
871 $lng = $DIC['lng'];
872
873 $form = $this->initDiskQuotaMailTemplateForm();
874 if($form->checkInput())
875 {
876 foreach($lng->getInstalledLanguages() as $lang_key)
877 {
878 $this->disk_quota_obj->_writeReminderMailTemplate(
879 $lang_key,
880 $form->getInput("subject_".$lang_key),
881 $form->getInput("sal_g_".$lang_key),
882 $form->getInput("sal_f_".$lang_key),
883 $form->getInput("sal_m_".$lang_key),
884 $form->getInput("body_".$lang_key)
885 );
886 }
887
888 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
889 $this->ctrl->redirect($this, "editDiskQuotaMailTemplate");
890 }
891
892 $form->setValuesByPost();
893 $this->editDiskQuotaMailTemplate($form);
894 }
editDiskQuotaMailTemplate(ilPropertyFormGUI $a_form=null)
Edit disk quota settings.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.

References $DIC, ilObjectGUI\$lng, editDiskQuotaMailTemplate(), initDiskQuotaMailTemplateForm(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ saveDiskQuotaSettings()

ilObjFileAccessSettingsGUI::saveDiskQuotaSettings ( )

Save disk quota settings.

Definition at line 510 of file class.ilObjFileAccessSettingsGUI.php.

511 {
512 global $DIC;
513 $rbacsystem = $DIC['rbacsystem'];
514 $ilErr = $DIC['ilErr'];
515 $ilCtrl = $DIC['ilCtrl'];
516 $lng = $DIC['lng'];
517
518 if (! $rbacsystem->checkAccess("write",$this->object->getRefId()))
519 {
520 $ilErr->raiseError($lng->txt("no_permission"),$ilErr->WARNING);
521 }
522
523 // ilUtil::sendInfo($lng->txt('settings_saved'),true);
524 $ilCtrl->redirect($this, "editDiskQuotaSettings");
525 }

References $DIC, $ilCtrl, $ilErr, and ilObjectGUI\$lng.

◆ saveDownloadingSettings()

ilObjFileAccessSettingsGUI::saveDownloadingSettings ( )

Save settings.

Definition at line 290 of file class.ilObjFileAccessSettingsGUI.php.

291 {
292 global $DIC;
293 $rbacsystem = $DIC['rbacsystem'];
294 $ilErr = $DIC['ilErr'];
295 $ilCtrl = $DIC['ilCtrl'];
296 $lng = $DIC['lng'];
297
298 if (! $rbacsystem->checkAccess("write",$this->object->getRefId()))
299 {
300 $ilErr->raiseError($lng->txt("no_permission"),$ilErr->WARNING);
301 }
302
303 $form = $this->initDownloadingSettingsForm();
304 if($form->checkInput())
305 {
306 $this->object->setDownloadWithUploadedFilename(ilUtil::stripSlashes($_POST['download_with_uploaded_filename']));
307 $this->object->setInlineFileExtensions(ilUtil::stripSlashes($_POST['inline_file_extensions']));
308 $this->object->update();
309
310 $this->folderSettings->set("enable_download_folder", $_POST["enable_download_folder"] == 1);
311 $this->folderSettings->set("enable_multi_download", $_POST["enable_multi_download"] == 1);
312
313 $this->folderSettings->set("bgtask_download", (bool)$_POST["enable_bg"]);
314 if((bool)$_POST["enable_bg"])
315 {
316 $this->folderSettings->set("bgtask_download_limit", (int)$_POST["bg_limit"]);
317 $this->folderSettings->set("bgtask_download_tcount", (int)$_POST["bg_tcount"]);
318 $this->folderSettings->set("bgtask_download_tsize", (int)$_POST["bg_tsize"]);
319 }
320
321 ilUtil::sendSuccess($lng->txt('settings_saved'),true);
322 $ilCtrl->redirect($this, "editDownloadingSettings");
323 }
324
325 $form->setValuesByPost();
326 $this->editDownloadingSettings($form);
327 }
$_POST["username"]
editDownloadingSettings(ilPropertyFormGUI $a_form=null)
Edit settings.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

References $_POST, $DIC, $ilCtrl, $ilErr, ilObjectGUI\$lng, editDownloadingSettings(), initDownloadingSettingsForm(), ilUtil\sendSuccess(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ savePreviewSettings()

ilObjFileAccessSettingsGUI::savePreviewSettings ( )

Save preview settings.

Definition at line 1149 of file class.ilObjFileAccessSettingsGUI.php.

1150 {
1151 global $DIC;
1152 $rbacsystem = $DIC['rbacsystem'];
1153 $ilErr = $DIC['ilErr'];
1154 $ilCtrl = $DIC['ilCtrl'];
1155 $tpl = $DIC['tpl'];
1156 $lng = $DIC['lng'];
1157
1158 $this->tabs_gui->setTabActive('preview_settings');
1159
1160 if (!$rbacsystem->checkAccess("write",$this->object->getRefId()))
1161 {
1162 $ilErr->raiseError($lng->txt("no_permission"),$ilErr->WARNING);
1163 }
1164
1165 // get form
1166 $form = $this->initPreviewSettingsForm();
1167 if ($form->checkInput())
1168 {
1169 require_once("Services/Preview/classes/class.ilPreviewSettings.php");
1170 ilPreviewSettings::setPreviewEnabled($_POST["enable_preview"] == 1);
1171 ilPreviewSettings::setMaximumPreviews($_POST["max_previews_per_object"]);
1172
1173 ilUtil::sendSuccess($lng->txt('settings_saved'), true);
1174 $ilCtrl->redirect($this, "editPreviewSettings");
1175 }
1176 else
1177 {
1178 $form->setValuesByPost();
1179 $tpl->setContent($form->getHTML());
1180 }
1181 }
static setMaximumPreviews($a_value)
Sets the maximum number of preview pictures per object.
static setPreviewEnabled($a_value)
Sets whether the preview functionality is enabled.

References $_POST, $DIC, $ilCtrl, $ilErr, ilObjectGUI\$lng, ilObjectGUI\$tpl, initPreviewSettingsForm(), ilUtil\sendSuccess(), ilPreviewSettings\setMaximumPreviews(), and ilPreviewSettings\setPreviewEnabled().

+ Here is the call graph for this function:

◆ saveUploadSettings()

ilObjFileAccessSettingsGUI::saveUploadSettings ( )

Save upload settings.

Definition at line 1012 of file class.ilObjFileAccessSettingsGUI.php.

1013 {
1014 global $DIC;
1015 $rbacsystem = $DIC['rbacsystem'];
1016 $ilErr = $DIC['ilErr'];
1017 $ilCtrl = $DIC['ilCtrl'];
1018 $lng = $DIC['lng'];
1019 $tpl = $DIC['tpl'];
1020 $ilSetting = $DIC['ilSetting'];
1021
1022 if (!$rbacsystem->checkAccess("write",$this->object->getRefId()))
1023 {
1024 $ilErr->raiseError($lng->txt("no_permission"),$ilErr->WARNING);
1025 }
1026
1027 // get form
1028 $form = $this->initUploadSettingsForm();
1029 if ($form->checkInput())
1030 {
1031 require_once("Services/FileUpload/classes/class.ilFileUploadSettings.php");
1033 ilFileUploadSettings::setRepositoryDragAndDropUploadEnabled($_POST["enable_repository_dnd_upload"] == 1);
1035
1036 // file suffic replacements
1037 $ilSetting->set("suffix_repl_additional", $_POST["suffix_repl_additional"]);
1038 $ilSetting->set("suffix_custom_white_list", $_POST["suffix_custom_white_list"]);
1039
1040 ilUtil::sendSuccess($lng->txt('settings_saved'), true);
1041 $ilCtrl->redirect($this, "editUploadSettings");
1042 }
1043 else
1044 {
1045 $form->setValuesByPost();
1046 $tpl->setContent($form->getHTML());
1047 }
1048 }
static setRepositoryDragAndDropUploadEnabled($newValue)
Sets whether drag and drop file upload in the repository 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.

References $_POST, $DIC, $ilCtrl, $ilErr, $ilSetting, ilObjectGUI\$lng, ilObjectGUI\$tpl, initUploadSettingsForm(), ilUtil\sendSuccess(), ilFileUploadSettings\setConcurrentUploads(), ilFileUploadSettings\setDragAndDropUploadEnabled(), and ilFileUploadSettings\setRepositoryDragAndDropUploadEnabled().

+ Here is the call graph for this function:

◆ saveWebDAVSettings()

ilObjFileAccessSettingsGUI::saveWebDAVSettings ( )

Save settings.

Definition at line 391 of file class.ilObjFileAccessSettingsGUI.php.

392 {
393 global $DIC;
394 $rbacsystem = $DIC['rbacsystem'];
395 $ilErr = $DIC['ilErr'];
396 $ilCtrl = $DIC['ilCtrl'];
397 $lng = $DIC['lng'];
398
399 if (! $rbacsystem->checkAccess("write",$this->object->getRefId()))
400 {
401 $ilErr->raiseError($lng->txt("no_permission"),$ilErr->WARNING);
402 }
403
404 $this->object->setWebdavEnabled($_POST['enable_webdav'] == '1');
405// $this->object->setWebdavActionsVisible($_POST['webdav_actions_visible'] == '1');
406 $this->object->setCustomWebfolderInstructionsEnabled($_POST['custom_webfolder_instructions_choice']=='custom');
407 $this->object->setCustomWebfolderInstructions(ilUtil::stripSlashes($_POST['custom_webfolder_instructions'], false));
408 $this->object->update();
409
410 ilUtil::sendInfo($lng->txt('settings_saved'),true);
411 $ilCtrl->redirect($this, "editWebDAVSettings");
412 }

References $_POST, $DIC, $ilCtrl, $ilErr, ilObjectGUI\$lng, ilUtil\sendInfo(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ setTitleAndDescription()

ilObjFileAccessSettingsGUI::setTitleAndDescription ( )

called by prepare output

Reimplemented from ilObjectGUI.

Definition at line 417 of file class.ilObjFileAccessSettingsGUI.php.

418 {
419 parent::setTitleAndDescription();
420 $this->tpl->setDescription($this->object->getDescription());
421 }

◆ viewDiskQuotaReport()

ilObjFileAccessSettingsGUI::viewDiskQuotaReport ( )
The disk quota report list shows user accounts, their disk quota and their

disk usage, as well as the last time a reminder was sent.

Definition at line 531 of file class.ilObjFileAccessSettingsGUI.php.

532 {
533 global $DIC;
534 $rbacsystem = $DIC['rbacsystem'];
535 $ilErr = $DIC['ilErr'];
536 $ilSetting = $DIC['ilSetting'];
537 $lng = $DIC['lng'];
538
539 if (! $rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
540 {
541 $ilErr->raiseError($lng->txt("no_permission"),$ilErr->WARNING);
542 }
543
544 $this->tabs_gui->setTabActive('disk_quota');
545 $this->addDiskQuotaSubtabs('disk_quota_report');
546
547 // nothing to do if disk quota is not active
548 require_once 'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
550 {
551 return;
552 }
553
554 // get the form
555 $this->tpl->addBlockfile('ADM_CONTENT','adm_content','tpl.disk_quota_report.html',
556 "Services/WebDAV");
557
558 // get the date of the last update
559 require_once("./Services/WebDAV/classes/class.ilDiskQuotaChecker.php");
561 if ($last_update == null)
562 {
563 // nothing to do if disk usage report has not been run
564 $this->tpl->setVariable('LAST_UPDATE_TEXT',$lng->txt('disk_quota_report_not_run_yet'));
565 return;
566 }
567 else
568 {
569 $this->tpl->setVariable('LAST_UPDATE_TEXT',$lng->txt('last_update').': '.
571 }
572
573 // Filter
574 $_SESSION['quota_usage_filter'] = isset($_POST['usage_filter']) ? $_POST['usage_filter'] : $_SESSION['quota_usage_filter'];
575 if ($_SESSION['quota_usage_filter'] == 0)
576 {
577 $_SESSION['quota_usage_filter'] = 4;
578 }
579 $_SESSION['quota_access_filter'] = isset($_POST['access_filter']) ? $_POST['access_filter'] : $_SESSION['quota_access_filter'];
580 if ($_SESSION['quota_access_filter'] == 0)
581 {
582 $_SESSION['quota_access_filter'] = 1;
583 }
584 $usage_action[1] = $lng->txt('all_users');
585 $usage_action[2] = $lng->txt('filter_users_without_disk_usage');
586 $usage_action[3] = $lng->txt('filter_users_with_disk_usage');
587 $usage_action[4] = $lng->txt('filter_users_with_exceeded_disk_quota');
588 $access_action[1] = $lng->txt('all_users');
589 $access_action[2] = $lng->txt('filter_users_with_access');
590 $access_action[3] = $lng->txt('filter_users_without_access');
591
592 $select_usage_filter = ilUtil::formSelect($_SESSION['quota_usage_filter'],"usage_filter",$usage_action,false,true);
593 $select_access_filter = ilUtil::formSelect($_SESSION['quota_access_filter'],"access_filter",$access_action,false,true);
594
595 $this->tpl->setCurrentBlock("filter");
596 $this->tpl->setVariable("FILTER_TXT_FILTER",$lng->txt('filter'));
597 $this->tpl->setVariable("SELECT_USAGE_FILTER",$select_usage_filter);
598 $this->tpl->setVariable("SELECT_ACCESS_FILTER",$select_access_filter);
599 $this->tpl->setVariable("FILTER_ACTION",$this->ctrl->getLinkTarget($this, 'viewDiskQuotaReport'));
600 $this->tpl->setVariable("FILTER_NAME",'view');
601 $this->tpl->setVariable("FILTER_VALUE",$lng->txt('apply_filter'));
602 $this->tpl->parseCurrentBlock();
603
604 // load templates for table
605 $a_tpl = new ilTemplate('tpl.table.html',true,true);
606 $a_tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.obj_tbl_rows.html");
607
608 // create table
609 require_once './Services/Table/classes/class.ilTableGUI.php';
610 $tbl = new ilTableGUI(0, false);
611
612 // title & header columns
613 $header_vars = array('login','firstname','lastname','email','access_until','last_login','disk_quota','disk_usage', 'last_reminder');
614 $tbl->setHeaderNames(
615 array(
616 $lng->txt('login'),
617 $lng->txt('firstname'),
618 $lng->txt('lastname'),
619 $lng->txt('email'),
620 $lng->txt('access_until'),
621 $lng->txt('last_login'),
622 $lng->txt('disk_quota'),
623 $lng->txt('disk_usage'),
624 $lng->txt('last_reminder')
625 )
626 );
627 $tbl->setHeaderVars(
628 $header_vars,
629 $this->ctrl->getParameterArray($this,'viewDiskQuotaReport',false)
630 );
631
632 $tbl->enable("numinfo_header");
633 $tbl->setFormName("cmd");
634 $tbl->setSelectAllCheckbox("id");
635
636 // sorting
637 $tbl->setOrderColumn($_GET["sort_by"]);
638 $tbl->setOrderDirection($_GET["sort_order"]);
639
640 // fetch the data
642 $_SESSION['quota_usage_filter'],
643 $_SESSION['quota_access_filter'],
644 $header_vars[$tbl->getOrderColumn()], $tbl->getOrderDirection());
645
646 // paging
647 $tbl->setLimit($_GET["limit"]);
648 $tbl->setOffset($_GET["offset"]);
649 $tbl->setMaxCount(count($data));
650
651 // footer
652 $tbl->setFooter("tblfooter",$lng->txt("previous"),$lng->txt("next"));
653
654 // render table
655 $tbl->setTemplate($a_tpl);
656
657 // render rows
658 $count = 0;
659 for ($i = $tbl->getOffset(); $i < count($data) && $i < $tbl->getOffset() + $tbl->getLimit(); $i++)
660 {
661 $row = $data[$i];
662
663 // build columns
664 foreach ($header_vars as $key)
665 {
666 switch ($key)
667 {
668 case 'login' :
669 //build link
670 $this->ctrl->setParameterByClass("ilobjusergui", "ref_id", "7");
671 $this->ctrl->setParameterByClass("ilobjusergui", "obj_id", $row["usr_id"]);
672 $link = $this->ctrl->getLinkTargetByClass("ilobjusergui", "view");
673 $tbl_content_cell = '<a href="'.$link.'">'.htmlspecialchars($row[$key]).'</a>';
674 break;
675 case 'disk_quota' :
676 if ($row['role_id'] == SYSTEM_ROLE_ID)
677 {
678 $tbl_content_cell = "<span class=\"smallgreen\">".$lng->txt('access_unlimited').'</span>';
679 }
680 else
681 {
682 $tbl_content_cell = ilUtil::formatSize($row[$key],'short');
683 }
684 break;
685 case 'disk_usage' :
686 if ($row['last_update'] == null)
687 {
688 $tbl_content_cell = $lng->txt('unknown');
689 }
690 else if ($row['disk_usage'] > $row['disk_quota'])
691 {
692 $tbl_content_cell = "<span class=\"smallred\">".ilUtil::formatSize($row[$key],'short').'</span>';
693 }
694 else
695 {
696 $tbl_content_cell = ilUtil::formatSize($row[$key],'short');
697 }
698 break;
699 case 'access_until' :
700 if (! $row['active'])
701 {
702 $tbl_content_cell = "<span class=\"smallred\">".$lng->txt('inactive').'</span>';
703 }
704 else if ($row['time_limit_unlimited'])
705 {
706 $tbl_content_cell = "<span class=\"smallgreen\">".$lng->txt('access_unlimited').'</span>';
707 }
708 else if ($row['expired'])
709 {
710 $tbl_content_cell = "<span class=\"smallred\">".$lng->txt('access_expired').'</span>';
711 }
712 else
713 {
714 $tbl_content_cell = ilDatePresentation::formatDate(new ilDateTime($row[$key], IL_CAL_DATETIME));
715 }
716 break;
717 case 'last_login' :
718 case 'last_reminder' :
719 if ($row[$key] == null)
720 {
721 $tbl_content_cell = $lng->txt('no_date');
722 }
723 else
724 {
725 $tbl_content_cell = ilDatePresentation::formatDate(new ilDateTime($row[$key], IL_CAL_DATETIME));
726 }
727 break;
728 default :
729 $tbl_content_cell = htmlspecialchars($row[$key]);
730 }
731 /*
732 if (is_array($tbl_content_cell))
733 {
734 $tbl->tpl->setCurrentBlock("tbl_cell_subtitle");
735 $tbl->tpl->setVariable("TBL_CELL_SUBTITLE",$tbl_content_cell[1]);
736 $tbl->tpl->parseCurrentBlock();
737 $tbl_content_cell = "<b>".$tbl_content_cell[0]."</b>";
738 }*/
739
740 $tbl->tpl->setCurrentBlock("tbl_content_cell");
741 $tbl->tpl->setVariable("TBL_CONTENT_CELL",$tbl_content_cell);
742
743 $tbl->tpl->parseCurrentBlock();
744 }
745
746 $tbl->tpl->setCurrentBlock("tbl_content_row");
747 $rowcolor = ilUtil::switchColor($count,"tblrow1","tblrow2");
748 $tbl->tpl->setVariable("ROWCOLOR", $rowcolor);
749 $tbl->tpl->parseCurrentBlock();
750
751 $count++;
752 }
753 $tbl->disable('icon');
754 $tbl->disable('title');
755 $tbl->render();
756
757 // Add table to page
758 $this->tpl->setVariable("USER_TABLE",$a_tpl->get());
759 }
$_GET["client_id"]
$_SESSION["AccountId"]
const IL_CAL_DATETIME
static formatDate(ilDateTime $date)
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.
Class ilTableGUI.
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 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.
$tbl
Definition: example_048.php:81

References $_GET, $_POST, $_SESSION, ilObjectGUI\$data, $DIC, $ilErr, $ilSetting, ilObjectGUI\$lng, $row, $tbl, ilDiskQuotaChecker\_fetchDiskQuotaReport(), ilDiskQuotaActivationChecker\_isActive(), ilDiskQuotaChecker\_lookupDiskUsageReportLastUpdate(), addDiskQuotaSubtabs(), ilDatePresentation\formatDate(), ilUtil\formatSize(), ilUtil\formSelect(), IL_CAL_DATETIME, and ilUtil\switchColor().

+ Here is the call graph for this function:

Field Documentation

◆ $disk_quota_obj

ilObjFileAccessSettingsGUI::$disk_quota_obj
private

Definition at line 41 of file class.ilObjFileAccessSettingsGUI.php.


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