ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilObjFileAccessSettingsGUI Class Reference
+ Inheritance diagram for ilObjFileAccessSettingsGUI:
+ Collaboration diagram for ilObjFileAccessSettingsGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference)
 Constructor. More...
 
 executeCommand ()
 Execute command. More...
 
 getAdminTabs ()
 Get tabs. More...
 
 editDownloadingSettings (ilPropertyFormGUI $a_form=null)
 Edit settings. More...
 
 sanitize ()
 
 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 ()
 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. More...
 
 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...
 
 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...
 
 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 ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 
 addToDeskObject ()
 @inheritDoc More...
 
 removeFromDeskObject ()
 @inheritDoc More...
 

Data Fields

const CMD_EDIT_DOWNLOADING_SETTINGS = 'editDownloadingSettings'
 
const CMD_EDIT_WEBDAV_SETTINGS = 'editWebDAVSettings'
 
const CMD_SANITIZE = 'sanitize'
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Protected Member Functions

 initDownloadingSettingsForm ()
 Edit settings. More...
 
 initWebDAVSettingsForm ()
 
 addWebDAVSubTabs ()
 
 initDiskQuotaMailTemplateForm ()
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 Get object service. More...
 
 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...
 
 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...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Protected Attributes

 $folderSettings
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 

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...
 

Detailed Description

Definition at line 40 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 60 of file class.ilObjFileAccessSettingsGUI.php.

61 {
62 $this->type = "facs";
63 parent::__construct($a_data, $a_id, $a_call_by_reference, false);
64 $this->folderSettings = new ilSetting('fold');
65
66 // Load the disk quota settings object
67 $this->disk_quota_obj = new ilObjDiskQuotaSettings($a_id, $a_call_by_reference);
68 $this->disk_quota_obj->read();
69 }
ILIAS Setting Class.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ addDiskQuotaSubtabs()

ilObjFileAccessSettingsGUI::addDiskQuotaSubtabs (   $a_active_subtab)

Add disk quota subtabs.

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

456 {
457 global $DIC;
458 $ilCtrl = $DIC['ilCtrl'];
459 $ilTabs = $DIC['ilTabs'];
460
461 $ilTabs->addSubTabTarget("settings", $ilCtrl->getLinkTarget($this, "editDiskQuotaSettings"), array("editDiskQuotaSettings"));
462
464 $ilTabs->addSubTabTarget("disk_quota_report", $ilCtrl->getLinkTarget($this, "viewDiskQuotaReport"), array("viewDiskQuotaReport"));
465 }
466
467 $ilTabs->addSubTabTarget(
468 "disk_quota_reminder_mail",
469 $ilCtrl->getLinkTarget($this, "editDiskQuotaMailTemplate"),
470 array("editDiskQuotaMailTemplate")
471 );
472
473 $ilTabs->setSubTabActive($a_active_subtab);
474 }
global $ilCtrl
Definition: ilias.php:18
$DIC
Definition: xapitoken.php:46

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 1147 of file class.ilObjFileAccessSettingsGUI.php.

1148 {
1149 global $DIC;
1150 $ilSetting = $DIC['ilSetting'];
1151
1152 switch ($a_form_id) {
1154
1155 $fields = array('file_suffix_repl' => $ilSetting->get("suffix_repl_additional"));
1156
1157 return array(array("editUploadSettings", $fields));
1158 }
1159 }
global $ilSetting
Definition: privfeed.php:17

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

◆ addWebDAVSubTabs()

ilObjFileAccessSettingsGUI::addWebDAVSubTabs ( )
protected

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

371 {
372 $this->tabs_gui->addSubTabTarget(
373 "webdav_general_settings",
374 $this->ctrl->getLinkTarget($this, self::CMD_EDIT_WEBDAV_SETTINGS),
375 array(self::CMD_EDIT_WEBDAV_SETTINGS, "view")
376 );
377 $this->tabs_gui->addSubTabTarget(
378 "webdav_upload_instructions",
379 $this->ctrl->getLinkTargetByClass('ilWebDAVMountInstructionsUploadGUI'),
380 "view"
381 );
382 }

Referenced by editWebDAVSettings(), and executeCommand().

+ Here is the caller graph for this function:

◆ editDiskQuotaMailTemplate()

ilObjFileAccessSettingsGUI::editDiskQuotaMailTemplate ( ilPropertyFormGUI  $a_form = null)

Edit disk quota settings.

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

793 {
794 global $DIC;
795 $rbacsystem = $DIC['rbacsystem'];
796 $ilErr = $DIC['ilErr'];
797 $lng = $DIC['lng'];
798
799 if (!$rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
800 $ilErr->raiseError($lng->txt("no_permission"), $ilErr->WARNING);
801 }
802
803 $this->tabs_gui->setTabActive("disk_quota");
804 $this->addDiskQuotaSubtabs("disk_quota_reminder_mail");
805
806 if (!$a_form) {
807 $a_form = $this->initDiskQuotaMailTemplateForm();
808 }
809
810 $tpl = new ilTemplate("tpl.disk_quota_reminder_mail.html", true, true, "Services/DiskQuota");
811 $tpl->setVariable("TXT_USE_PLACEHOLDERS", $lng->txt("mail_nacc_use_placeholder"));
812 $tpl->setVariable("TXT_MAIL_SALUTATION", $lng->txt("mail_nacc_salutation"));
813 $tpl->setVariable("TXT_FIRST_NAME", $lng->txt("firstname"));
814 $tpl->setVariable("TXT_LAST_NAME", $lng->txt("lastname"));
815 $tpl->setVariable("TXT_EMAIL", $lng->txt("email"));
816 $tpl->setVariable("TXT_LOGIN", $lng->txt("mail_nacc_login"));
817 $tpl->setVariable("TXT_DISK_QUOTA", $lng->txt("disk_quota"));
818 $tpl->setVariable("TXT_DISK_USAGE", $lng->txt("disk_usage"));
819 $tpl->setVariable("TXT_DISK_USAGE_DETAILS", $lng->txt("disk_usage_details"));
820 $tpl->setVariable("TXT_ADMIN_MAIL", $lng->txt("mail_nacc_admin_mail"));
821 $tpl->setVariable("TXT_ILIAS_URL", $lng->txt("mail_nacc_ilias_url"));
822 $tpl->setVariable("TXT_CLIENT_NAME", $lng->txt("mail_nacc_client_name"));
823
824 $legend = ilPanelGUI::getInstance();
825 $legend->setHeadingStyle(ilPanelGUI::HEADING_STYLE_BLOCK);
826 $legend->setHeading($lng->txt("mail_nacc_use_placeholder"));
827 $legend->setBody($tpl->get());
828
829 $this->tpl->setContent($a_form->getHTML() . $legend->getHTML());
830 }
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

References $DIC, ilObjectGUI\$ilErr, ilObjectGUI\$lng, ilObjectGUI\$rbacsystem, 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 480 of file class.ilObjFileAccessSettingsGUI.php.

481 {
482 global $DIC;
483 $rbacsystem = $DIC['rbacsystem'];
484 $ilErr = $DIC['ilErr'];
485 $ilSetting = $DIC['ilSetting'];
486 $tpl = $DIC['tpl'];
487 $lng = $DIC['lng'];
488 $ilCtrl = $DIC['ilCtrl'];
489
490 if (!$rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
491 $ilErr->raiseError($lng->txt("no_permission"), $ilErr->WARNING);
492 }
493
494 $this->tabs_gui->setTabActive('disk_quota');
495 $this->addDiskQuotaSubtabs('settings');
496
497 $lng->loadLanguageModule("file");
498
499 $form = new ilPropertyFormGUI();
500 $form->setFormAction($ilCtrl->getFormAction($this));
501 $form->setTitle($lng->txt("settings"));
502
504
505
506 $tpl->setContent($form->getHTML());
507 }
static addFieldsToForm($a_form_id, ilPropertyFormGUI $a_form, ilObjectGUI $a_parent_gui)
This class represents a property form user interface.

References $DIC, $ilCtrl, ilObjectGUI\$ilErr, $ilSetting, ilObjectGUI\$lng, ilObjectGUI\$rbacsystem, 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 270 of file class.ilObjFileAccessSettingsGUI.php.

271 {
272 global $DIC, $ilErr;
273
274 // $DIC->toolbar()->addButton($this->lng->txt('generate_sanitize_report'), $this->ctrl->getLinkTarget($this, self::CMD_SANITIZE));
275
276 $this->tabs_gui->setTabActive('downloading_settings');
277
278 if (!$DIC->rbac()->system()->checkAccess("visible,read", $this->object->getRefId())) {
279 $ilErr->raiseError($DIC->language()->txt("no_permission"), $ilErr->WARNING);
280 }
281
282 if (!$a_form) {
283 $a_form = $this->initDownloadingSettingsForm();
284 }
285
286 $DIC->ui()->mainTemplate()->setContent($a_form->getHTML());
287 }

References $DIC, ilObjectGUI\$ilErr, 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 1064 of file class.ilObjFileAccessSettingsGUI.php.

1065 {
1066 global $DIC;
1067 $rbacsystem = $DIC['rbacsystem'];
1068 $ilErr = $DIC['ilErr'];
1069 $tpl = $DIC['tpl'];
1070 $lng = $DIC['lng'];
1071
1072 $this->tabs_gui->setTabActive('preview_settings');
1073
1074 if (!$rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
1075 $ilErr->raiseError($lng->txt("no_permission"), $ilErr->WARNING);
1076 }
1077
1078 // set warning if ghostscript not installed
1080 ilUtil::sendInfo($lng->txt("ghostscript_not_configured"));
1081 }
1082
1083 // get form
1084 $form = $this->initPreviewSettingsForm();
1085
1086 // set current values
1087 require_once("Services/Preview/classes/class.ilPreviewSettings.php");
1088
1089 $val = array();
1090 $val["enable_preview"] = ilPreviewSettings::isPreviewEnabled();
1091 $val["max_previews_per_object"] = ilPreviewSettings::getMaximumPreviews();
1092 $form->setValuesByArray($val);
1093
1094 $html = $form->getHTML();
1095
1096 // build renderer HTML
1097 require_once("Services/Preview/classes/class.ilRendererFactory.php");
1098 require_once("Services/Preview/classes/class.ilRendererTableGUI.php");
1099
1100 $renderers = ilRendererFactory::getRenderers();
1101
1102 $table = new ilRendererTableGUI($this, array("editPreviewSettings", "view"));
1103 $table->setMaxCount(sizeof($renderers));
1104 $table->setData($renderers);
1105
1106 $html .= "<br/>" . $table->getHTML();
1107
1108 // set content
1109 $tpl->setContent($html);
1110 }
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.

References $DIC, ilObjectGUI\$ilErr, ilObjectGUI\$lng, ilObjectGUI\$rbacsystem, 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 944 of file class.ilObjFileAccessSettingsGUI.php.

945 {
946 global $DIC;
947 $rbacsystem = $DIC['rbacsystem'];
948 $ilErr = $DIC['ilErr'];
949 $tpl = $DIC['tpl'];
950 $lng = $DIC['lng'];
951 $ilSetting = $DIC['ilSetting'];
952
953 $this->tabs_gui->setTabActive('upload_settings');
954
955 if (!$rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
956 $ilErr->raiseError($lng->txt("no_permission"), $ilErr->WARNING);
957 }
958
959 // get form
960 $form = $this->initUploadSettingsForm();
961
962 require_once("Services/FileUpload/classes/class.ilFileUploadSettings.php");
963
964 // set current values
965 $val = array();
966 $val["enable_dnd_upload"] = ilFileUploadSettings::isDragAndDropUploadEnabled();
967 $val["enable_repository_dnd_upload"] = ilFileUploadSettings::isRepositoryDragAndDropUploadEnabled();
968 $val["concurrent_uploads"] = ilFileUploadSettings::getConcurrentUploads();
969 $val["suffix_repl_additional"] = $ilSetting->get("suffix_repl_additional");
970 $val["suffix_custom_white_list"] = $ilSetting->get("suffix_custom_white_list");
971 $val["suffix_custom_expl_black"] = $ilSetting->get("suffix_custom_expl_black");
972 $form->setValuesByArray($val);
973
974 // set content
975 $tpl->setContent($form->getHTML());
976 }
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, ilObjectGUI\$ilErr, $ilSetting, ilObjectGUI\$lng, ilObjectGUI\$rbacsystem, 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 387 of file class.ilObjFileAccessSettingsGUI.php.

388 {
389 global $DIC;
390 $rbacsystem = $DIC['rbacsystem'];
391 $ilErr = $DIC['ilErr'];
392 $tpl = $DIC['tpl'];
393 $ilCtrl = $DIC['ilCtrl'];
394 $lng = $DIC['lng'];
395
396 $this->tabs_gui->setTabActive('webdav');
397 $this->addWebDAVSubTabs();
398
399 if (!$rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
400 $ilErr->raiseError($lng->txt("no_permission"), $ilErr->WARNING);
401 }
402
403 $form = $this->initWebDAVSettingsForm();
404
405 $tpl->setContent($form->getHTML());
406 }

References $DIC, $ilCtrl, ilObjectGUI\$ilErr, ilObjectGUI\$lng, ilObjectGUI\$rbacsystem, ilObjectGUI\$tpl, addWebDAVSubTabs(), and initWebDAVSettingsForm().

+ Here is the call graph for this function:

◆ executeCommand()

ilObjFileAccessSettingsGUI::executeCommand ( )

Execute command.

@access public

Reimplemented from ilObjectGUI.

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

79 {
80 global $DIC;
81 $ilAccess = $DIC['ilAccess'];
82 $ilias = $DIC['ilias'];
83 $lng = $DIC['lng'];
84
85 $lng->loadLanguageModule("file");
86
87 $next_class = $this->ctrl->getNextClass($this);
88 $cmd = $this->ctrl->getCmd();
89
90 $this->prepareOutput();
91
92 if (!$ilAccess->checkAccess('read', '', $this->object->getRefId())) {
93 $ilias->raiseError($lng->txt('no_permission'), $ilias->error_obj->MESSAGE);
94 }
95
96 switch ($next_class) {
97 case 'ilpermissiongui':
98 $this->tabs_gui->setTabActive('perm_settings');
99 $perm_gui = new ilPermissionGUI($this);
100 $ret = &$this->ctrl->forwardCommand($perm_gui);
101 break;
102
103 case 'ilfmsettingsgui':
104 $this->tabs_gui->setTabActive('fm_settings_tab');
105 $fmg = new ilFMSettingsGUI($this);
106 $this->ctrl->forwardCommand($fmg);
107 break;
108
109 case 'ilwebdavmountinstructionsuploadgui':
110 $document_gui = new ilWebDAVMountInstructionsUploadGUI(
111 $this->object,
112 $this->tpl,
113 $this->user,
114 $this->ctrl,
115 $this->lng,
116 $DIC->rbac()->system(),
117 $DIC['ilErr'],
118 $DIC->logger()->root(),
119 $this->toolbar,
120 $DIC->http(),
121 $DIC->ui()->factory(),
122 $DIC->ui()->renderer(),
123 $DIC->filesystem(),
124 $DIC->upload(),
126 );
127 $this->tabs_gui->setTabActive('webdav');
128 $this->addWebDAVSubTabs();
129 $this->tabs_gui->setSubTabActive('webdav_upload_instructions');
130 $this->ctrl->forwardCommand($document_gui);
131 break;
132
133 default:
134 if (!$cmd || $cmd == 'view') {
136 }
137
138 $this->$cmd();
139 break;
140 }
141
142 return true;
143 }
user()
Definition: user.php:4
File manager settings.
prepareOutput($a_show_subobjects=true)
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
$ret
Definition: parser.php:6

