ILIAS  release_4-4 Revision
ilObjFileAccessSettingsGUI Class Reference
+ Inheritance diagram for ilObjFileAccessSettingsGUI:
+ Collaboration diagram for ilObjFileAccessSettingsGUI:

Public Member Functions

 ilObjFileAccessSettingsGUI ($a_data, $a_id, $a_call_by_reference)
 Constructor public. More...
 
 executeCommand ()
 Execute command. More...
 
 getAdminTabs ()
 Get tabs. More...
 
 editDownloadingSettings ()
 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 ()
 
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 ()
 Edit disk quota settings. More...
 
 cancelDiskQuotaMailTemplate ()
 
 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
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public. More...
 
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...
 
 getAdminTabs (&$tabs_gui)
 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 ($in_rep=false)
 cancel action and go back to previous page 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...
 
 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...
 

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 Member Functions inherited from ilObjectGUI
 assignObject ()
 
 prepareOutput ()
 prepare output More...
 
 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 public More...
 
 setAdminTabs ()
 set admin tabs 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...
 
 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)
 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...
 
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste More...
 
 getTabs (&$tabs_gui)
 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 ($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...
 

Detailed Description

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

Member Function Documentation

◆ addDiskQuotaSubtabs()

ilObjFileAccessSettingsGUI::addDiskQuotaSubtabs (   $a_active_subtab)

Add disk quota subtabs.

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

References $ilCtrl, and ilDiskQuotaActivationChecker\_isActive().

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

350  {
351  global $ilCtrl, $ilTabs;
352 
353  include_once("./Services/COPage/classes/class.ilPageEditorSettings.php");
354 
355  $ilTabs->addSubTabTarget("settings",
356  $ilCtrl->getLinkTarget($this, "editDiskQuotaSettings"),
357  array("editDiskQuotaSettings"));
358 
359  require_once 'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
361  {
362  $ilTabs->addSubTabTarget("disk_quota_report",
363  $ilCtrl->getLinkTarget($this, "viewDiskQuotaReport"),
364  array("viewDiskQuotaReport"));
365  }
366 
367  $ilTabs->addSubTabTarget("disk_quota_reminder_mail",
368  $ilCtrl->getLinkTarget($this, "editDiskQuotaMailTemplate"),
369  array("editDiskQuotaMailTemplate"));
370 
371  $ilTabs->setSubTabActive($a_active_subtab);
372  }
global $ilCtrl
Definition: ilias.php:18
+ 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 1003 of file class.ilObjFileAccessSettingsGUI.php.

References $ilSetting, and ilAdministrationSettingsFormHandler\FORM_SECURITY.

1004  {
1005  global $ilSetting;
1006 
1007  switch($a_form_id)
1008  {
1010 
1011  $fields = array('file_suffix_repl' => $ilSetting->get("suffix_repl_additional"));
1012 
1013  return array(array("editUploadSettings", $fields));
1014  }
1015  }
global $ilSetting
Definition: privfeed.php:40

◆ cancelDiskQuotaMailTemplate()

ilObjFileAccessSettingsGUI::cancelDiskQuotaMailTemplate ( )

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

740  {
741  $this->ctrl->redirect($this, "editDiskQuotaSettings");
742  }

◆ editDiskQuotaMailTemplate()

ilObjFileAccessSettingsGUI::editDiskQuotaMailTemplate ( )

Edit disk quota settings.

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

References $ilCtrl, $ilErr, $ilSetting, ilObjectGUI\$lng, ilObjectGUI\$tpl, addDiskQuotaSubtabs(), ilUtil\getImagePath(), and ilUtil\prepareFormOutput().

667  {
668  global $rbacsystem, $ilErr, $ilSetting, $tpl, $lng, $ilCtrl;
669 
670  if (! $rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
671  {
672  $ilErr->raiseError($lng->txt("no_permission"),$ilErr->WARNING);
673  }
674 
675  $this->tabs_gui->setTabActive('disk_quota');
676  $this->addDiskQuotaSubtabs('disk_quota_reminder_mail');
677 
678  $this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.disk_quota_reminder_mail.html',
679  "Services/WebDAV");
680  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
681  $this->tpl->setVariable("IMG_MAIL", ilUtil::getImagePath("icon_mail.png"));
682 
683  $lng->loadLanguageModule("meta");
684  $lng->loadLanguageModule("mail");
685  $this->tpl->setVariable("TXT_NEW_USER_ACCOUNT_MAIL", $lng->txt("disk_quota_reminder_mail"));
686  $this->tpl->setVariable("TXT_NEW_USER_ACCOUNT_MAIL_DESC", $lng->txt("disk_quota_reminder_mail_desc"));
687 
688  // placeholder help text
689  $this->tpl->setVariable("TXT_USE_PLACEHOLDERS", $lng->txt("mail_nacc_use_placeholder"));
690  $this->tpl->setVariable("TXT_MAIL_SALUTATION", $lng->txt("mail_nacc_salutation"));
691  $this->tpl->setVariable("TXT_FIRST_NAME", $lng->txt("firstname"));
692  $this->tpl->setVariable("TXT_LAST_NAME", $lng->txt("lastname"));
693  $this->tpl->setVariable("TXT_EMAIL", $lng->txt("email"));
694  $this->tpl->setVariable("TXT_LOGIN", $lng->txt("mail_nacc_login"));
695  $this->tpl->setVariable("TXT_DISK_QUOTA", $lng->txt("disk_quota"));
696  $this->tpl->setVariable("TXT_DISK_USAGE", $lng->txt("disk_usage"));
697  $this->tpl->setVariable("TXT_DISK_USAGE_DETAILS", $lng->txt("disk_usage_details"));
698  $this->tpl->setVariable("TXT_ADMIN_MAIL", $lng->txt("mail_nacc_admin_mail"));
699  $this->tpl->setVariable("TXT_ILIAS_URL", $lng->txt("mail_nacc_ilias_url"));
700  $this->tpl->setVariable("TXT_CLIENT_NAME", $lng->txt("mail_nacc_client_name"));
701 
702  $langs = $lng->getInstalledLanguages();
703  foreach($langs as $lang_key)
704  {
705  $amail = $this->disk_quota_obj->_lookupReminderMailTemplate($lang_key);
706  $this->tpl->setCurrentBlock("mail_block");
707  $add = "";
708  if ($lang_key == $lng->getDefaultLanguage())
709  {
710  $add = " (".$lng->txt("default").")";
711  }
712  $this->tpl->setVariable("TXT_LANGUAGE",
713  $lng->txt("meta_l_".$lang_key).$add);
714  $this->tpl->setVariable("TXT_BODY", $lng->txt("message_content"));
715  $this->tpl->setVariable("TA_BODY", "body_".$lang_key);
716  $this->tpl->setVariable("VAL_BODY",
717  ilUtil::prepareFormOutput($amail["body"]));
718  $this->tpl->setVariable("TXT_SUBJECT", $lng->txt("subject"));
719  $this->tpl->setVariable("INPUT_SUBJECT", "subject_".$lang_key);
720  $this->tpl->setVariable("VAL_SUBJECT",
721  ilUtil::prepareFormOutput($amail["subject"]));
722  $this->tpl->setVariable("TXT_SAL_G", $lng->txt("mail_salutation_general"));
723  $this->tpl->setVariable("INPUT_SAL_G", "sal_g_".$lang_key);
724  $this->tpl->setVariable("VAL_SAL_G",
725  ilUtil::prepareFormOutput($amail["sal_g"]));
726  $this->tpl->setVariable("TXT_SAL_M", $lng->txt("mail_salutation_male"));
727  $this->tpl->setVariable("INPUT_SAL_M", "sal_m_".$lang_key);
728  $this->tpl->setVariable("VAL_SAL_M",
729  ilUtil::prepareFormOutput($amail["sal_m"]));
730  $this->tpl->setVariable("TXT_SAL_F", $lng->txt("mail_salutation_female"));
731  $this->tpl->setVariable("INPUT_SAL_F", "sal_f_".$lang_key);
732  $this->tpl->setVariable("VAL_SAL_F",
733  ilUtil::prepareFormOutput($amail["sal_f"]));
734  $this->tpl->parseCurrentBlock();
735  }
736  $this->tpl->setVariable("TXT_CANCEL", $lng->txt("cancel"));
737  $this->tpl->setVariable("TXT_SAVE", $lng->txt("save"));
738  }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
global $ilCtrl
Definition: ilias.php:18
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
global $ilSetting
Definition: privfeed.php:40
addDiskQuotaSubtabs($a_active_subtab)
Add disk quota subtabs.
+ Here is the call graph for this function:

◆ editDiskQuotaSettings()

ilObjFileAccessSettingsGUI::editDiskQuotaSettings ( )

Edit disk quota settings.

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

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

379  {
380  global $rbacsystem, $ilErr, $ilSetting, $tpl, $lng, $ilCtrl;
381 
382 
383  if (! $rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
384  {
385  $ilErr->raiseError($lng->txt("no_permission"),$ilErr->WARNING);
386  }
387 
388  $this->tabs_gui->setTabActive('disk_quota');
389  $this->addDiskQuotaSubtabs('settings');
390 
391  require_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
392  require_once("./Services/Form/classes/class.ilCheckboxInputGUI.php");
393  require_once("./Services/Form/classes/class.ilRadioGroupInputGUI.php");
394  require_once("./Services/Form/classes/class.ilRadioOption.php");
395  require_once("./Services/Form/classes/class.ilTextAreaInputGUI.php");
396  require_once("./Services/WebDAV/classes/class.ilDAVServer.php");
397 
398  $lng->loadLanguageModule("file");
399 
400  $form = new ilPropertyFormGUI();
401  $form->setFormAction($ilCtrl->getFormAction($this));
402  $form->setTitle($lng->txt("settings"));
403 
404  include_once "Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php";
407  $form,
408  $this
409  );
410 
411  /*
412  // command buttons
413  $form->addCommandButton('saveDiskQuotaSettings', $lng->txt('save'));
414  $form->addCommandButton('editDiskQuotaSettings', $lng->txt('cancel'));
415  */
416 
417  $tpl->setContent($form->getHTML());
418  }
This class represents a property form user interface.
static addFieldsToForm($a_form_id, ilPropertyFormGUI $a_form, ilObjectGUI $a_parent_gui)
global $ilCtrl
Definition: ilias.php:18
global $ilSetting
Definition: privfeed.php:40
addDiskQuotaSubtabs($a_active_subtab)
Add disk quota subtabs.
+ Here is the call graph for this function:

◆ editDownloadingSettings()

ilObjFileAccessSettingsGUI::editDownloadingSettings ( )

Edit settings.

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

References $ilCtrl, $ilErr, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObjectGUI\$tree, ilCheckboxInputGUI\setValue(), and ilTextAreaInputGUI\setValue().

161  {
162  global $rbacsystem, $ilErr, $ilTabs;
163 
164  $this->tabs_gui->setTabActive('downloading_settings');
165 
166  if (! $rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
167  {
168  $ilErr->raiseError($lng->txt("no_permission"),$ilErr->WARNING);
169  }
170 
171  global $tpl, $ilCtrl, $lng, $tree, $settings;
172 
173  require_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
174  require_once("./Services/Form/classes/class.ilCheckboxInputGUI.php");
175  require_once("./Services/Form/classes/class.ilRadioGroupInputGUI.php");
176  require_once("./Services/Form/classes/class.ilRadioOption.php");
177  require_once("./Services/Form/classes/class.ilTextAreaInputGUI.php");
178 
179  $form = new ilPropertyFormGUI();
180  $form->setFormAction($ilCtrl->getFormAction($this));
181  $form->setTitle($lng->txt("settings"));
182 
183  // Backwards compatibility with ILIAS 3.9: Use the name of the
184  // uploaded file as the filename for the downloaded file instead
185  // of the title of the file object.
186  $dl_prop = new ilCheckboxInputGUI($lng->txt("download_with_uploaded_filename"), "download_with_uploaded_filename");
187  $dl_prop->setValue('1');
188  // default value should reflect previous behaviour (-> 0)
189  $dl_prop->setChecked($this->object->isDownloadWithUploadedFilename() == 1);
190  $dl_prop->setInfo($lng->txt('download_with_uploaded_filename_info'));
191  $form->addItem($dl_prop);
192 
193  // Show download action for folder
194  $dl_prop = new ilCheckboxInputGUI($lng->txt("enable_download_folder"), "enable_download_folder");
195  $dl_prop->setValue('1');
196  // default value should reflect previous behaviour (-> 0)
197  $dl_prop->setChecked($this->folderSettings->get("enable_download_folder", 0) == 1);
198  $dl_prop->setInfo($lng->txt('enable_download_folder_info'));
199  $form->addItem($dl_prop);
200 
201  // multi download
202  $dl_prop = new ilCheckboxInputGUI($lng->txt("enable_multi_download"), "enable_multi_download");
203  $dl_prop->setValue('1');
204  // default value should reflect previous behaviour (-> 0)
205  $dl_prop->setChecked($this->folderSettings->get("enable_multi_download", 0) == 1);
206  $dl_prop->setInfo($lng->txt('enable_multi_download_info'));
207  $form->addItem($dl_prop);
208 
209  // Inline file extensions
210  $tai_prop = new ilTextAreaInputGUI($lng->txt('inline_file_extensions'), 'inline_file_extensions');
211  $tai_prop->setValue($this->object->getInlineFileExtensions());
212  $tai_prop->setInfo($lng->txt('inline_file_extensions_info'));
213  $tai_prop->setCols(80);
214  $tai_prop->setRows(5);
215  $form->addItem($tai_prop);
216 
217 
218  // command buttons
219  $form->addCommandButton('saveDownloadingSettings', $lng->txt('save'));
220  $form->addCommandButton('view', $lng->txt('cancel'));
221 
222  $tpl->setContent($form->getHTML());
223  }
This class represents a property form user interface.
setValue($a_value)
Set Value.
This class represents a checkbox property in a property form.
global $ilCtrl
Definition: ilias.php:18
setValue($a_value)
Set Value.
This class represents a text area property in a property form.
+ Here is the call graph for this function:

◆ editPreviewSettings()

ilObjFileAccessSettingsGUI::editPreviewSettings ( )

Edit preview settings.

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

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

926  {
927  global $rbacsystem, $ilErr, $tpl, $lng;
928 
929  $this->tabs_gui->setTabActive('preview_settings');
930 
931  if (!$rbacsystem->checkAccess("visible,read", $this->object->getRefId()))
932  {
933  $ilErr->raiseError($lng->txt("no_permission"),$ilErr->WARNING);
934  }
935 
936  // set warning if ghostscript not installed
937  if (!is_file(PATH_TO_GHOSTSCRIPT))
938  {
939  ilUtil::sendInfo($lng->txt("ghostscript_not_configured"));
940  }
941 
942  // get form
943  $form = $this->initPreviewSettingsForm();
944 
945  // set current values
946  require_once("Services/Preview/classes/class.ilPreviewSettings.php");
947 
948  $val = array();
949  $val["enable_preview"] = ilPreviewSettings::isPreviewEnabled();
950  $val["max_previews_per_object"] = ilPreviewSettings::getMaximumPreviews();
951  $form->setValuesByArray($val);
952 
953  $html = $form->getHTML();
954 
955  // build renderer HTML
956  require_once("Services/Preview/classes/class.ilRendererFactory.php");
957  require_once("Services/Preview/classes/class.ilRendererTableGUI.php");
958 
959  $renderers = ilRendererFactory::getRenderers();
960 
961  $table = new ilRendererTableGUI($this, array("editPreviewSettings", "view"));
962  $table->setMaxCount(sizeof($renderers));
963  $table->setData($renderers);
964 
965  $html .= "<br/>" . $table->getHTML();
966 
967  // set content
968  $tpl->setContent($html);
969  }
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.
initPreviewSettingsForm()
Initializes the preview settings form.
static getMaximumPreviews()
Gets the maximum number of preview pictures per object.
static isPreviewEnabled()
Gets whether the preview functionality is enabled.
+ Here is the call graph for this function:

◆ editUploadSettings()

ilObjFileAccessSettingsGUI::editUploadSettings ( )

Edit upload settings.

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

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

821  {
822  global $rbacsystem, $ilErr, $tpl, $lng, $ilSetting;
823 
824  $this->tabs_gui->setTabActive('upload_settings');
825 
826  if (!$rbacsystem->checkAccess("visible,read", $this->object->getRefId()))
827  {
828  $ilErr->raiseError($lng->txt("no_permission"),$ilErr->WARNING);
829  }
830 
831  // get form
832  $form = $this->initUploadSettingsForm();
833 
834  require_once("Services/FileUpload/classes/class.ilFileUploadSettings.php");
835 
836  // set current values
837  $val = array();
838  $val["enable_dnd_upload"] = ilFileUploadSettings::isDragAndDropUploadEnabled();
839  $val["enable_repository_dnd_upload"] = ilFileUploadSettings::isRepositoryDragAndDropUploadEnabled();
840  $val["concurrent_uploads"] = ilFileUploadSettings::getConcurrentUploads();
841  $val["suffix_repl_additional"] = $ilSetting->get("suffix_repl_additional");
842  $form->setValuesByArray($val);
843 
844  // set content
845  $tpl->setContent($form->getHTML());
846  }
static getConcurrentUploads()
Gets the number of files that can be uploaded at the same time.
static isRepositoryDragAndDropUploadEnabled()
Gets whether drag and drop file upload in the repository is enabled.
initUploadSettingsForm()
Initializes the upload settings form.
global $ilSetting
Definition: privfeed.php:40
static isDragAndDropUploadEnabled()
Gets whether drag and drop file upload is enabled.
+ Here is the call graph for this function:

◆ editWebDAVSettings()

ilObjFileAccessSettingsGUI::editWebDAVSettings ( )

Edit settings.

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

References $ilCtrl, $ilErr, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObjectGUI\$tree, ilRadioGroupInputGUI\addOption(), ilDAVServer\getInstance(), and ilCheckboxInputGUI\setValue().

252  {
253  global $rbacsystem, $ilErr, $ilTabs;
254  global $tpl, $ilCtrl, $lng, $tree, $settings;
255 
256 
257  $this->tabs_gui->setTabActive('webdav');
258 
259  if (! $rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
260  {
261  $ilErr->raiseError($lng->txt("no_permission"),$ilErr->WARNING);
262  }
263 
264  require_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
265  require_once("./Services/Form/classes/class.ilCheckboxInputGUI.php");
266  require_once("./Services/Form/classes/class.ilRadioGroupInputGUI.php");
267  require_once("./Services/Form/classes/class.ilRadioOption.php");
268  require_once("./Services/Form/classes/class.ilTextAreaInputGUI.php");
269  require_once("./Services/WebDAV/classes/class.ilDAVServer.php");
270 
271  $form = new ilPropertyFormGUI();
272  $form->setFormAction($ilCtrl->getFormAction($this));
273  $form->setTitle($lng->txt("settings"));
274 
275  // Enable webdav
276  $ilDAVServer = ilDAVServer::getInstance();
277  $isPearAuthHTTPInstalled = @include_once("Auth/HTTP.php");
278  $cb_prop = new ilCheckboxInputGUI($lng->txt("enable_webdav"), "enable_webdav");
279  $cb_prop->setValue('1');
280  $cb_prop->setChecked($this->object->isWebdavEnabled() && $isPearAuthHTTPInstalled);
281  $cb_prop->setDisabled(! $isPearAuthHTTPInstalled);
282  $cb_prop->setInfo($isPearAuthHTTPInstalled ?
283  sprintf($lng->txt('enable_webdav_info'),$ilDAVServer->getMountURI($tree->getRootId(),0,null,null,true)) :
284  $lng->txt('webdav_pear_auth_http_needed')
285  );
286  $form->addItem($cb_prop);
287 
288  // Webdav help text
289  if ($isPearAuthHTTPInstalled)
290  {
291  $rgi_prop = new ilRadioGroupInputGUI($lng->txt('webfolder_instructions'), 'custom_webfolder_instructions_choice');
292  $rgi_prop->addOption(new ilRadioOption($lng->txt('use_default_instructions'), 'default'));
293  $rgi_prop->addOption(new ilRadioOption($lng->txt('use_customized_instructions'), 'custom'));
294  $rgi_prop->setValue($this->object->isCustomWebfolderInstructionsEnabled() ? 'custom':'default');
295  $rgi_prop->setDisabled(! $isPearAuthHTTPInstalled);
296  $form->addItem($rgi_prop);
297  $tai_prop = new ilTextAreaInputGUI('', 'custom_webfolder_instructions');
298  $tai_prop->setValue($this->object->getCustomWebfolderInstructions());
299  $tai_prop->setInfo($lng->txt("webfolder_instructions_info"));
300  $tai_prop->setCols(80);
301  $tai_prop->setRows(20);
302  $tai_prop->setDisabled(! $isPearAuthHTTPInstalled);
303  $form->addItem($tai_prop);
304  }
305 
306  // command buttons
307  $form->addCommandButton('saveWebDAVSettings', $lng->txt('save'));
308  $form->addCommandButton('view', $lng->txt('cancel'));
309 
310  $tpl->setContent($form->getHTML());
311  }
This class represents an option in a radio group.
This class represents a property form user interface.
This class represents a checkbox property in a property form.
global $ilCtrl
Definition: ilias.php:18
This class represents a property in a property form.
addOption($a_option)
Add Option.
setValue($a_value)
Set Value.
static getInstance()
Get singelton iunstance.
This class represents a text area property in a property form.
+ Here is the call graph for this function:

◆ executeCommand()

ilObjFileAccessSettingsGUI::executeCommand ( )

Execute command.

public

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

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

67  {
68  global $rbacsystem,$ilErr,$ilAccess, $ilias, $lng;
69 
70  $next_class = $this->ctrl->getNextClass($this);
71  $cmd = $this->ctrl->getCmd();
72 
73  $this->prepareOutput();
74 
75  if(!$ilAccess->checkAccess('read','',$this->object->getRefId()))
76  {
77  $ilias->raiseError($lng->txt('no_permission'),$ilias->error_obj->MESSAGE);
78  }
79 
80  switch($next_class)
81  {
82  case 'ilpermissiongui':
83  $this->tabs_gui->setTabActive('perm_settings');
84  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
85  $perm_gui =& new ilPermissionGUI($this);
86  $ret =& $this->ctrl->forwardCommand($perm_gui);
87  break;
88 
89  case 'ilfmsettingsgui':
90  $this->tabs_gui->setTabActive('fm_settings_tab');
91  include_once './Services/WebServices/FileManager/classes/class.ilFMSettingsGUI.php';
92  $fmg = new ilFMSettingsGUI($this);
93  $this->ctrl->forwardCommand($fmg);
94  break;
95 
96  default:
97  if(!$cmd || $cmd == 'view')
98  {
99  $cmd = "editDownloadingSettings";
100  }
101 
102  $this->$cmd();
103  break;
104  }
105  return true;
106  }
$cmd
Definition: sahs_server.php:35
prepareOutput()
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
File manager settings.
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjFileAccessSettingsGUI::getAdminTabs ( )

Get tabs.

public

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

References $GLOBALS.

115  {
116  global $rbacsystem, $ilAccess;
117 
118  $GLOBALS['lng']->loadLanguageModule('fm');
119 
120  if ($rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
121  {
122  $this->tabs_gui->addTarget('downloading_settings',
123  $this->ctrl->getLinkTarget($this, "editDownloadingSettings"),
124  array("editDownloadingSettings", "view"));
125 
126  $this->tabs_gui->addTarget('upload_settings',
127  $this->ctrl->getLinkTarget($this, "editUploadSettings"),
128  array("editUploadSettings", "view"));
129 
130  $this->tabs_gui->addTarget('preview_settings',
131  $this->ctrl->getLinkTarget($this, "editPreviewSettings"),
132  array("editPreviewSettings", "view"));
133 
134  $this->tabs_gui->addTarget('webdav',
135  $this->ctrl->getLinkTarget($this, "editWebDAVSettings"),
136  array("editWebDAVSettings", "view"));
137 
138  $this->tabs_gui->addTarget(
139  'fm_settings_tab',
140  $this->ctrl->getLinkTargetByClass('ilFMSettingsGUI','settings'),
141  array(),
142  'ilfmsettingsgui'
143  );
144 
145  $this->tabs_gui->addTarget("disk_quota",
146  $this->ctrl->getLinkTarget($this, "editDiskQuotaSettings"),
147  array("editDiskQuota", "view"));
148  }
149  if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
150  {
151  $this->tabs_gui->addTarget("perm_settings",
152  $this->ctrl->getLinkTargetByClass('ilpermissiongui',"perm"),
153  array(),'ilpermissiongui');
154  }
155  }
$GLOBALS['ct_recipient']

◆ ilObjFileAccessSettingsGUI()

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

Constructor public.

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

References ilObjectGUI\$tree, and ilObjectGUI\ilObjectGUI().

48  {
49  global $tree;
50 
51  $this->type = "facs";
52  $this->ilObjectGUI($a_data,$a_id,$a_call_by_reference, false);
53  $this->folderSettings = new ilSetting('fold');
54 
55  // Load the disk quota settings object
56  require_once 'Services/WebDAV/classes/class.ilObjDiskQuotaSettings.php';
57  $this->disk_quota_obj = new ilObjDiskQuotaSettings($a_id, $a_call_by_reference);
58  $this->disk_quota_obj->read();
59  }
ILIAS Setting Class.
ilObjectGUI($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
Constructor public.
+ Here is the call graph for this function:

◆ initPreviewSettingsForm()

ilObjFileAccessSettingsGUI::initPreviewSettingsForm ( )
private

Initializes the preview settings form.

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

References $ilCtrl, ilObjectGUI\$lng, ilPreviewSettings\getMaximumPreviews(), ilPreviewSettings\isPreviewEnabled(), ilPreviewSettings\MAX_PREVIEWS_MAX, ilNumberInputGUI\setDecimals(), and ilCheckboxInputGUI\setValue().

Referenced by editPreviewSettings(), and savePreviewSettings().

886  {
887  global $ilCtrl, $lng;
888 
889  require_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
890  $form = new ilPropertyFormGUI();
891  $form->setFormAction($ilCtrl->getFormAction($this));
892  $form->setTitle($lng->txt("settings"));
893 
894  require_once("Services/Preview/classes/class.ilPreviewSettings.php");
895 
896  // drag and drop file upload in repository
897  $chk_prop = new ilCheckboxInputGUI($lng->txt("enable_preview"), "enable_preview");
898  $chk_prop->setValue('1');
899  $chk_prop->setChecked(ilPreviewSettings::isPreviewEnabled());
900  $chk_prop->setInfo($lng->txt('enable_preview_info'));
901  $form->addItem($chk_prop);
902 
903  $num_prop = new ilNumberInputGUI($lng->txt("max_previews_per_object"), "max_previews_per_object");
904  $num_prop->setDecimals(0);
905  $num_prop->setMinValue(1);
906  $num_prop->setMinvalueShouldBeGreater(false);
907  $num_prop->setMaxValue(ilPreviewSettings::MAX_PREVIEWS_MAX);
908  $num_prop->setMaxvalueShouldBeLess(false);
909  $num_prop->setMaxLength(5);
910  $num_prop->setSize(10);
911  $num_prop->setValue(ilPreviewSettings::getMaximumPreviews());
912  $num_prop->setInfo($lng->txt('max_previews_per_object_info'));
913  $form->addItem($num_prop);
914 
915  // command buttons
916  $form->addCommandButton('savePreviewSettings', $lng->txt('save'));
917  $form->addCommandButton('view', $lng->txt('cancel'));
918 
919  return $form;
920  }
This class represents a property form user interface.
This class represents a checkbox property in a property form.
global $ilCtrl
Definition: ilias.php:18
setDecimals($a_decimals)
Set Decimal Places.
This class represents a number property in a property form.
setValue($a_value)
Set Value.
static getMaximumPreviews()
Gets the maximum number of preview pictures per object.
static isPreviewEnabled()
Gets whether the preview functionality is enabled.
+ 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 765 of file class.ilObjFileAccessSettingsGUI.php.

References $ilCtrl, ilObjectGUI\$lng, ilFileUploadSettings\CONCURRENT_UPLOADS_MAX, ilFileUploadSettings\getConcurrentUploads(), ilFileUploadSettings\isDragAndDropUploadEnabled(), ilFileUploadSettings\isRepositoryDragAndDropUploadEnabled(), ilNumberInputGUI\setDecimals(), ilTextInputGUI\setMaxLength(), and ilCheckboxInputGUI\setValue().

Referenced by editUploadSettings(), and saveUploadSettings().

766  {
767  global $ilCtrl, $lng;
768 
769  require_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
770  $form = new ilPropertyFormGUI();
771  $form->setFormAction($ilCtrl->getFormAction($this));
772  $form->setTitle($lng->txt("settings"));
773 
774  require_once("Services/FileUpload/classes/class.ilFileUploadSettings.php");
775 
776  // drag and drop file upload
777  $chk_enabled = new ilCheckboxInputGUI($lng->txt("enable_dnd_upload"), "enable_dnd_upload");
778  $chk_enabled->setValue('1');
779  $chk_enabled->setChecked(ilFileUploadSettings::isDragAndDropUploadEnabled());
780  $chk_enabled->setInfo($lng->txt('enable_dnd_upload_info'));
781  $form->addItem($chk_enabled);
782 
783  // drag and drop file upload in repository
784  $chk_repo = new ilCheckboxInputGUI($lng->txt("enable_repository_dnd_upload"), "enable_repository_dnd_upload");
785  $chk_repo->setValue('1');
787  $chk_repo->setInfo($lng->txt('enable_repository_dnd_upload_info'));
788  $chk_enabled->addSubItem($chk_repo);
789 
790  // concurrent uploads
791  $num_prop = new ilNumberInputGUI($lng->txt("concurrent_uploads"), "concurrent_uploads");
792  $num_prop->setDecimals(0);
793  $num_prop->setMinValue(1);
794  $num_prop->setMinvalueShouldBeGreater(false);
795  $num_prop->setMaxValue(ilFileUploadSettings::CONCURRENT_UPLOADS_MAX);
796  $num_prop->setMaxvalueShouldBeLess(false);
797  $num_prop->setMaxLength(5);
798  $num_prop->setSize(10);
799  $num_prop->setValue(ilFileUploadSettings::getConcurrentUploads());
800  $num_prop->setInfo($lng->txt('concurrent_uploads_info'));
801  $chk_enabled->addSubItem($num_prop);
802 
803  // file suffix replacement
804  $ti = new ilTextInputGUI($this->lng->txt("file_suffix_repl"), "suffix_repl_additional");
805  $ti->setMaxLength(200);
806  $ti->setSize(40);
807  $ti->setInfo($this->lng->txt("file_suffix_repl_info")." ".SUFFIX_REPL_DEFAULT);
808  $form->addItem($ti);
809 
810  // command buttons
811  $form->addCommandButton('saveUploadSettings', $lng->txt('save'));
812  $form->addCommandButton('view', $lng->txt('cancel'));
813 
814  return $form;
815  }
This class represents a property form user interface.
static getConcurrentUploads()
Gets the number of files that can be uploaded at the same time.
This class represents a checkbox property in a property form.
global $ilCtrl
Definition: ilias.php:18
setDecimals($a_decimals)
Set Decimal Places.
static isRepositoryDragAndDropUploadEnabled()
Gets whether drag and drop file upload in the repository is enabled.
This class represents a number property in a property form.
setValue($a_value)
Set Value.
This class represents a text property in a property form.
setMaxLength($a_maxlength)
Set Max Length.
static isDragAndDropUploadEnabled()
Gets whether drag and drop file upload is enabled.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveDiskQuotaMailTemplate()

ilObjFileAccessSettingsGUI::saveDiskQuotaMailTemplate ( )

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

References $_POST, ilObjectGUI\$lng, ilUtil\sendSuccess(), and ilUtil\stripSlashes().

745  {
746  global $lng;
747 
748  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
749  $langs = $lng->getInstalledLanguages();
750  foreach($langs as $lang_key)
751  {
752  $this->disk_quota_obj->_writeReminderMailTemplate($lang_key,
753  ilUtil::stripSlashes($_POST["subject_".$lang_key]),
754  ilUtil::stripSlashes($_POST["sal_g_".$lang_key]),
755  ilUtil::stripSlashes($_POST["sal_f_".$lang_key]),
756  ilUtil::stripSlashes($_POST["sal_m_".$lang_key]),
757  ilUtil::stripSlashes($_POST["body_".$lang_key]));
758  }
759  $this->ctrl->redirect($this, "editDiskQuotaMailTemplate");
760  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
+ Here is the call graph for this function:

◆ saveDiskQuotaSettings()

ilObjFileAccessSettingsGUI::saveDiskQuotaSettings ( )

Save disk quota settings.

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

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

424  {
425  global $rbacsystem, $ilErr, $ilCtrl, $lng;
426 
427  if (! $rbacsystem->checkAccess("write",$this->object->getRefId()))
428  {
429  $ilErr->raiseError($lng->txt("no_permission"),$ilErr->WARNING);
430  }
431 
432  // ilUtil::sendInfo($lng->txt('settings_saved'),true);
433  $ilCtrl->redirect($this, "editDiskQuotaSettings");
434  }
global $ilCtrl
Definition: ilias.php:18

◆ saveDownloadingSettings()

ilObjFileAccessSettingsGUI::saveDownloadingSettings ( )

Save settings.

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

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

229  {
230  global $rbacsystem, $ilErr, $ilCtrl, $lng;
231 
232  if (! $rbacsystem->checkAccess("write",$this->object->getRefId()))
233  {
234  $ilErr->raiseError($lng->txt("no_permission"),$ilErr->WARNING);
235  }
236 
237  $this->object->setDownloadWithUploadedFilename(ilUtil::stripSlashes($_POST['download_with_uploaded_filename']));
238  $this->object->setInlineFileExtensions(ilUtil::stripSlashes($_POST['inline_file_extensions']));
239  $this->object->update();
240 
241  $this->folderSettings->set("enable_download_folder", $_POST["enable_download_folder"] == 1);
242  $this->folderSettings->set("enable_multi_download", $_POST["enable_multi_download"] == 1);
243 
244  ilUtil::sendInfo($lng->txt('settings_saved'),true);
245  $ilCtrl->redirect($this, "editDownloadingSettings");
246  }
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
+ Here is the call graph for this function:

◆ savePreviewSettings()

ilObjFileAccessSettingsGUI::savePreviewSettings ( )

Save preview settings.

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

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

975  {
976  global $rbacsystem, $ilErr, $ilCtrl, $tpl, $lng;
977 
978  $this->tabs_gui->setTabActive('preview_settings');
979 
980  if (!$rbacsystem->checkAccess("write",$this->object->getRefId()))
981  {
982  $ilErr->raiseError($lng->txt("no_permission"),$ilErr->WARNING);
983  }
984 
985  // get form
986  $form = $this->initPreviewSettingsForm();
987  if ($form->checkInput())
988  {
989  require_once("Services/Preview/classes/class.ilPreviewSettings.php");
990  ilPreviewSettings::setPreviewEnabled($_POST["enable_preview"] == 1);
991  ilPreviewSettings::setMaximumPreviews($_POST["max_previews_per_object"]);
992 
993  ilUtil::sendSuccess($lng->txt('settings_saved'), true);
994  $ilCtrl->redirect($this, "editPreviewSettings");
995  }
996  else
997  {
998  $form->setValuesByPost();
999  $tpl->setContent($form->getHTML());
1000  }
1001  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static setMaximumPreviews($a_value)
Sets the maximum number of preview pictures per object.
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
initPreviewSettingsForm()
Initializes the preview settings form.
static setPreviewEnabled($a_value)
Sets whether the preview functionality is enabled.
+ Here is the call graph for this function:

◆ saveUploadSettings()

ilObjFileAccessSettingsGUI::saveUploadSettings ( )

Save upload settings.

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

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

852  {
853  global $rbacsystem, $ilErr, $ilCtrl, $lng, $tpl, $ilSetting;
854 
855  if (!$rbacsystem->checkAccess("write",$this->object->getRefId()))
856  {
857  $ilErr->raiseError($lng->txt("no_permission"),$ilErr->WARNING);
858  }
859 
860  // get form
861  $form = $this->initUploadSettingsForm();
862  if ($form->checkInput())
863  {
864  require_once("Services/FileUpload/classes/class.ilFileUploadSettings.php");
866  ilFileUploadSettings::setRepositoryDragAndDropUploadEnabled($_POST["enable_repository_dnd_upload"] == 1);
867  ilFileUploadSettings::setConcurrentUploads($_POST["concurrent_uploads"]);
868 
869  // file suffic replacements
870  $ilSetting->set("suffix_repl_additional", $_POST["suffix_repl_additional"]);
871 
872  ilUtil::sendSuccess($lng->txt('settings_saved'), true);
873  $ilCtrl->redirect($this, "editUploadSettings");
874  }
875  else
876  {
877  $form->setValuesByPost();
878  $tpl->setContent($form->getHTML());
879  }
880  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static setDragAndDropUploadEnabled($newValue)
Sets whether drag and drop file upload is enabled.
static setRepositoryDragAndDropUploadEnabled($newValue)
Sets whether drag and drop file upload in the repository is enabled.
$_POST['username']
Definition: cron.php:12
static setConcurrentUploads($newValue)
Sets the number of files that can be uploaded at the same time.
global $ilCtrl
Definition: ilias.php:18
initUploadSettingsForm()
Initializes the upload settings form.
global $ilSetting
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ saveWebDAVSettings()

ilObjFileAccessSettingsGUI::saveWebDAVSettings ( )

Save settings.

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

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

317  {
318  global $rbacsystem, $ilErr, $ilCtrl, $lng;
319 
320  if (! $rbacsystem->checkAccess("write",$this->object->getRefId()))
321  {
322  $ilErr->raiseError($lng->txt("no_permission"),$ilErr->WARNING);
323  }
324 
325  $this->object->setWebdavEnabled($_POST['enable_webdav'] == '1');
326 // $this->object->setWebdavActionsVisible($_POST['webdav_actions_visible'] == '1');
327  $this->object->setCustomWebfolderInstructionsEnabled($_POST['custom_webfolder_instructions_choice']=='custom');
328  $this->object->setCustomWebfolderInstructions(ilUtil::stripSlashes($_POST['custom_webfolder_instructions'], false));
329  $this->object->update();
330 
331  ilUtil::sendInfo($lng->txt('settings_saved'),true);
332  $ilCtrl->redirect($this, "editWebDAVSettings");
333  }
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
+ Here is the call graph for this function:

◆ setTitleAndDescription()

ilObjFileAccessSettingsGUI::setTitleAndDescription ( )

called by prepare output

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

339  {
340  parent::setTitleAndDescription();
341  $this->tpl->setDescription($this->object->getDescription());
342  }

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

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

441  {
442  global $rbacsystem, $ilErr, $ilSetting, $lng;
443 
444  if (! $rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
445  {
446  $ilErr->raiseError($lng->txt("no_permission"),$ilErr->WARNING);
447  }
448 
449  $this->tabs_gui->setTabActive('disk_quota');
450  $this->addDiskQuotaSubtabs('disk_quota_report');
451 
452  // nothing to do if disk quota is not active
453  require_once 'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
455  {
456  return;
457  }
458 
459  // get the form
460  $this->tpl->addBlockfile('ADM_CONTENT','adm_content','tpl.disk_quota_report.html',
461  "Services/WebDAV");
462 
463  // get the date of the last update
464  require_once("./Services/WebDAV/classes/class.ilDiskQuotaChecker.php");
466  if ($last_update == null)
467  {
468  // nothing to do if disk usage report has not been run
469  $this->tpl->setVariable('LAST_UPDATE_TEXT',$lng->txt('disk_quota_report_not_run_yet'));
470  return;
471  }
472  else
473  {
474  $this->tpl->setVariable('LAST_UPDATE_TEXT',$lng->txt('last_update').': '.ilFormat::formatDate($last_update,'datetime',true));
475  }
476 
477  // Filter
478  $_SESSION['quota_usage_filter'] = isset($_POST['usage_filter']) ? $_POST['usage_filter'] : $_SESSION['quota_usage_filter'];
479  if ($_SESSION['quota_usage_filter'] == 0)
480  {
481  $_SESSION['quota_usage_filter'] = 4;
482  }
483  $_SESSION['quota_access_filter'] = isset($_POST['access_filter']) ? $_POST['access_filter'] : $_SESSION['quota_access_filter'];
484  if ($_SESSION['quota_access_filter'] == 0)
485  {
486  $_SESSION['quota_access_filter'] = 1;
487  }
488  $usage_action[1] = $lng->txt('all_users');
489  $usage_action[2] = $lng->txt('filter_users_without_disk_usage');
490  $usage_action[3] = $lng->txt('filter_users_with_disk_usage');
491  $usage_action[4] = $lng->txt('filter_users_with_exceeded_disk_quota');
492  $access_action[1] = $lng->txt('all_users');
493  $access_action[2] = $lng->txt('filter_users_with_access');
494  $access_action[3] = $lng->txt('filter_users_without_access');
495 
496  $select_usage_filter = ilUtil::formSelect($_SESSION['quota_usage_filter'],"usage_filter",$usage_action,false,true);
497  $select_access_filter = ilUtil::formSelect($_SESSION['quota_access_filter'],"access_filter",$access_action,false,true);
498 
499  $this->tpl->setCurrentBlock("filter");
500  $this->tpl->setVariable("FILTER_TXT_FILTER",$lng->txt('filter'));
501  $this->tpl->setVariable("SELECT_USAGE_FILTER",$select_usage_filter);
502  $this->tpl->setVariable("SELECT_ACCESS_FILTER",$select_access_filter);
503  $this->tpl->setVariable("FILTER_ACTION",$this->ctrl->getLinkTarget($this, 'viewDiskQuotaReport'));
504  $this->tpl->setVariable("FILTER_NAME",'view');
505  $this->tpl->setVariable("FILTER_VALUE",$lng->txt('apply_filter'));
506  $this->tpl->parseCurrentBlock();
507 
508  // load templates for table
509  $a_tpl = new ilTemplate('tpl.table.html',true,true);
510  $a_tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.obj_tbl_rows.html");
511 
512  // create table
513  require_once './Services/Table/classes/class.ilTableGUI.php';
514  $tbl = new ilTableGUI(0, false);
515 
516  // title & header columns
517  $header_vars = array('login','firstname','lastname','email','access_until','last_login','disk_quota','disk_usage', 'last_reminder');
518  $tbl->setHeaderNames(
519  array(
520  $lng->txt('login'),
521  $lng->txt('firstname'),
522  $lng->txt('lastname'),
523  $lng->txt('email'),
524  $lng->txt('access_until'),
525  $lng->txt('last_login'),
526  $lng->txt('disk_quota'),
527  $lng->txt('disk_usage'),
528  $lng->txt('last_reminder')
529  )
530  );
531  $tbl->setHeaderVars(
532  $header_vars,
533  $this->ctrl->getParameterArray($this,'viewDiskQuotaReport',false)
534  );
535 
536  $tbl->enable("numinfo_header");
537  $tbl->setFormName("cmd");
538  $tbl->setSelectAllCheckbox("id");
539 
540  // sorting
541  $tbl->setOrderColumn($_GET["sort_by"]);
542  $tbl->setOrderDirection($_GET["sort_order"]);
543 
544  // fetch the data
546  $_SESSION['quota_usage_filter'],
547  $_SESSION['quota_access_filter'],
548  $header_vars[$tbl->getOrderColumn()], $tbl->getOrderDirection());
549 
550  // paging
551  $tbl->setLimit($_GET["limit"]);
552  $tbl->setOffset($_GET["offset"]);
553  $tbl->setMaxCount(count($data));
554 
555  // footer
556  $tbl->setFooter("tblfooter",$lng->txt("previous"),$lng->txt("next"));
557 
558  // render table
559  $tbl->setTemplate($a_tpl);
560 
561  // render rows
562  $count = 0;
563  for ($i = $tbl->getOffset(); $i < count($data) && $i < $tbl->getOffset() + $tbl->getLimit(); $i++)
564  {
565  $row = $data[$i];
566 
567  // build columns
568  foreach ($header_vars as $key)
569  {
570  switch ($key)
571  {
572  case 'login' :
573  //build link
574  $this->ctrl->setParameterByClass("ilobjusergui", "ref_id", "7");
575  $this->ctrl->setParameterByClass("ilobjusergui", "obj_id", $row["usr_id"]);
576  $link = $this->ctrl->getLinkTargetByClass("ilobjusergui", "view");
577  $tbl_content_cell = '<a href="'.$link.'">'.htmlspecialchars($row[$key]).'</a>';
578  break;
579  case 'disk_quota' :
580  if ($row['role_id'] == SYSTEM_ROLE_ID)
581  {
582  $tbl_content_cell = "<span class=\"smallgreen\">".$lng->txt('access_unlimited').'</span>';
583  }
584  else
585  {
586  $tbl_content_cell = ilFormat::formatSize($row[$key],'short');
587  }
588  break;
589  case 'disk_usage' :
590  if ($row['last_update'] == null)
591  {
592  $tbl_content_cell = $lng->txt('unknown');
593  }
594  else if ($row['disk_usage'] > $row['disk_quota'])
595  {
596  $tbl_content_cell = "<span class=\"smallred\">".ilFormat::formatSize($row[$key],'short').'</span>';
597  }
598  else
599  {
600  $tbl_content_cell = ilFormat::formatSize($row[$key],'short');
601  }
602  break;
603  case 'access_until' :
604  if (! $row['active'])
605  {
606  $tbl_content_cell = "<span class=\"smallred\">".$lng->txt('inactive').'</span>';
607  }
608  else if ($row['time_limit_unlimited'])
609  {
610  $tbl_content_cell = "<span class=\"smallgreen\">".$lng->txt('access_unlimited').'</span>';
611  }
612  else if ($row['expired'])
613  {
614  $tbl_content_cell = "<span class=\"smallred\">".$lng->txt('access_expired').'</span>';
615  }
616  else
617  {
618  $tbl_content_cell = ilFormat::formatDate($row[$key]);
619  }
620  break;
621  case 'last_login' :
622  case 'last_reminder' :
623  if ($row[$key] == null)
624  {
625  $tbl_content_cell = $lng->txt('no_date');
626  }
627  else
628  {
629  $tbl_content_cell = ilFormat::formatDate($row[$key]);
630  }
631  break;
632  default :
633  $tbl_content_cell = htmlspecialchars($row[$key]);
634  }
635  /*
636  if (is_array($tbl_content_cell))
637  {
638  $tbl->tpl->setCurrentBlock("tbl_cell_subtitle");
639  $tbl->tpl->setVariable("TBL_CELL_SUBTITLE",$tbl_content_cell[1]);
640  $tbl->tpl->parseCurrentBlock();
641  $tbl_content_cell = "<b>".$tbl_content_cell[0]."</b>";
642  }*/
643 
644  $tbl->tpl->setCurrentBlock("tbl_content_cell");
645  $tbl->tpl->setVariable("TBL_CONTENT_CELL",$tbl_content_cell);
646 
647  $tbl->tpl->parseCurrentBlock();
648  }
649 
650  $tbl->tpl->setCurrentBlock("tbl_content_row");
651  $rowcolor = ilUtil::switchColor($count,"tblrow1","tblrow2");
652  $tbl->tpl->setVariable("ROWCOLOR", $rowcolor);
653  $tbl->tpl->parseCurrentBlock();
654 
655  $count++;
656  }
657  $tbl->render();
658 
659  // Add table to page
660  $this->tpl->setVariable("USER_TABLE",$a_tpl->get());
661  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
Class ilTableGUI.
static _lookupDiskUsageReportLastUpdate()
Returns the SQL datetime of the last update of the disk usage report.
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.
special template class to simplify handling of ITX/PEAR
formatDate($a_date, $a_mode="datetime", $a_omit_seconds=false, $a_relative=TRUE)
format a date according to the user language shortcut for Format::fmtDateTime public ...
global $ilSetting
Definition: privfeed.php:40
static formatSize($size, $a_mode='short', $a_lng=null)
Returns the specified file size value in a human friendly form.
static switchColor($a_num, $a_css1, $a_css2)
switches style sheets for each even $a_num (used for changing colors of different result rows) ...
addDiskQuotaSubtabs($a_active_subtab)
Add disk quota subtabs.
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.
+ 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: