ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilDAVCronDiskQuota Class Reference

Soft disk quota notifications. More...

+ Inheritance diagram for ilDAVCronDiskQuota:
+ Collaboration diagram for ilDAVCronDiskQuota:

Public Member Functions

 getId ()
 Get id.
 getTitle ()
 Get title.
 getDescription ()
 Get description.
 getDefaultScheduleType ()
 Get schedule type.
 getDefaultScheduleValue ()
 Get schedule value.
 hasAutoActivation ()
 Is to be activated on "installation".
 hasFlexibleSchedule ()
 Can the schedule be configured?
 hasCustomSettings ()
 Has cron job any custom setting which can be edited?
 run ()
 Run job.
 addCustomSettingsToForm (ilPropertyFormGUI $a_form)
 Add custom settings to form.
 saveCustomSettings (ilPropertyFormGUI $a_form)
 Save custom settings.
 addToExternalSettingsForm ($a_form_id, array &$a_fields, $a_is_active)
 Add external settings to form.
 activationWasToggled ($a_currently_active)
 Cron job status was changed.
- Public Member Functions inherited from ilCronJob
 isActive ($a_ts_last_run, $a_schedule_type, $a_schedule_value, $a_manual=false)
 Is job currently active?
 getScheduleType ()
 Get current schedule type (if flexible)
 getScheduleValue ()
 Get current schedule value (if flexible)
 setSchedule ($a_type, $a_value)
 Update current schedule (if flexible)
 getValidScheduleTypes ()
 Get all available schedule types.
 isManuallyExecutable ()
 Defines whether or not a cron job can be started manually.

Additional Inherited Members

- Data Fields inherited from ilCronJob
const SCHEDULE_TYPE_DAILY = 1
const SCHEDULE_TYPE_IN_MINUTES = 2
const SCHEDULE_TYPE_IN_HOURS = 3
const SCHEDULE_TYPE_IN_DAYS = 4
const SCHEDULE_TYPE_WEEKLY = 5
const SCHEDULE_TYPE_MONTHLY = 6
const SCHEDULE_TYPE_QUARTERLY = 7
const SCHEDULE_TYPE_YEARLY = 8
- Protected Member Functions inherited from ilCronJob
 checkSchedule ($a_ts_last_run, $a_schedule_type, $a_schedule_value)

Detailed Description

Soft disk quota notifications.

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

Definition at line 12 of file class.ilDAVCronDiskQuota.php.

Member Function Documentation

ilDAVCronDiskQuota::activationWasToggled (   $a_currently_active)

Cron job status was changed.

Parameters
bool$a_currently_active

Reimplemented from ilCronJob.

Definition at line 157 of file class.ilDAVCronDiskQuota.php.

{
// #12221
$settings = new ilSetting('disk_quota');
$settings->set('enabled', $a_currently_active);
/* objDefinition is not available in setup, we cannot use ilObject
require_once 'Services/WebDAV/classes/class.ilObjDiskQuotaSettings.php';
$disk_quota_obj = ilObjDiskQuotaSettings::getInstance();
$disk_quota_obj->setDiskQuotaEnabled((bool)$a_currently_active);
$disk_quota_obj->update();
*/
}
ilDAVCronDiskQuota::addCustomSettingsToForm ( ilPropertyFormGUI  $a_form)

Add custom settings to form.

Parameters
ilPropertyFormGUI$a_form

Reimplemented from ilCronJob.

Definition at line 84 of file class.ilDAVCronDiskQuota.php.

References $lng, ilPropertyFormGUI\addItem(), ilObjDiskQuotaSettings\getInstance(), ilTextInputGUI\setValue(), and ilCheckboxInputGUI\setValue().

{
global $lng;
$lng->loadLanguageModule("file");
require_once 'Services/WebDAV/classes/class.ilObjDiskQuotaSettings.php';
// 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($disk_quota_obj->isDiskQuotaReminderMailEnabled());
$cb_prop_reminder->setInfo($lng->txt('disk_quota_reminder_mail_desc'));
$a_form->addItem($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($disk_quota_obj->isDiskQuotaSummaryMailEnabled());
$cb_prop_summary->setInfo($lng->txt('enable_disk_quota_summary_mail_desc'));
$a_form->addItem($cb_prop_summary);
// Edit disk quota recipients
$summary_rcpt = new ilTextInputGUI($lng->txt("disk_quota_summary_rctp"), "disk_quota_summary_rctp");
$summary_rcpt->setValue($disk_quota_obj->getSummaryRecipients());
$summary_rcpt->setInfo($lng->txt('disk_quota_summary_rctp_desc'));
$cb_prop_summary->addSubItem($summary_rcpt);
}

+ Here is the call graph for this function:

ilDAVCronDiskQuota::addToExternalSettingsForm (   $a_form_id,
array &  $a_fields,
  $a_is_active 
)

Add external settings to form.

Parameters
int$a_form_id
array$a_fields
bool$a_is_active

Reimplemented from ilCronJob.

Definition at line 126 of file class.ilDAVCronDiskQuota.php.

References $lng, ilDiskQuotaActivationChecker\_isReminderMailActive(), ilDiskQuotaActivationChecker\_isSummaryMailActive(), ilAdministrationSettingsFormHandler\FORM_FILES_QUOTA, ilAdministrationSettingsFormHandler\FORM_REPOSITORY, and ilAdministrationSettingsFormHandler\VALUE_BOOL.

{
global $lng;
$lng->loadLanguageModule("file");
switch($a_form_id)
{
require_once('Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php');
$subitems = array(
"enable_disk_quota_reminder_mail" => array(
),
"enable_disk_quota_summary_mail" => array(
)
);
$a_fields["repository_disk_quota"] = array($a_is_active ?
$lng->txt("enabled") :
$lng->txt("disabled"),
null, $subitems);
break;
}
}

+ Here is the call graph for this function:

ilDAVCronDiskQuota::getDefaultScheduleType ( )

Get schedule type.

Returns
int

Reimplemented from ilCronJob.

Definition at line 35 of file class.ilDAVCronDiskQuota.php.

References ilCronJob\SCHEDULE_TYPE_DAILY.

ilDAVCronDiskQuota::getDefaultScheduleValue ( )

Get schedule value.

Returns
int|array

Reimplemented from ilCronJob.

Definition at line 40 of file class.ilDAVCronDiskQuota.php.

{
return;
}
ilDAVCronDiskQuota::getDescription ( )

Get description.

Returns
string

Reimplemented from ilCronJob.

Definition at line 27 of file class.ilDAVCronDiskQuota.php.

References $lng.

{
global $lng;
$lng->loadLanguageModule("file");
return $lng->txt("repository_disk_quota_info");
}
ilDAVCronDiskQuota::getId ( )

Get id.

Returns
string

Reimplemented from ilCronJob.

Definition at line 14 of file class.ilDAVCronDiskQuota.php.

{
return "rep_disk_quota";
}
ilDAVCronDiskQuota::getTitle ( )

Get title.

Returns
string

Reimplemented from ilCronJob.

Definition at line 19 of file class.ilDAVCronDiskQuota.php.

References $lng.

{
global $lng;
$lng->loadLanguageModule("file");
return $lng->txt("repository_disk_quota");
}
ilDAVCronDiskQuota::hasAutoActivation ( )

Is to be activated on "installation".

Returns
boolean

Reimplemented from ilCronJob.

Definition at line 45 of file class.ilDAVCronDiskQuota.php.

{
return false;
}
ilDAVCronDiskQuota::hasCustomSettings ( )

Has cron job any custom setting which can be edited?

Returns
boolean

Reimplemented from ilCronJob.

Definition at line 55 of file class.ilDAVCronDiskQuota.php.

{
return true;
}
ilDAVCronDiskQuota::hasFlexibleSchedule ( )

Can the schedule be configured?

Returns
boolean

Reimplemented from ilCronJob.

Definition at line 50 of file class.ilDAVCronDiskQuota.php.

{
return false;
}
ilDAVCronDiskQuota::saveCustomSettings ( ilPropertyFormGUI  $a_form)

Save custom settings.

Parameters
ilPropertyFormGUI$a_form
Returns
boolean

Reimplemented from ilCronJob.

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

References $_POST, ilObjDiskQuotaSettings\getInstance(), and ilUtil\stripSlashes().

{
require_once 'Services/WebDAV/classes/class.ilObjDiskQuotaSettings.php';
$disk_quota_obj->setDiskQuotaReminderMailEnabled($_POST['enable_disk_quota_reminder_mail'] == '1');
$disk_quota_obj->isDiskQuotaSummaryMailEnabled($_POST['enable_disk_quota_summary_mail'] == '1');
$disk_quota_obj->setSummaryRecipients(ilUtil::stripSlashes($_POST['disk_quota_summary_rctp']));
$disk_quota_obj->update();
return true;
}

+ Here is the call graph for this function:


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