References $DIC, ilObjectGUI\$lng, $ret, addWebDAVSubTabs(), CMD_EDIT_DOWNLOADING_SETTINGS, ilObjectGUI\prepareOutput(), and user().

+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjFileAccessSettingsGUI::getAdminTabs ( )

Get tabs.

@access public

Reimplemented from ilObjectGUI.

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

153 {
154 global $DIC;
155 $rbacsystem = $DIC['rbacsystem'];
156
157 $GLOBALS['DIC']['lng']->loadLanguageModule('fm');
158
159 if ($rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
160 $this->tabs_gui->addTarget(
161 'downloading_settings',
162 $this->ctrl->getLinkTarget($this, self::CMD_EDIT_DOWNLOADING_SETTINGS),
163 array(self::CMD_EDIT_DOWNLOADING_SETTINGS, "view")
164 );
165
166 $this->tabs_gui->addTarget(
167 'upload_settings',
168 $this->ctrl->getLinkTarget($this, "editUploadSettings"),
169 array("editUploadSettings", "view")
170 );
171
172 $this->tabs_gui->addTarget(
173 'preview_settings',
174 $this->ctrl->getLinkTarget($this, "editPreviewSettings"),
175 array("editPreviewSettings", "view")
176 );
177
178 $this->tabs_gui->addTarget('webdav', $this->ctrl->getLinkTarget($this, "editWebDAVSettings"), array("editWebDAVSettings", "view"));
179
180 $this->tabs_gui->addTarget(
181 'fm_settings_tab',
182 $this->ctrl->getLinkTargetByClass('ilFMSettingsGUI', 'settings'),
183 array(),
184 'ilfmsettingsgui'
185 );
186
187 $this->tabs_gui->addTarget("disk_quota", $this->ctrl->getLinkTarget($this, "editDiskQuotaSettings"), array("editDiskQuota", "view"));
188 }
189 if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
190 $this->tabs_gui->addTarget("perm_settings", $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm"), array(), 'ilpermissiongui');
191 }
192 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64

References $DIC, $GLOBALS, and ilObjectGUI\$rbacsystem.

◆ initDiskQuotaMailTemplateForm()

ilObjFileAccessSettingsGUI::initDiskQuotaMailTemplateForm ( )
protected

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

732 {
733 global $DIC;
734 $lng = $DIC['lng'];
735
736 $lng->loadLanguageModule("meta");
737 $lng->loadLanguageModule("mail");
738
739 $form = new ilPropertyFormGUI();
740 $form->setFormAction($this->ctrl->getFormAction($this));
741
742 $form->setTitle($lng->txt("disk_quota_reminder_mail"));
743 $form->setDescription($lng->txt("disk_quota_reminder_mail_desc"));
744
745 foreach ($lng->getInstalledLanguages() as $lang_key) {
746 $lang_def = ($lang_key == $lng->getDefaultLanguage()) ? " (" . $lng->txt("default") . ")" : "";
747
748 $sec = new ilFormSectionHeaderGUI();
749 $sec->setTitle($lng->txt("meta_l_" . $lang_key) . $lang_def);
750 $form->addItem($sec);
751
752 $subj = new ilTextInputGUI($lng->txt("subject"), "subject_" . $lang_key);
753 $subj->setRequired(true);
754 $form->addItem($subj);
755
756 $sal_g = new ilTextInputGUI($lng->txt("mail_salutation_general"), "sal_g_" . $lang_key);
757 $sal_g->setRequired(true);
758 $form->addItem($sal_g);
759
760 $sal_f = new ilTextInputGUI($lng->txt("mail_salutation_female"), "sal_f_" . $lang_key);
761 $sal_f->setRequired(true);
762 $form->addItem($sal_f);
763
764 $sal_m = new ilTextInputGUI($lng->txt("mail_salutation_male"), "sal_m_" . $lang_key);
765 $sal_m->setRequired(true);
766 $form->addItem($sal_m);
767
768 $body = new ilTextAreaInputGUI($lng->txt("message_content"), "body_" . $lang_key);
769 $body->setRequired(true);
770 $body->setRows(10);
771 $form->addItem($body);
772
773 // current values
775 $subj->setValue($amail["subject"]);
776 $sal_g->setValue($amail["sal_g"]);
777 $sal_f->setValue($amail["sal_f"]);
778 $sal_m->setValue($amail["sal_m"]);
779 $body->setValue($amail["body"]);
780 }
781
782 $form->addCommandButton("saveDiskQuotaMailTemplate", $lng->txt("save"));
783 $form->addCommandButton("editDiskQuotaSettings", $lng->txt("cancel"));
784
785 return $form;
786 }
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 area property in a property form.
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 198 of file class.ilObjFileAccessSettingsGUI.php.

199 {
200 global $DIC;
201 $ilCtrl = $DIC['ilCtrl'];
202 $lng = $DIC['lng'];
203
204 require_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
205 require_once("./Services/Form/classes/class.ilCheckboxInputGUI.php");
206 require_once("./Services/Form/classes/class.ilRadioGroupInputGUI.php");
207 require_once("./Services/Form/classes/class.ilRadioOption.php");
208 require_once("./Services/Form/classes/class.ilTextAreaInputGUI.php");
209
210 $form = new ilPropertyFormGUI();
211 $form->setFormAction($ilCtrl->getFormAction($this));
212 $form->setTitle($lng->txt("settings"));
213
214 // Backwards compatibility with ILIAS 3.9: Use the name of the
215 // uploaded file as the filename for the downloaded file instead
216 // of the title of the file object.
217 $dl_prop = new ilCheckboxInputGUI($lng->txt("download_with_uploaded_filename"), "download_with_uploaded_filename");
218 $dl_prop->setValue('1');
219 // default value should reflect previous behaviour (-> 0)
220 $dl_prop->setChecked($this->object->isDownloadWithUploadedFilename() == 1);
221 $dl_prop->setInfo($lng->txt('download_with_uploaded_filename_info'));
222 $form->addItem($dl_prop);
223
224 // Show download action for folder
225 $dl_prop = new ilCheckboxInputGUI($lng->txt("enable_download_folder"), "enable_download_folder");
226 $dl_prop->setValue('1');
227 // default value should reflect previous behaviour (-> 0)
228 $dl_prop->setChecked($this->folderSettings->get("enable_download_folder", 0) == 1);
229 $dl_prop->setInfo($lng->txt('enable_download_folder_info'));
230 $form->addItem($dl_prop);
231
232 // multi download
233 $dl_prop = new ilCheckboxInputGUI($lng->txt("enable_multi_download"), "enable_multi_download");
234 $dl_prop->setValue('1');
235 // default value should reflect previous behaviour (-> 0)
236 $dl_prop->setChecked($this->folderSettings->get("enable_multi_download", 0) == 1);
237 $dl_prop->setInfo($lng->txt('enable_multi_download_info'));
238 $form->addItem($dl_prop);
239
240 // download limit
241 $lng->loadLanguageModule("bgtask");
242 $dl_prop = new ilNumberInputGUI($lng->txt("bgtask_setting_limit"), "bg_limit");
243 $dl_prop->setInfo($lng->txt("bgtask_setting_limit_info"));
244 $dl_prop->setRequired(true);
245 $dl_prop->setSize(10);
246 $dl_prop->setMinValue(1);
247 $dl_prop->setSuffix($lng->txt("lang_size_mb"));
248 $dl_prop->setValue($this->folderSettings->get("bgtask_download_limit", null));
249 $form->addItem($dl_prop);
250
251 // Inline file extensions
252 $tai_prop = new ilTextAreaInputGUI($lng->txt('inline_file_extensions'), 'inline_file_extensions');
253 $tai_prop->setValue($this->object->getInlineFileExtensions());
254 $tai_prop->setInfo($lng->txt('inline_file_extensions_info'));
255 $tai_prop->setCols(80);
256 $tai_prop->setRows(5);
257 $form->addItem($tai_prop);
258
259 // command buttons
260 $form->addCommandButton('saveDownloadingSettings', $lng->txt('save'));
261 $form->addCommandButton('view', $lng->txt('cancel'));
262
263 return $form;
264 }
This class represents a checkbox property in a property form.
This class represents a number property in a property form.

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

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 1021 of file class.ilObjFileAccessSettingsGUI.php.

1022 {
1023 global $DIC;
1024 $ilCtrl = $DIC['ilCtrl'];
1025 $lng = $DIC['lng'];
1026
1027 require_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
1028 $form = new ilPropertyFormGUI();
1029 $form->setFormAction($ilCtrl->getFormAction($this));
1030 $form->setTitle($lng->txt("settings"));
1031
1032 require_once("Services/Preview/classes/class.ilPreviewSettings.php");
1033
1034 // drag and drop file upload in repository
1035 $chk_prop = new ilCheckboxInputGUI($lng->txt("enable_preview"), "enable_preview");
1036 $chk_prop->setValue('1');
1037 $chk_prop->setChecked(ilPreviewSettings::isPreviewEnabled());
1038 $chk_prop->setInfo($lng->txt('enable_preview_info'));
1039 $form->addItem($chk_prop);
1040
1041 $num_prop = new ilNumberInputGUI($lng->txt("max_previews_per_object"), "max_previews_per_object");
1042 $num_prop->setDecimals(0);
1043 $num_prop->setMinValue(1);
1044 $num_prop->setMinvalueShouldBeGreater(false);
1045 $num_prop->setMaxValue(ilPreviewSettings::MAX_PREVIEWS_MAX);
1046 $num_prop->setMaxvalueShouldBeLess(false);
1047 $num_prop->setMaxLength(5);
1048 $num_prop->setSize(10);
1049 $num_prop->setValue(ilPreviewSettings::getMaximumPreviews());
1050 $num_prop->setInfo($lng->txt('max_previews_per_object_info'));
1051 $form->addItem($num_prop);
1052
1053 // command buttons
1054 $form->addCommandButton('savePreviewSettings', $lng->txt('save'));
1055 $form->addCommandButton('view', $lng->txt('cancel'));
1056
1057 return $form;
1058 }

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 863 of file class.ilObjFileAccessSettingsGUI.php.

864 {
865 global $DIC;
866 $ilCtrl = $DIC['ilCtrl'];
867 $lng = $DIC['lng'];
868
869 require_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
870 $form = new ilPropertyFormGUI();
871 $form->setFormAction($ilCtrl->getFormAction($this));
872 $form->setTitle($lng->txt("settings"));
873
874 require_once("Services/FileUpload/classes/class.ilFileUploadSettings.php");
875
876 // drag and drop file upload
877 $chk_enabled = new ilCheckboxInputGUI($lng->txt("enable_dnd_upload"), "enable_dnd_upload");
878 $chk_enabled->setValue('1');
879 $chk_enabled->setChecked(ilFileUploadSettings::isDragAndDropUploadEnabled());
880 $chk_enabled->setInfo($lng->txt('enable_dnd_upload_info'));
881 $form->addItem($chk_enabled);
882
883 // drag and drop file upload in repository
884 $chk_repo = new ilCheckboxInputGUI($lng->txt("enable_repository_dnd_upload"), "enable_repository_dnd_upload");
885 $chk_repo->setValue('1');
887 $chk_repo->setInfo($lng->txt('enable_repository_dnd_upload_info'));
888 $chk_enabled->addSubItem($chk_repo);
889
890 // concurrent uploads
891 $num_prop = new ilNumberInputGUI($lng->txt("concurrent_uploads"), "concurrent_uploads");
892 $num_prop->setDecimals(0);
893 $num_prop->setMinValue(1);
894 $num_prop->setMinvalueShouldBeGreater(false);
895 $num_prop->setMaxValue(ilFileUploadSettings::CONCURRENT_UPLOADS_MAX);
896 $num_prop->setMaxvalueShouldBeLess(false);
897 $num_prop->setMaxLength(5);
898 $num_prop->setSize(10);
899 $num_prop->setValue(ilFileUploadSettings::getConcurrentUploads());
900 $num_prop->setInfo($lng->txt('concurrent_uploads_info'));
901 $chk_enabled->addSubItem($num_prop);
902
903 // default white list
904 $ne = new ilNonEditableValueGUI($this->lng->txt("file_suffix_default_white"), "");
905 $ne->setValue(implode(", ", ilFileUtils::getDefaultValidExtensionWhiteList()));
906 $ne->setInfo($this->lng->txt("file_suffix_default_white_info"));
907 $form->addItem($ne);
908
909 // file suffix custom black list
910 $ta = new ilTextAreaInputGUI($this->lng->txt("file_suffix_custom_black"), "suffix_repl_additional");
911 $ta->setInfo($this->lng->txt("file_suffix_custom_black_info"));
912 $ta->setRows(5);
913 $form->addItem($ta);
914
915 // file suffix custom white list
916 $ta = new ilTextAreaInputGUI($this->lng->txt("file_suffix_custom_white"), "suffix_custom_white_list");
917 $ta->setInfo($this->lng->txt("file_suffix_custom_white_info"));
918 $ta->setRows(5);
919 $form->addItem($ta);
920
921 // resulting overall white list
922 $ne = new ilNonEditableValueGUI($this->lng->txt("file_suffix_overall_white"), "");
923 $ne->setValue(implode(", ", ilFileUtils::getValidExtensions()));
924 $ne->setInfo($this->lng->txt("file_suffix_overall_white_info"));
925 $form->addItem($ne);
926
927 // explicit blacklist
928 $ta = new ilTextAreaInputGUI($this->lng->txt("file_suffix_custom_expl_black"), "suffix_custom_expl_black");
929 $ta->setInfo($this->lng->txt("file_suffix_custom_expl_black_info"));
930 $ta->setRows(5);
931 $form->addItem($ta);
932
933 // command buttons
934 $form->addCommandButton('saveUploadSettings', $lng->txt('save'));
935 $form->addCommandButton('view', $lng->txt('cancel'));
936
937 return $form;
938 }
static getDefaultValidExtensionWhiteList()
Valid extensions.
static getValidExtensions()
Valid extensions.
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:

◆ initWebDAVSettingsForm()

ilObjFileAccessSettingsGUI::initWebDAVSettingsForm ( )
protected

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

341 {
342 global $DIC;
343
344 $lng = $DIC->language();
345
346 $form = new ilPropertyFormGUI();
347 $form->setFormAction($DIC->ctrl()->getFormAction($this));
348 $form->setTitle($lng->txt("settings"));
349
350 // Enable webdav
351 $cb_prop = new ilCheckboxInputGUI($lng->txt("enable_webdav"), "enable_webdav");
352 $cb_prop->setValue('1');
353 $cb_prop->setChecked($this->object->isWebdavEnabled());
354 $form->addItem($cb_prop);
355
356 // Enable versioning
357 $cb_prop = new ilCheckboxInputGUI($lng->txt("webdav_enable_versioning"), "enable_versioning_webdav");
358 $cb_prop->setValue('1');
359 $cb_prop->setInfo($lng->txt("webdav_versioning_info"));
360 $cb_prop->setChecked($this->object->isWebdavVersioningEnabled());
361 $form->addItem($cb_prop);
362
363 // command buttons
364 $form->addCommandButton('saveWebDAVSettings', $lng->txt('save'));
365 $form->addCommandButton('view', $lng->txt('cancel'));
366
367 return $form;
368 }

References $DIC, and ilObjectGUI\$lng.

Referenced by editWebDAVSettings(), and saveWebDAVSettings().

+ Here is the caller graph for this function:

◆ sanitize()

ilObjFileAccessSettingsGUI::sanitize ( )

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

291 {
292 global $DIC;
293
294 $report = $DIC->backgroundTasks()->taskFactory()->createTask(SanitationReportJob::class);
295 $ui = $DIC->backgroundTasks()->taskFactory()->createTask(DownloadSanitationReportUserInteraction::class, [$report]);
296
297 $bucket = new BasicBucket();
298 $bucket->setUserId($DIC->user()->getId());
299 $bucket->setTask($ui);
300 $bucket->setTitle("File Sanitiation Report");
301 $bucket->setDescription("");
302
303 $DIC->backgroundTasks()->taskManager()->run($bucket);
304 $this->ctrl->redirect($this, self::CMD_EDIT_DOWNLOADING_SETTINGS);
305 }

References $DIC.

◆ saveDiskQuotaMailTemplate()

ilObjFileAccessSettingsGUI::saveDiskQuotaMailTemplate ( )

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

834 {
835 global $DIC;
836 $lng = $DIC['lng'];
837
838 $form = $this->initDiskQuotaMailTemplateForm();
839 if ($form->checkInput()) {
840 foreach ($lng->getInstalledLanguages() as $lang_key) {
841 $this->disk_quota_obj->_writeReminderMailTemplate(
842 $lang_key,
843 $form->getInput("subject_" . $lang_key),
844 $form->getInput("sal_g_" . $lang_key),
845 $form->getInput("sal_f_" . $lang_key),
846 $form->getInput("sal_m_" . $lang_key),
847 $form->getInput("body_" . $lang_key)
848 );
849 }
850
851 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
852 $this->ctrl->redirect($this, "editDiskQuotaMailTemplate");
853 }
854
855 $form->setValuesByPost();
856 $this->editDiskQuotaMailTemplate($form);
857 }
editDiskQuotaMailTemplate(ilPropertyFormGUI $a_form=null)
Edit disk quota settings.

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

+ Here is the call graph for this function:

◆ saveDiskQuotaSettings()

ilObjFileAccessSettingsGUI::saveDiskQuotaSettings ( )

Save disk quota settings.

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

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

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

◆ saveDownloadingSettings()

ilObjFileAccessSettingsGUI::saveDownloadingSettings ( )

Save settings.

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

312 {
313 global $DIC;
314 $rbacsystem = $DIC['rbacsystem'];
315
316 if (!$rbacsystem->checkAccess("write", $this->object->getRefId())) {
317 ilUtil::sendFailure($DIC->language()->txt("no_permission"), true);
318 $DIC->ctrl()->redirect($this, self::CMD_EDIT_DOWNLOADING_SETTINGS);
319 }
320
321 $form = $this->initDownloadingSettingsForm();
322 if ($form->checkInput()) {
323 $this->object->setDownloadWithUploadedFilename(ilUtil::stripSlashes($_POST['download_with_uploaded_filename']));
324 $this->object->setInlineFileExtensions(ilUtil::stripSlashes($_POST['inline_file_extensions']));
325 $this->object->update();
326
327 $this->folderSettings->set("enable_download_folder", $_POST["enable_download_folder"] == 1);
328 $this->folderSettings->set("enable_multi_download", $_POST["enable_multi_download"] == 1);
329
330 $this->folderSettings->set("bgtask_download_limit", (int) $_POST["bg_limit"]);
331 ilUtil::sendSuccess($DIC->language()->txt('settings_saved'), true);
332 $DIC->ctrl()->redirect($this, self::CMD_EDIT_DOWNLOADING_SETTINGS);
333 }
334
335 $form->setValuesByPost();
336 $this->editDownloadingSettings($form);
337 }
$_POST["username"]
editDownloadingSettings(ilPropertyFormGUI $a_form=null)
Edit settings.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

References $_POST, $DIC, ilObjectGUI\$rbacsystem, editDownloadingSettings(), initDownloadingSettingsForm(), ilUtil\sendFailure(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ savePreviewSettings()

ilObjFileAccessSettingsGUI::savePreviewSettings ( )

Save preview settings.

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

1117 {
1118 global $DIC;
1119 $rbacsystem = $DIC['rbacsystem'];
1120 $ilErr = $DIC['ilErr'];
1121 $ilCtrl = $DIC['ilCtrl'];
1122 $tpl = $DIC['tpl'];
1123 $lng = $DIC['lng'];
1124
1125 $this->tabs_gui->setTabActive('preview_settings');
1126
1127 if (!$rbacsystem->checkAccess("write", $this->object->getRefId())) {
1128 $ilErr->raiseError($lng->txt("no_permission"), $ilErr->WARNING);
1129 }
1130
1131 // get form
1132 $form = $this->initPreviewSettingsForm();
1133 if ($form->checkInput()) {
1134 require_once("Services/Preview/classes/class.ilPreviewSettings.php");
1135 ilPreviewSettings::setPreviewEnabled($_POST["enable_preview"] == 1);
1136 ilPreviewSettings::setMaximumPreviews($_POST["max_previews_per_object"]);
1137
1138 ilUtil::sendSuccess($lng->txt('settings_saved'), true);
1139 $ilCtrl->redirect($this, "editPreviewSettings");
1140 } else {
1141 $form->setValuesByPost();
1142 $tpl->setContent($form->getHTML());
1143 }
1144 }
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, ilObjectGUI\$ilErr, ilObjectGUI\$lng, ilObjectGUI\$rbacsystem, ilObjectGUI\$tpl, initPreviewSettingsForm(), ilPreviewSettings\setMaximumPreviews(), and ilPreviewSettings\setPreviewEnabled().

+ Here is the call graph for this function:

◆ saveUploadSettings()

ilObjFileAccessSettingsGUI::saveUploadSettings ( )

Save upload settings.

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

983 {
984 global $DIC;
985 $rbacsystem = $DIC['rbacsystem'];
986 $ilErr = $DIC['ilErr'];
987 $ilCtrl = $DIC['ilCtrl'];
988 $lng = $DIC['lng'];
989 $tpl = $DIC['tpl'];
990 $ilSetting = $DIC['ilSetting'];
991
992 if (!$rbacsystem->checkAccess("write", $this->object->getRefId())) {
993 $ilErr->raiseError($lng->txt("no_permission"), $ilErr->WARNING);
994 }
995
996 // get form
997 $form = $this->initUploadSettingsForm();
998 if ($form->checkInput()) {
999 require_once("Services/FileUpload/classes/class.ilFileUploadSettings.php");
1001 ilFileUploadSettings::setRepositoryDragAndDropUploadEnabled($_POST["enable_repository_dnd_upload"] == 1);
1003
1004 // file suffic replacements
1005 $ilSetting->set("suffix_repl_additional", $_POST["suffix_repl_additional"]);
1006 $ilSetting->set("suffix_custom_white_list", $_POST["suffix_custom_white_list"]);
1007 $ilSetting->set("suffix_custom_expl_black", $_POST["suffix_custom_expl_black"]);
1008
1009 ilUtil::sendSuccess($lng->txt('settings_saved'), true);
1010 $ilCtrl->redirect($this, "editUploadSettings");
1011 } else {
1012 $form->setValuesByPost();
1013 $tpl->setContent($form->getHTML());
1014 }
1015 }
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, ilObjectGUI\$ilErr, $ilSetting, ilObjectGUI\$lng, ilObjectGUI\$rbacsystem, ilObjectGUI\$tpl, initUploadSettingsForm(), ilFileUploadSettings\setConcurrentUploads(), ilFileUploadSettings\setDragAndDropUploadEnabled(), and ilFileUploadSettings\setRepositoryDragAndDropUploadEnabled().

+ Here is the call graph for this function:

◆ saveWebDAVSettings()

ilObjFileAccessSettingsGUI::saveWebDAVSettings ( )

Save settings.

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

413 {
414 global $DIC;
415 $rbacsystem = $DIC['rbacsystem'];
416 $ilErr = $DIC['ilErr'];
417 $ilCtrl = $DIC['ilCtrl'];
418 $lng = $DIC['lng'];
419
420 if (!$rbacsystem->checkAccess("write", $this->object->getRefId())) {
421 ilUtil::sendFailure($DIC->language()->txt('no_permission'), true);
422 $DIC->ctrl()->redirect($this, self::CMD_EDIT_WEBDAV_SETTINGS);
423 }
424
425 $form = $this->initWebDAVSettingsForm();
426 if ($form->checkInput()) {
427 $this->object->setWebdavEnabled($_POST['enable_webdav'] == '1');
428 $this->object->setWebdavVersioningEnabled($_POST['enable_versioning_webdav'] == '1');
429 $this->object->update();
430 ilUtil::sendSuccess($lng->txt('settings_saved'), true);
431 $ilCtrl->redirect($this, self::CMD_EDIT_WEBDAV_SETTINGS);
432 } else {
433 $form->setValuesByPost();
434 $this->tpl->setContent($form->getHTML());
435 }
436 }

References $_POST, $DIC, $ilCtrl, ilObjectGUI\$ilErr, ilObjectGUI\$lng, ilObjectGUI\$rbacsystem, initWebDAVSettingsForm(), and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ setTitleAndDescription()

ilObjFileAccessSettingsGUI::setTitleAndDescription ( )

called by prepare output

Reimplemented from ilObjectGUI.

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

443 {
444 parent::setTitleAndDescription();
445 $this->tpl->setDescription($this->object->getDescription());
446 }

◆ 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 534 of file class.ilObjFileAccessSettingsGUI.php.

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

References $_GET, $_POST, $_SESSION, ilObjectGUI\$data, $DIC, $i, ilObjectGUI\$ilErr, $ilSetting, ilObjectGUI\$lng, ilObjectGUI\$rbacsystem, 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 52 of file class.ilObjFileAccessSettingsGUI.php.

◆ $folderSettings

ilObjFileAccessSettingsGUI::$folderSettings
protected

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

◆ CMD_EDIT_DOWNLOADING_SETTINGS

const ilObjFileAccessSettingsGUI::CMD_EDIT_DOWNLOADING_SETTINGS = 'editDownloadingSettings'

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

Referenced by executeCommand().

◆ CMD_EDIT_WEBDAV_SETTINGS

const ilObjFileAccessSettingsGUI::CMD_EDIT_WEBDAV_SETTINGS = 'editWebDAVSettings'

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

◆ CMD_SANITIZE

const ilObjFileAccessSettingsGUI::CMD_SANITIZE = 'sanitize'

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


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