4 include_once
'Services/Mail/classes/class.ilMailNotification.php';
5 include_once
'Services/WebDAV/classes/class.ilDiskQuotaChecker.php';
21 $rcpt = $dqs->get(
'summary_rcpt');
22 $rcpt = explode(
',', $rcpt);
23 $loginnames = array();
24 foreach ($rcpt as $loginname) {
25 $loginname = trim($loginname);
27 $loginnames[] = $loginname;
32 parent::__construct($a_is_personal_workspace);
50 "SELECT u.usr_id,u.gender,u.firstname,u.lastname,u.login,u.email,u.last_login,u.active," .
51 "u.time_limit_unlimited, " . $ilDB->fromUnixtime(
"u.time_limit_from") .
", " . $ilDB->fromUnixtime(
"u.time_limit_until") .
"," .
57 "CASE WHEN u.active = 0 THEN '0001-01-01' ELSE CASE WHEN u.time_limit_unlimited=1 THEN '9999-12-31' ELSE " . $ilDB->fromUnixtime(
"u.time_limit_until") .
" END END access_until," .
59 " CASE WHEN " . $ilDB->unixTimestamp() .
" BETWEEN u.time_limit_from AND u.time_limit_until THEN 0 ELSE 1 END expired," .
60 "rq.role_disk_quota, system_role.rol_id role_id, " .
61 "p1.value+0 user_disk_quota," .
62 "p2.value+0 disk_usage, " .
63 "p3.value last_update, " .
64 "p5.value language, " .
68 "CASE WHEN rq.role_disk_quota>p1.value+0 OR p1.value IS NULL THEN rq.role_disk_quota ELSE p1.value+0 END disk_quota " .
72 "JOIN (SELECT u.usr_id usr_id,MAX(rd.disk_quota) role_disk_quota " .
74 "JOIN rbac_ua ua ON ua.usr_id=u.usr_id " .
75 "JOIN rbac_fa fa ON fa.rol_id=ua.rol_id AND fa.parent=%s " .
76 "JOIN role_data rd ON rd.role_id=ua.rol_id WHERE u.usr_id=ua.usr_id GROUP BY u.usr_id) rq ON rq.usr_id=u.usr_id " .
79 "LEFT JOIN rbac_ua system_role ON system_role.usr_id=u.usr_id AND system_role.rol_id = %s " .
82 "LEFT JOIN usr_pref p1 ON p1.usr_id=u.usr_id AND p1.keyword = 'disk_quota' " .
85 "LEFT JOIN usr_pref p2 ON p2.usr_id=u.usr_id AND p2.keyword = 'disk_usage' " .
88 "LEFT JOIN usr_pref p3 ON p3.usr_id=u.usr_id AND p3.keyword = 'disk_usage.last_update' " .
91 "LEFT JOIN usr_pref p5 ON p5.usr_id=u.usr_id AND p5.keyword = 'language' " .
96 'WHERE (((p1.value+0 > rq.role_disk_quota OR rq.role_disk_quota IS NULL) AND p2.value+0 > p1.value+0) OR 97 ((rq.role_disk_quota > p1.value+0 OR p1.value IS NULL) AND p2.value+0 > rq.role_disk_quota)) ' .
98 'AND (u.active=1 AND (u.time_limit_unlimited = 1 OR ' . $ilDB->unixTimestamp() .
' BETWEEN u.time_limit_from AND u.time_limit_until)) ',
99 array(
'integer',
'integer'),
100 array(ROLE_FOLDER_ID, SYSTEM_ROLE_ID)
106 while (
$row = $ilDB->fetchAssoc(
$res)) {
109 $users[$counter][
'disk_quota'] =
$row[
'disk_quota'];
110 $users[$counter][
'disk_usage'] = $details[
'disk_usage'];
112 $users[$counter][
'firstname'] =
$row[
'firstname'];
113 $users[$counter][
'lastname'] =
$row[
'lastname'];
135 $numUsers = count(
$users);
138 $this->
appendBody(
"\n---------------------------------------------------\n\n");
143 $user[
'lastname'] .
', ' . $user[
'firstname']
157 $this->
getLanguage()->txt(
'currently_used_disk_space') .
': ' .
163 $this->
getLanguage()->txt(
'usrf_profile_link') .
': ' .
167 if ($counter < $numUsers - 1) {
175 $this->
getMail()->appendInstallationSignature(
true);
177 $this->
sendMail(array($rcp), array(
'system'),
false);
initLanguage($a_usr_id)
Init language.
static _lookupId($a_user_str)
Lookup id by login.
__construct($a_is_personal_workspace=false)
{}
Base class for course/group mail notifications.
foreach($_POST as $key=> $value) $res
send()
Send notifications.
sendMail(array $a_rcp, $a_type, $a_parse_recipients=true)
getRecipients()
get array of recipients
setRecipients(array $a_rcp)
static _lookupDiskUsage($a_user_id)
Gets the disk usage info for the specified user account.
appendBody($a_body)
Append body text.
static formatSize($size, $a_mode='short', $a_lng=null)
Returns the specified file size value in a human friendly form.
static getSalutation($a_usr_id, ilLanguage $a_language=null)