ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Class ilDiskQuotaChecker. More...
Public Member Functions | |
__construct () | |
Static Public Member Functions | |
static | _lookupDiskQuota ($a_user_id) |
Gets the disk quota info for the specified user account. More... | |
static | _lookupDiskUsage ($a_user_id) |
Gets the disk usage info for the specified user account. More... | |
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. More... | |
static | _updateDiskUsageReport () |
Updates the disk usage info of all user accounts. More... | |
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. More... | |
static | _lookupDiskUsageReportLastUpdate () |
Returns the SQL datetime of the last update of the disk usage report. More... | |
static | _lookupPersonalWorkspaceDiskQuota ($a_user_id) |
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. More... | |
static | __saveUserData ($a_user_id, $a_type, $a_size, $a_count) |
Save disk quota for user. More... | |
static | __updateDiskUsageReportOfTypeHelper ($a_access_obj, $a_objects, &$a_result) |
for each objects of an owner, count the number of objects and sum up the size More... | |
static | __getRepositoryObjectsByType ($a_type) |
get all objects of the desired type which are in the repository ordered by owner More... | |
static | __getWorkspaceObjectsByType ($a_type) |
get all objects of the desired type which are in the personal workspace ordered by owner More... | |
static | __updateDiskUsageReportOfUsers ($a_access_obj, $a_type) |
Updates the disk usage report of the specified object type for all user accounts. More... | |
ilDiskQuotaChecker::__construct | ( | ) |
Definition at line 35 of file class.ilDiskQuotaChecker.php.
|
staticprivate |
get all objects of the desired type which are in the repository ordered by owner
type | $a_type |
Definition at line 474 of file class.ilDiskQuotaChecker.php.
References $a_type, $DIC, and $ilDB.
|
staticprivate |
get all objects of the desired type which are in the personal workspace ordered by owner
type | $a_type |
Definition at line 497 of file class.ilDiskQuotaChecker.php.
References $a_type, $DIC, and $ilDB.
|
staticprivate |
Save disk quota for user.
int | $a_user_id | |
string | $a_type | |
int | $a_size | |
int | $a_count |
Definition at line 420 of file class.ilDiskQuotaChecker.php.
References $a_type, $DIC, and $ilDB.
|
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 392 of file class.ilDiskQuotaChecker.php.
References $a_type, $data, and $res.
|
staticprivate |
for each objects of an owner, count the number of objects and sum up the size
object | $a_access_obj | |
object | $a_objects | |
array | $a_result |
Definition at line 452 of file class.ilDiskQuotaChecker.php.
References $row, and ilDBConstants\FETCHMODE_OBJECT.
|
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 526 of file class.ilDiskQuotaChecker.php.
References $a_type, $data, $DIC, $ilDB, $res, $row, and ilDBConstants\FETCHMODE_OBJECT.
|
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 222 of file class.ilDiskQuotaChecker.php.
References $data, $DIC, $ilDB, $res, $row, and ilDBConstants\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 $DIC, $ilDB, $info, $res, $row, and ilDBConstants\FETCHMODE_OBJECT.
Referenced by ilObjUserGUI\getValues().
|
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 144 of file class.ilDiskQuotaChecker.php.
References $DIC, $ilDB, $info, $key, $res, $row, $type, and ilDBConstants\FETCHMODE_OBJECT.
Referenced by ilObjUserGUI\getValues(), 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 659 of file class.ilDiskQuotaChecker.php.
References $DIC, $ilDB, $res, $row, and ilDBConstants\FETCHMODE_ASSOC.
Referenced by ilObjFileAccessSettingsGUI\viewDiskQuotaReport().
|
static |
Definition at line 673 of file class.ilDiskQuotaChecker.php.
References $DIC, $ilDB, $info, $res, $row, and ilDBConstants\FETCHMODE_OBJECT.
Referenced by ilDiskQuotaHandler\getStatusLegend(), ilObjUserGUI\getValues(), and ilDiskQuotaHandler\isUploadPossible().
|
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 561 of file class.ilDiskQuotaChecker.php.
References $DIC, $ilDB, $res, $row, and ilDBConstants\FETCHMODE_ASSOC.
Referenced by ilDAVCronDiskQuota\run().
|
static |
Definition at line 541 of file class.ilDiskQuotaChecker.php.
References $DIC, and $ilSetting.
Referenced by ilDAVCronDiskQuota\run().
|
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 334 of file class.ilDiskQuotaChecker.php.
Referenced by ilDAVCronDiskQuota\run().