mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 00:42:54 +02:00
MDL-46317 admin: convert userquota config from text to filesize widget
This commit is contained in:
parent
e2d97a4659
commit
e945b883fa
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
use core_admin\local\settings\filesize as filesize;
|
||||
|
||||
if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
|
||||
|
||||
// "ip blocker" settingpage
|
||||
@ -36,12 +38,9 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
|
||||
// maxbytes set to 0 will allow the maximum server limit for uploads
|
||||
$temp->add(new admin_setting_configselect('maxbytes', new lang_string('maxbytes', 'admin'), new lang_string('configmaxbytes', 'admin'), 0, $max_upload_choices));
|
||||
// 100MB
|
||||
$defaultuserquota = 104857600;
|
||||
$params = new stdClass();
|
||||
$params->bytes = $defaultuserquota;
|
||||
$params->displaysize = display_size($defaultuserquota);
|
||||
$temp->add(new admin_setting_configtext('userquota', new lang_string('userquota', 'admin'),
|
||||
new lang_string('configuserquota', 'admin', $params), $defaultuserquota, PARAM_INT, 30));
|
||||
$defaultuserquota = 100 * filesize::UNIT_MB;
|
||||
$temp->add(new filesize('userquota', new lang_string('userquota', 'admin'),
|
||||
new lang_string('userquota_desc', 'admin'), $defaultuserquota));
|
||||
|
||||
$temp->add(new admin_setting_configcheckbox('allowobjectembed', new lang_string('allowobjectembed', 'admin'), new lang_string('configallowobjectembed', 'admin'), 0));
|
||||
$temp->add(new admin_setting_configcheckbox('enabletrusttext', new lang_string('enabletrusttext', 'admin'), new lang_string('configenabletrusttext', 'admin'), 0));
|
||||
|
@ -1390,6 +1390,7 @@ $string['userpreference'] = 'User preference';
|
||||
$string['userpolicies'] = 'User policies';
|
||||
$string['users'] = 'Users';
|
||||
$string['userquota'] = 'User quota';
|
||||
$string['userquota_desc'] = 'The maximum number of bytes that a user can store in their own private file area.';
|
||||
$string['usesitenameforsitepages'] = 'Use site name for site pages';
|
||||
$string['usetags'] = 'Enable tags functionality';
|
||||
$string['validateemptylineerror'] = 'Empty lines are not valid';
|
||||
|
Loading…
x
Reference in New Issue
Block a user