mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Merge branch 'MDL-33717_admin_message2' of git://github.com/andyjdavis/moodle
This commit is contained in:
commit
5b7621f78d
@ -455,11 +455,9 @@ class core_files_renderer extends plugin_renderer_base {
|
||||
$maxbytes = display_size($fm->options->maxbytes);
|
||||
if (empty($options->maxfiles) || $options->maxfiles == -1) {
|
||||
$maxsize = get_string('maxfilesize', 'moodle', $maxbytes);
|
||||
//$string['maxfilesize'] = 'Maximum size for new files: {$a}';
|
||||
} else {
|
||||
$strparam = (object)array('size' => $maxbytes, 'attachments' => $options->maxfiles);
|
||||
$maxsize = get_string('maxsizeandattachments', 'moodle', $strparam);
|
||||
//$string['maxsizeandattachments'] = 'Maximum size for new files: {$a->size}, maximum attachments: {$a->attachments}';
|
||||
}
|
||||
// TODO MDL-32020 also should say about 'File types accepted'
|
||||
return '<span>'. $maxsize. '</span>';
|
||||
|
@ -6049,6 +6049,10 @@ function display_size($size) {
|
||||
|
||||
static $gb, $mb, $kb, $b;
|
||||
|
||||
if ($size === USER_CAN_IGNORE_FILE_SIZE_LIMITS) {
|
||||
return get_string('unlimited');
|
||||
}
|
||||
|
||||
if (empty($gb)) {
|
||||
$gb = get_string('sizegb');
|
||||
$mb = get_string('sizemb');
|
||||
|
Loading…
x
Reference in New Issue
Block a user