ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
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.
 executeCommand ()
 Execute command.
 getAdminTabs ()
 Get tabs.
 editDownloadingSettings ()
 Edit settings.
 saveDownloadingSettings ()
 Save settings.
 editWebDAVSettings ()
 Edit settings.
 saveWebDAVSettings ()
 Save settings.
 setTitleAndDescription ()
 called by prepare output
 addDiskQuotaSubtabs ($a_active_subtab)
 Add disk quota subtabs.
 editDiskQuotaSettings ()
 Edit disk quota settings.
 saveDiskQuotaSettings ()
 Save disk quota settings.
 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.

 editDiskQuotaMailTemplate ()
 Edit disk quota settings.
 cancelDiskQuotaMailTemplate ()
 saveDiskQuotaMailTemplate ()
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public.
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not)
 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
 getCreationMode ()
 get creation mode
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder
 getHTML ()
 undeleteObject ()
 Get objects back from trash.
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled
 cancelDeleteObject ()
 cancel deletion of object
 removeFromSystemObject ()
 remove objects from trash bin and all entries therefore every object needs a specific deleteObject() method
 createObject ()
 create new object form
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public
 saveObject ()
 save object
 editObject ()
 edit object
 updateObject ()
 updates object entry in object_data
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g.
 isVisible ($a_ref_id, $a_type)
 viewObject ()
 list childs of current object
 deleteObject ($a_error=false)
 Display deletion confirmation screen.
 trashObject ()
 Show trash content of object.
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl.
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI.
 copyWizardHasOptions ($a_mode)
 Check if there is any modules specific option.

Private Attributes

 $disk_quota_obj

Additional Inherited Members

- 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
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 prepareOutput ()
 prepare output
 showUpperIcon ()
 setTabs ()
 set admin tabs public
 setAdminTabs ()
 set admin tabs public
 setLocator ()
 set Locator
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 omitLocator ($a_omit=true)
 addAdminLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 displayEditForm ($fields)
 display edit form (usually called by editObject)
 afterUpdate ()
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g.
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g.
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu)
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste
 getTabs (&$tabs_gui)
 get tabs abstract method.
 __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
 __showClipboardTable ($a_result_set, $a_from="")
 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
 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.
 getCenterColumnHTML ()
 Get center column.
 getRightColumnHTML ()
 Display right column.
 setColumnSettings ($column_gui)
 May be overwritten in subclasses.
 checkPermission ($a_perm, $a_cmd="")

Detailed Description

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

Member Function Documentation

ilObjFileAccessSettingsGUI::addDiskQuotaSubtabs (   $a_active_subtab)

Add disk quota subtabs.

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

References $ilCtrl, and ilDiskQuotaActivationChecker\_isActive().

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

{
global $ilCtrl, $ilTabs;
include_once("./Services/COPage/classes/class.ilPageEditorSettings.php");
$ilTabs->addSubTabTarget("settings",
$ilCtrl->getLinkTarget($this, "editDiskQuotaSettings"),
array("editDiskQuotaSettings"));
require_once 'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
{
$ilTabs->addSubTabTarget("disk_quota_report",
$ilCtrl->getLinkTarget($this, "viewDiskQuotaReport"),
array("viewDiskQuotaReport"));
}
$ilTabs->addSubTabTarget("disk_quota_reminder_mail",
$ilCtrl->getLinkTarget($this, "editDiskQuotaMailTemplate"),
array("editDiskQuotaMailTemplate"));
$ilTabs->setSubTabActive($a_active_subtab);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjFileAccessSettingsGUI::cancelDiskQuotaMailTemplate ( )

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

{
$this->ctrl->redirect($this, "editDiskQuotaSettings");
}
ilObjFileAccessSettingsGUI::editDiskQuotaMailTemplate ( )

Edit disk quota settings.

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

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

{
global $rbacsystem, $ilErr, $ilSetting, $tpl, $lng, $ilCtrl;
if (! $rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
{
$ilErr->raiseError($lng->txt("no_permission"),$ilErr->WARNING);
}
$this->tabs_gui->setTabActive('disk_quota');
$this->addDiskQuotaSubtabs('disk_quota_reminder_mail');
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.disk_quota_reminder_mail.html');
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
$this->tpl->setVariable("IMG_MAIL", ilUtil::getImagePath("icon_mail.gif"));
$lng->loadLanguageModule("meta");
$lng->loadLanguageModule("mail");
$this->tpl->setVariable("TXT_NEW_USER_ACCOUNT_MAIL", $lng->txt("disk_quota_reminder_mail"));
$this->tpl->setVariable("TXT_NEW_USER_ACCOUNT_MAIL_DESC", $lng->txt("disk_quota_reminder_mail_desc"));
// placeholder help text
$this->tpl->setVariable("TXT_USE_PLACEHOLDERS", $lng->txt("mail_nacc_use_placeholder"));
$this->tpl->setVariable("TXT_MAIL_SALUTATION", $lng->txt("mail_nacc_salutation"));
$this->tpl->setVariable("TXT_FIRST_NAME", $lng->txt("firstname"));
$this->tpl->setVariable("TXT_LAST_NAME", $lng->txt("lastname"));
$this->tpl->setVariable("TXT_EMAIL", $lng->txt("email"));
$this->tpl->setVariable("TXT_LOGIN", $lng->txt("mail_nacc_login"));
$this->tpl->setVariable("TXT_DISK_QUOTA", $lng->txt("disk_quota"));
$this->tpl->setVariable("TXT_DISK_USAGE", $lng->txt("disk_usage"));
$this->tpl->setVariable("TXT_DISK_USAGE_DETAILS", $lng->txt("disk_usage_details"));
$this->tpl->setVariable("TXT_ADMIN_MAIL", $lng->txt("mail_nacc_admin_mail"));
$this->tpl->setVariable("TXT_ILIAS_URL", $lng->txt("mail_nacc_ilias_url"));
$this->tpl->setVariable("TXT_CLIENT_NAME", $lng->txt("mail_nacc_client_name"));
$langs = $lng->getInstalledLanguages();
foreach($langs as $lang_key)
{
$amail = $this->disk_quota_obj->_lookupReminderMailTemplate($lang_key);
$this->tpl->setCurrentBlock("mail_block");
$add = "";
if ($lang_key == $lng->getDefaultLanguage())
{
$add = " (".$lng->txt("default").")";
}
$this->tpl->setVariable("TXT_LANGUAGE",
$lng->txt("meta_l_".$lang_key).$add);
$this->tpl->setVariable("TXT_BODY", $lng->txt("message_content"));
$this->tpl->setVariable("TA_BODY", "body_".$lang_key);
$this->tpl->setVariable("VAL_BODY",
ilUtil::prepareFormOutput($amail["body"]));
$this->tpl->setVariable("TXT_SUBJECT", $lng->txt("subject"));
$this->tpl->setVariable("INPUT_SUBJECT", "subject_".$lang_key);
$this->tpl->setVariable("VAL_SUBJECT",
ilUtil::prepareFormOutput($amail["subject"]));
$this->tpl->setVariable("TXT_SAL_G", $lng->txt("mail_salutation_general"));
$this->tpl->setVariable("INPUT_SAL_G", "sal_g_".$lang_key);
$this->tpl->setVariable("VAL_SAL_G",
ilUtil::prepareFormOutput($amail["sal_g"]));
$this->tpl->setVariable("TXT_SAL_M", $lng->txt("mail_salutation_male"));
$this->tpl->setVariable("INPUT_SAL_M", "sal_m_".$lang_key);
$this->tpl->setVariable("VAL_SAL_M",
ilUtil::prepareFormOutput($amail["sal_m"]));
$this->tpl->setVariable("TXT_SAL_F", $lng->txt("mail_salutation_female"));
$this->tpl->setVariable("INPUT_SAL_F", "sal_f_".$lang_key);
$this->tpl->setVariable("VAL_SAL_F",
ilUtil::prepareFormOutput($amail["sal_f"]));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setVariable("TXT_CANCEL", $lng->txt("cancel"));
$this->tpl->setVariable("TXT_SAVE", $lng->txt("save"));
}

+ Here is the call graph for this function:

ilObjFileAccessSettingsGUI::editDiskQuotaSettings ( )

Edit disk quota settings.

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

References $ilCtrl, $ilErr, $ilSetting, ilObjectGUI\$lng, ilObjectGUI\$tpl, addDiskQuotaSubtabs(), ilTextInputGUI\setValue(), and ilCheckboxInputGUI\setValue().

{
global $rbacsystem, $ilErr, $ilSetting, $tpl, $lng, $ilCtrl;
if (! $rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
{
$ilErr->raiseError($lng->txt("no_permission"),$ilErr->WARNING);
}
$this->tabs_gui->setTabActive('disk_quota');
$this->addDiskQuotaSubtabs('settings');
require_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
require_once("./Services/Form/classes/class.ilCheckboxInputGUI.php");
require_once("./Services/Form/classes/class.ilRadioGroupInputGUI.php");
require_once("./Services/Form/classes/class.ilRadioOption.php");
require_once("./Services/Form/classes/class.ilTextAreaInputGUI.php");
require_once("./Services/WebDAV/classes/class.ilDAVServer.php");
$form = new ilPropertyFormGUI();
$form->setFormAction($ilCtrl->getFormAction($this));
$form->setTitle($lng->txt("settings"));
// Enable disk quota
$cb_prop = new ilCheckboxInputGUI($lng->txt("enable_disk_quota"), "enable_disk_quota");
$cb_prop->setValue('1');
$cb_prop->setChecked($this->disk_quota_obj->isDiskQuotaEnabled());
$cb_prop->setInfo($lng->txt('enable_disk_quota_info'));
$form->addItem($cb_prop);
// Enable disk quota reminder mail
$cb_prop_reminder = new ilCheckboxInputGUI($lng->txt("enable_disk_quota_reminder_mail"), "enable_disk_quota_reminder_mail");
$cb_prop_reminder->setValue('1');
$cb_prop_reminder->setChecked($this->disk_quota_obj->isDiskQuotaReminderMailEnabled());
$cb_prop_reminder->setInfo($lng->txt('disk_quota_reminder_mail_desc'));
$cb_prop->addSubItem($cb_prop_reminder);
// Enable summary mail for certain users
$cb_prop_summary= new ilCheckboxInputGUI($lng->txt("enable_disk_quota_summary_mail"), "enable_disk_quota_summary_mail");
$cb_prop_summary->setValue(1);
$cb_prop_summary->setChecked($this->disk_quota_obj->isDiskQuotaSummaryMailEnabled());
$cb_prop_summary->setInfo($lng->txt('enable_disk_quota_summary_mail_desc'));
$cb_prop->addSubItem($cb_prop_summary);
// Edit disk quota recipients
$summary_rcpt = new ilTextInputGUI($lng->txt("disk_quota_summary_rctp"), "disk_quota_summary_rctp");
$summary_rcpt->setValue($this->disk_quota_obj->getSummaryRecipients());
$summary_rcpt->setInfo($lng->txt('disk_quota_summary_rctp_desc'));
$cb_prop_summary->addSubItem($summary_rcpt);
// command buttons
$form->addCommandButton('saveDiskQuotaSettings', $lng->txt('save'));
$form->addCommandButton('editDiskQuotaSettings', $lng->txt('cancel'));
$tpl->setContent($form->getHTML());
}

+ Here is the call graph for this function:

ilObjFileAccessSettingsGUI::editDownloadingSettings ( )

Edit settings.

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

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

{
global $rbacsystem, $ilErr, $ilTabs;
$this->tabs_gui->setTabActive('downloading_settings');
if (! $rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
{
$ilErr->raiseError($lng->txt("no_permission"),$ilErr->WARNING);
}
global $tpl, $ilCtrl, $lng, $tree, $settings;
require_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
require_once("./Services/Form/classes/class.ilCheckboxInputGUI.php");
require_once("./Services/Form/classes/class.ilRadioGroupInputGUI.php");
require_once("./Services/Form/classes/class.ilRadioOption.php");
require_once("./Services/Form/classes/class.ilTextAreaInputGUI.php");
$form = new ilPropertyFormGUI();
$form->setFormAction($ilCtrl->getFormAction($this));
$form->setTitle($lng->txt("settings"));
// Backwards compatibility with ILIAS 3.9: Use the name of the
// uploaded file as the filename for the downloaded file instead
// of the title of the file object.
$dl_prop = new ilCheckboxInputGUI($lng->txt("download_with_uploaded_filename"), "download_with_uploaded_filename");
$dl_prop->setValue('1');
// default value should reflect previous behaviour (-> 0)
$dl_prop->setChecked($this->object->isDownloadWithUploadedFilename() == 1);
$dl_prop->setInfo($lng->txt('download_with_uploaded_filename_info'));
$form->addItem($dl_prop);
// Show download action for folder
$dl_prop = new ilCheckboxInputGUI($lng->txt("enable_download_folder"), "enable_download_folder");
$dl_prop->setValue('1');
// default value should reflect previous behaviour (-> 0)
$dl_prop->setChecked($this->folderSettings->get("enable_download_folder", 0) == 1);
$dl_prop->setInfo($lng->txt('enable_download_folder_info'));
$form->addItem($dl_prop);
// Inline file extensions
$tai_prop = new ilTextAreaInputGUI($lng->txt('inline_file_extensions'), 'inline_file_extensions');
$tai_prop->setValue($this->object->getInlineFileExtensions());
$tai_prop->setInfo($lng->txt('inline_file_extensions_info'));
$tai_prop->setCols(80);
$tai_prop->setRows(5);
$form->addItem($tai_prop);
// command buttons
$form->addCommandButton('saveDownloadingSettings', $lng->txt('save'));
$form->addCommandButton('view', $lng->txt('cancel'));
$tpl->setContent($form->getHTML());
}

+ Here is the call graph for this function:

ilObjFileAccessSettingsGUI::editWebDAVSettings ( )

Edit settings.

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

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

{
global $rbacsystem, $ilErr, $ilTabs;
global $tpl, $ilCtrl, $lng, $tree, $settings;
$this->tabs_gui->setTabActive('webdav');
if (! $rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
{
$ilErr->raiseError($lng->txt("no_permission"),$ilErr->WARNING);
}
require_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
require_once("./Services/Form/classes/class.ilCheckboxInputGUI.php");
require_once("./Services/Form/classes/class.ilRadioGroupInputGUI.php");
require_once("./Services/Form/classes/class.ilRadioOption.php");
require_once("./Services/Form/classes/class.ilTextAreaInputGUI.php");
require_once("./Services/WebDAV/classes/class.ilDAVServer.php");
$form = new ilPropertyFormGUI();
$form->setFormAction($ilCtrl->getFormAction($this));
$form->setTitle($lng->txt("settings"));
// Enable webdav
$ilDAVServer = ilDAVServer::getInstance();
$isPearAuthHTTPInstalled = @include_once("Auth/HTTP.php");
$cb_prop = new ilCheckboxInputGUI($lng->txt("enable_webdav"), "enable_webdav");
$cb_prop->setValue('1');
$cb_prop->setChecked($this->object->isWebdavEnabled() && $isPearAuthHTTPInstalled);
$cb_prop->setDisabled(! $isPearAuthHTTPInstalled);
$cb_prop->setInfo($isPearAuthHTTPInstalled ?
sprintf($lng->txt('enable_webdav_info'),$ilDAVServer->getMountURI($tree->getRootId(),0,null,null,true)) :
$lng->txt('webdav_pear_auth_http_needed')
);
$form->addItem($cb_prop);
// Webdav help text
if ($isPearAuthHTTPInstalled)
{
$rgi_prop = new ilRadioGroupInputGUI($lng->txt('webfolder_instructions'), 'custom_webfolder_instructions_choice');
$rgi_prop->addOption(new ilRadioOption($lng->txt('use_default_instructions'), 'default'));
$rgi_prop->addOption(new ilRadioOption($lng->txt('use_customized_instructions'), 'custom'));
$rgi_prop->setValue($this->object->isCustomWebfolderInstructionsEnabled() ? 'custom':'default');
$rgi_prop->setDisabled(! $isPearAuthHTTPInstalled);
$form->addItem($rgi_prop);
$tai_prop = new ilTextAreaInputGUI('', 'custom_webfolder_instructions');
$tai_prop->setValue($this->object->getCustomWebfolderInstructions());
$tai_prop->setInfo($lng->txt("webfolder_instructions_info"));
$tai_prop->setCols(80);
$tai_prop->setRows(20);
$tai_prop->setDisabled(! $isPearAuthHTTPInstalled);
$form->addItem($tai_prop);
}
// command buttons
$form->addCommandButton('saveWebDAVSettings', $lng->txt('save'));
$form->addCommandButton('view', $lng->txt('cancel'));
$tpl->setContent($form->getHTML());
}

+ Here is the call graph for this function:

ilObjFileAccessSettingsGUI::executeCommand ( )

Execute command.

public

Reimplemented from ilObjectGUI.

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

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

{
global $rbacsystem,$ilErr,$ilAccess, $ilias, $lng;
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
$this->prepareOutput();
if(!$ilAccess->checkAccess('read','',$this->object->getRefId()))
{
$ilias->raiseError($lng->txt('no_permission'),$ilias->error_obj->MESSAGE);
}
switch($next_class)
{
case 'ilpermissiongui':
$this->tabs_gui->setTabActive('perm_settings');
include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
$perm_gui =& new ilPermissionGUI($this);
$ret =& $this->ctrl->forwardCommand($perm_gui);
break;
default:
if(!$cmd || $cmd == 'view')
{
$cmd = "editDownloadingSettings";
}
$this->$cmd();
break;
}
return true;
}

+ Here is the call graph for this function:

ilObjFileAccessSettingsGUI::getAdminTabs ( )

Get tabs.

public

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

{
global $rbacsystem, $ilAccess;
if ($rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
{
$this->tabs_gui->addTarget('downloading_settings',
$this->ctrl->getLinkTarget($this, "editDownloadingSettings"),
array("editDownloadingSettings", "view"));
$this->tabs_gui->addTarget('webdav',
$this->ctrl->getLinkTarget($this, "editWebDAVSettings"),
array("editWebDAVSettings", "view"));
$this->tabs_gui->addTarget("disk_quota",
$this->ctrl->getLinkTarget($this, "editDiskQuotaSettings"),
array("editDiskQuota", "view"));
}
if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
{
$this->tabs_gui->addTarget("perm_settings",
$this->ctrl->getLinkTargetByClass('ilpermissiongui',"perm"),
array(),'ilpermissiongui');
}
}
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().

{
global $tree;
$this->type = "facs";
$this->ilObjectGUI($a_data,$a_id,$a_call_by_reference, false);
$this->folderSettings = new ilSetting('fold');
// Load the disk quota settings object
require_once 'Services/WebDAV/classes/class.ilObjDiskQuotaSettings.php';
$this->disk_quota_obj = new ilObjDiskQuotaSettings($a_id, $a_call_by_reference);
$this->disk_quota_obj->read();
}

+ Here is the call graph for this function:

ilObjFileAccessSettingsGUI::saveDiskQuotaMailTemplate ( )

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

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

{
global $lng;
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
$langs = $lng->getInstalledLanguages();
foreach($langs as $lang_key)
{
$this->disk_quota_obj->_writeReminderMailTemplate($lang_key,
ilUtil::stripSlashes($_POST["subject_".$lang_key]),
ilUtil::stripSlashes($_POST["sal_g_".$lang_key]),
ilUtil::stripSlashes($_POST["sal_f_".$lang_key]),
ilUtil::stripSlashes($_POST["sal_m_".$lang_key]),
ilUtil::stripSlashes($_POST["body_".$lang_key]));
}
$this->ctrl->redirect($this, "editDiskQuotaMailTemplate");
}

+ Here is the call graph for this function:

ilObjFileAccessSettingsGUI::saveDiskQuotaSettings ( )

Save disk quota settings.

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

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

{
global $rbacsystem, $ilErr, $ilCtrl, $lng;
if (! $rbacsystem->checkAccess("write",$this->object->getRefId()))
{
$ilErr->raiseError($lng->txt("no_permission"),$ilErr->WARNING);
}
$this->disk_quota_obj->setDiskQuotaEnabled($_POST['enable_disk_quota'] == '1');
$this->disk_quota_obj->setDiskQuotaReminderMailEnabled($_POST['enable_disk_quota_reminder_mail'] == '1');
$this->disk_quota_obj->isDiskQuotaSummaryMailEnabled($_POST['enable_disk_quota_summary_mail'] == '1');
$this->disk_quota_obj->setSummaryRecipients(ilUtil::stripSlashes($_POST['disk_quota_summary_rctp']));
$this->disk_quota_obj->update();
ilUtil::sendInfo($lng->txt('settings_saved'),true);
$ilCtrl->redirect($this, "editDiskQuotaSettings");
}

+ Here is the call graph for this function:

ilObjFileAccessSettingsGUI::saveDownloadingSettings ( )

Save settings.

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

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

{
global $rbacsystem, $ilErr, $ilCtrl, $lng;
if (! $rbacsystem->checkAccess("write",$this->object->getRefId()))
{
$ilErr->raiseError($lng->txt("no_permission"),$ilErr->WARNING);
}
$this->object->setDownloadWithUploadedFilename(ilUtil::stripSlashes($_POST['download_with_uploaded_filename']));
$this->object->setInlineFileExtensions(ilUtil::stripSlashes($_POST['inline_file_extensions']));
$this->object->update();
$this->folderSettings->set("enable_download_folder", $_POST["enable_download_folder"] == 1);
ilUtil::sendInfo($lng->txt('settings_saved'),true);
$ilCtrl->redirect($this, "editDownloadingSettings");
}

+ Here is the call graph for this function:

ilObjFileAccessSettingsGUI::saveWebDAVSettings ( )

Save settings.

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

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

{
global $rbacsystem, $ilErr, $ilCtrl, $lng;
if (! $rbacsystem->checkAccess("write",$this->object->getRefId()))
{
$ilErr->raiseError($lng->txt("no_permission"),$ilErr->WARNING);
}
$this->object->setWebdavEnabled($_POST['enable_webdav'] == '1');
// $this->object->setWebdavActionsVisible($_POST['webdav_actions_visible'] == '1');
$this->object->setCustomWebfolderInstructionsEnabled($_POST['custom_webfolder_instructions_choice']=='custom');
$this->object->setCustomWebfolderInstructions(ilUtil::stripSlashes($_POST['custom_webfolder_instructions'], false));
$this->object->update();
ilUtil::sendInfo($lng->txt('settings_saved'),true);
$ilCtrl->redirect($this, "editWebDAVSettings");
}

+ Here is the call graph for this function:

ilObjFileAccessSettingsGUI::setTitleAndDescription ( )

called by prepare output

Reimplemented from ilObjectGUI.

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

{
$this->tpl->setDescription($this->object->getDescription());
}
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 432 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(), formSelect(), and ilUtil\switchColor().

{
global $rbacsystem, $ilErr, $ilSetting, $lng;
if (! $rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
{
$ilErr->raiseError($lng->txt("no_permission"),$ilErr->WARNING);
}
$this->tabs_gui->setTabActive('disk_quota');
$this->addDiskQuotaSubtabs('disk_quota_report');
// nothing to do if disk quota is not active
require_once 'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
{
return;
}
// get the form
$this->tpl->addBlockfile('ADM_CONTENT','adm_content','tpl.disk_quota_report.html');
// get the date of the last update
require_once("./Services/WebDAV/classes/class.ilDiskQuotaChecker.php");
if ($last_update == null)
{
// nothing to do if disk usage report has not been run
$this->tpl->setVariable('LAST_UPDATE_TEXT',$lng->txt('disk_quota_report_not_run_yet'));
return;
}
else
{
$this->tpl->setVariable('LAST_UPDATE_TEXT',$lng->txt('last_update').': '.ilFormat::formatDate($last_update,'datetime',true));
}
// Filter
$_SESSION['quota_usage_filter'] = isset($_POST['usage_filter']) ? $_POST['usage_filter'] : $_SESSION['quota_usage_filter'];
if ($_SESSION['quota_usage_filter'] == 0)
{
$_SESSION['quota_usage_filter'] = 4;
}
$_SESSION['quota_access_filter'] = isset($_POST['access_filter']) ? $_POST['access_filter'] : $_SESSION['quota_access_filter'];
if ($_SESSION['quota_access_filter'] == 0)
{
$_SESSION['quota_access_filter'] = 1;
}
$usage_action[1] = $lng->txt('all_users');
$usage_action[2] = $lng->txt('filter_users_without_disk_usage');
$usage_action[3] = $lng->txt('filter_users_with_disk_usage');
$usage_action[4] = $lng->txt('filter_users_with_exceeded_disk_quota');
$access_action[1] = $lng->txt('all_users');
$access_action[2] = $lng->txt('filter_users_with_access');
$access_action[3] = $lng->txt('filter_users_without_access');
$select_usage_filter = ilUtil::formSelect($_SESSION['quota_usage_filter'],"usage_filter",$usage_action,false,true);
$select_access_filter = ilUtil::formSelect($_SESSION['quota_access_filter'],"access_filter",$access_action,false,true);
$this->tpl->setCurrentBlock("filter");
$this->tpl->setVariable("FILTER_TXT_FILTER",$lng->txt('filter'));
$this->tpl->setVariable("SELECT_USAGE_FILTER",$select_usage_filter);
$this->tpl->setVariable("SELECT_ACCESS_FILTER",$select_access_filter);
$this->tpl->setVariable("FILTER_ACTION",$this->ctrl->getLinkTarget($this, 'viewDiskQuotaReport'));
$this->tpl->setVariable("FILTER_NAME",'view');
$this->tpl->setVariable("FILTER_VALUE",$lng->txt('apply_filter'));
$this->tpl->parseCurrentBlock();
// load templates for table
$a_tpl = new ilTemplate('tpl.table.html',true,true);
$a_tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.obj_tbl_rows.html");
// create table
require_once './Services/Table/classes/class.ilTableGUI.php';
$tbl = new ilTableGUI(0, false);
// title & header columns
$header_vars = array('login','firstname','lastname','email','access_until','last_login','disk_quota','disk_usage', 'last_reminder');
$tbl->setHeaderNames(
array(
$lng->txt('login'),
$lng->txt('firstname'),
$lng->txt('lastname'),
$lng->txt('email'),
$lng->txt('access_until'),
$lng->txt('last_login'),
$lng->txt('disk_quota'),
$lng->txt('disk_usage'),
$lng->txt('last_reminder')
)
);
$tbl->setHeaderVars(
$header_vars,
$this->ctrl->getParameterArray($this,'viewDiskQuotaReport',false)
);
$tbl->enable("numinfo_header");
$tbl->setFormName("cmd");
$tbl->setSelectAllCheckbox("id");
// sorting
$tbl->setOrderColumn($_GET["sort_by"]);
$tbl->setOrderDirection($_GET["sort_order"]);
// fetch the data
$_SESSION['quota_usage_filter'],
$_SESSION['quota_access_filter'],
$header_vars[$tbl->getOrderColumn()], $tbl->getOrderDirection());
// paging
$tbl->setLimit($_GET["limit"]);
$tbl->setOffset($_GET["offset"]);
$tbl->setMaxCount(count($data));
// footer
$tbl->setFooter("tblfooter",$lng->txt("previous"),$lng->txt("next"));
// render table
$tbl->setTemplate($a_tpl);
// render rows
$count = 0;
for ($i = $tbl->getOffset(); $i < count($data) && $i < $tbl->getOffset() + $tbl->getLimit(); $i++)
{
$row = $data[$i];
// build columns
foreach ($header_vars as $key)
{
switch ($key)
{
case 'login' :
//build link
$this->ctrl->setParameterByClass("ilobjusergui", "ref_id", "7");
$this->ctrl->setParameterByClass("ilobjusergui", "obj_id", $row["usr_id"]);
$link = $this->ctrl->getLinkTargetByClass("ilobjusergui", "view");
$tbl_content_cell = '<a href="'.$link.'">'.htmlspecialchars($row[$key]).'</a>';
break;
case 'disk_quota' :
if ($row['role_id'] == SYSTEM_ROLE_ID)
{
$tbl_content_cell = "<span class=\"smallgreen\">".$lng->txt('access_unlimited').'</span>';
}
else
{
$tbl_content_cell = ilFormat::formatSize($row[$key],'short');
}
break;
case 'disk_usage' :
if ($row['last_update'] == null)
{
$tbl_content_cell = $lng->txt('unknown');
}
else if ($row['disk_usage'] > $row['disk_quota'])
{
$tbl_content_cell = "<span class=\"smallred\">".ilFormat::formatSize($row[$key],'short').'</span>';
}
else
{
$tbl_content_cell = ilFormat::formatSize($row[$key],'short');
}
break;
case 'access_until' :
if (! $row['active'])
{
$tbl_content_cell = "<span class=\"smallred\">".$lng->txt('inactive').'</span>';
}
else if ($row['time_limit_unlimited'])
{
$tbl_content_cell = "<span class=\"smallgreen\">".$lng->txt('access_unlimited').'</span>';
}
else if ($row['expired'])
{
$tbl_content_cell = "<span class=\"smallred\">".$lng->txt('access_expired').'</span>';
}
else
{
$tbl_content_cell = ilFormat::formatDate($row[$key]);
}
break;
case 'last_login' :
case 'last_reminder' :
if ($row[$key] == null)
{
$tbl_content_cell = $lng->txt('no_date');
}
else
{
$tbl_content_cell = ilFormat::formatDate($row[$key]);
}
break;
default :
$tbl_content_cell = htmlspecialchars($row[$key]);
}
/*
if (is_array($tbl_content_cell))
{
$tbl->tpl->setCurrentBlock("tbl_cell_subtitle");
$tbl->tpl->setVariable("TBL_CELL_SUBTITLE",$tbl_content_cell[1]);
$tbl->tpl->parseCurrentBlock();
$tbl_content_cell = "<b>".$tbl_content_cell[0]."</b>";
}*/
$tbl->tpl->setCurrentBlock("tbl_content_cell");
$tbl->tpl->setVariable("TBL_CONTENT_CELL",$tbl_content_cell);
$tbl->tpl->parseCurrentBlock();
}
$tbl->tpl->setCurrentBlock("tbl_content_row");
$rowcolor = ilUtil::switchColor($count,"tblrow1","tblrow2");
$tbl->tpl->setVariable("ROWCOLOR", $rowcolor);
$tbl->tpl->parseCurrentBlock();
$count++;
}
$tbl->render();
// Add table to page
$this->tpl->setVariable("USER_TABLE",$a_tpl->get());
}

+ Here is the call graph for this function:

Field Documentation

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: