ILIAS
Release_4_1_x_branch Revision 61804
|
Class ilDiskQuotaChecker. More...
Public Member Functions | |
ilDiskQuotaChecker () |
Static Public Member Functions | |
static | _lookupDiskQuota ($a_user_id) |
Gets the disk quota info for the specified user account. | |
static | _lookupDiskUsage ($a_user_id) |
Gets the disk usage info for the specified user account. | |
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. | |
static | _updateDiskUsageReport () |
Updates the disk usage info of all user accounts. | |
static | _sendSummaryMails () |
static | _sendReminderMails () |
Sends reminder e-mails to all users who have access and who have exceeded their disk quota and who haven't received a reminder mail in the past 7 days. | |
static | _lookupDiskUsageReportLastUpdate () |
Returns the SQL datetime of the last update of the disk usage report. |
Static Private Member Functions | |
static | __updateDiskUsageReportOfType ($a_access_obj, $a_type) |
Updates the disk usage report of the specified object type for all user accounts. | |
static | __updateDiskUsageReportOfUsers ($a_access_obj, $a_type) |
Updates the disk usage report of the specified object type for all user accounts. |
Class ilDiskQuotaChecker.
Definition at line 33 of file class.ilDiskQuotaChecker.php.
|
staticprivate |
Updates the disk usage report of the specified object type for all user accounts.
The results are stored in table usr_pref. For each user which owns files the following rows are inserted:
$a_access_obj | Object A access object, such as ilObjFileAccess. |
$a_type | string The type of the access object, such as 'file'. |
Keyword Value Description 'disk_usage.file.count' integer The number of files owned by the user 'disk_usage.file.usage' integer The disk usage of the files
Definition at line 387 of file class.ilDiskQuotaChecker.php.
References $ilDB, $res, $row, $size, and DB_FETCHMODE_OBJECT.
Referenced by _updateDiskUsageReport().
|
staticprivate |
Updates the disk usage report of the specified object type for all user accounts.
The results are stored in table usr_pref. For each user which owns files the following rows are inserted:
$a_access_obj | Object A access object, such as ilObjFileAccess. |
$a_type | string The type of the access object, such as 'file'. |
Keyword Value Description 'disk_usage.file.count' integer The number of files owned by the user 'disk_usage.file.usage' integer The disk usage of the files
Definition at line 464 of file class.ilDiskQuotaChecker.php.
References $data, $ilDB, $res, $row, and DB_FETCHMODE_OBJECT.
Referenced by _updateDiskUsageReport().
|
static |
Reads disk quota/disk usage report of the user accounts.
Returns an array or associative arrays with information about the disk usage of each user account.
string | usage filter values: 1 = all users 2 = only users who don't use disk space 3 = only users who use disk space 4 = only users who have exceeded their quota |
string | access filter values: 1 = all users 2 = only users who have access 4 = only users who have no access |
'disk_usage'=>integer, // the disk usage in bytes 'disk_quota'=>integer, // the disk quota in bytes } }
Definition at line 219 of file class.ilDiskQuotaChecker.php.
References $data, $ilDB, $res, $row, and DB_FETCHMODE_ASSOC.
Referenced by ilObjFileAccessSettingsGUI\viewDiskQuotaReport().
|
static |
Gets the disk quota info for the specified user account.
Returns an associative array with information about the disk quota of this user account.
integer | user id |
"role_disk_quota"=>integer or positive infinity, // the disk quota specified by the role in bytes. // the disk quota is positive infinity if // the user has the system administrator role
"user_disk_quota"=>integer // the disk quota specified on the user account // form.
"disk_quota"=>integer or positive infinity // the disk quota which is in effect. This is // either role_quota or user_quota whichever // is higher.
"last_reminder"=>string or null // the SQL datetime the last time a disk quota // reminder was sent to the user }
Definition at line 70 of file class.ilDiskQuotaChecker.php.
References $ilDB, $res, $row, and DB_FETCHMODE_OBJECT.
Referenced by ilObjUserGUI\initForm().
|
static |
Gets the disk usage info for the specified user account.
Returns an associative array with information about the disk usage of this user account.
integer | user id |
'disk_usage'=>integer, // the disk usage in bytes
'details' array(array('type'=>string,'count'=>integer,'size'=>integer),...) // an associative array with the disk // usage in bytes for each object type
Definition at line 140 of file class.ilDiskQuotaChecker.php.
References $ilDB, $res, $row, and DB_FETCHMODE_OBJECT.
Referenced by _sendReminderMails(), ilObjUserGUI\initForm(), and ilDiskQuotaSummaryNotification\send().
|
static |
Returns the SQL datetime of the last update of the disk usage report.
Returns null, if the disk usage report has never been made.
Definition at line 613 of file class.ilDiskQuotaChecker.php.
References $ilDB, $res, $row, and DB_FETCHMODE_ASSOC.
Referenced by ilObjFileAccessSettingsGUI\viewDiskQuotaReport().
|
static |
Sends reminder e-mails to all users who have access and who have exceeded their disk quota and who haven't received a reminder mail in the past 7 days.
Definition at line 513 of file class.ilDiskQuotaChecker.php.
References $ilDB, $res, $row, _lookupDiskUsage(), and DB_FETCHMODE_ASSOC.
Referenced by ilCronDiskQuotaCheck\sendReminderMails().
|
static |
Definition at line 493 of file class.ilDiskQuotaChecker.php.
References $ilSetting.
Referenced by ilCronDiskQuotaCheck\sendSummaryMails().
|
static |
Updates the disk usage info of all user accounts.
The result is stored in usr_pref of each user. The following keywords are used:
'disk_usage_last_update' - the unix timestamp of the last update. 'disk_usage.file' - the disk usage of file objects owned by the user.
Definition at line 330 of file class.ilDiskQuotaChecker.php.
References $ilDB, __updateDiskUsageReportOfType(), and __updateDiskUsageReportOfUsers().
Referenced by ilCronDiskQuotaCheck\updateDiskUsageStatistics().
ilDiskQuotaChecker::ilDiskQuotaChecker | ( | ) |
Definition at line 35 of file class.ilDiskQuotaChecker.php.