Commit 4c1e28a9 authored by Richard Mansfield's avatar Richard Mansfield

Display used quota to admin on account settings page (bug #909831)

Change-Id: Id5cf59438b2399d1d7a6d28766523dfff0ea997f
Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
parent e5430524
...@@ -117,11 +117,12 @@ $elements['expiry'] = array( ...@@ -117,11 +117,12 @@ $elements['expiry'] = array(
'maxyear' => $currentdate['year'] + 20, 'maxyear' => $currentdate['year'] + 20,
'defaultvalue' => $user->expiry 'defaultvalue' => $user->expiry
); );
$quotaused = get_string('quotaused', 'admin') . ': ' . display_size($user->quotaused);
if ($USER->get('admin') || get_config_plugin('artefact', 'file', 'institutionaloverride')) { if ($USER->get('admin') || get_config_plugin('artefact', 'file', 'institutionaloverride')) {
$elements['quota'] = array( $elements['quota'] = array(
'type' => 'bytes', 'type' => 'bytes',
'title' => get_string('filequota','admin'), 'title' => get_string('filequota','admin'),
'description' => get_string('filequotadescription','admin'), 'description' => get_string('filequotadescription','admin') . '<br>' . $quotaused,
'rules' => array('integer' => true), 'rules' => array('integer' => true),
'defaultvalue' => $user->quota, 'defaultvalue' => $user->quota,
); );
...@@ -131,7 +132,7 @@ else { ...@@ -131,7 +132,7 @@ else {
'type' => 'text', 'type' => 'text',
'disabled' => true, 'disabled' => true,
'title' => get_string('filequota', 'admin'), 'title' => get_string('filequota', 'admin'),
'description' => get_string('filequotadescription', 'admin'), 'description' => get_string('filequotadescription', 'admin') . '<br>' . $quotaused,
'value' => display_size($user->quota), 'value' => display_size($user->quota),
); );
} }
......
...@@ -622,6 +622,7 @@ $string['deleteuser'] = 'Delete User'; ...@@ -622,6 +622,7 @@ $string['deleteuser'] = 'Delete User';
$string['userdeletedsuccessfully'] = 'User deleted successfully'; $string['userdeletedsuccessfully'] = 'User deleted successfully';
$string['confirmdeleteuser'] = 'Are you sure you want to delete this user?'; $string['confirmdeleteuser'] = 'Are you sure you want to delete this user?';
$string['filequota'] = 'File quota (MB)'; $string['filequota'] = 'File quota (MB)';
$string['quotaused'] = 'Quota used';
$string['filequotadescription'] = 'Total storage available in the user\'s files area.'; $string['filequotadescription'] = 'Total storage available in the user\'s files area.';
$string['addusertoinstitution'] = 'Add User to Institution'; $string['addusertoinstitution'] = 'Add User to Institution';
$string['removeuserfrominstitution'] = 'Remove user from this institution'; $string['removeuserfrominstitution'] = 'Remove user from this institution';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment