mirror of
https://github.com/moodle/moodle.git
synced 2025-06-02 06:05:31 +02:00
MDL-24382, fixed display of file size limit in filepicker
This commit is contained in:
parent
fe9d5f7efc
commit
b817205bec
@ -75,6 +75,7 @@ class MoodleQuickForm_filepicker extends HTML_QuickForm_input {
|
||||
$args->accepted_types = $this->_options['accepted_types']?$this->_options['accepted_types']:'*';
|
||||
$args->return_types = FILE_INTERNAL;
|
||||
$args->itemid = $draftitemid;
|
||||
$args->maxbytes = $this->_options['maxbytes'];
|
||||
$args->context = $PAGE->context;
|
||||
|
||||
$html = $this->_getTabs();
|
||||
|
@ -1914,7 +1914,12 @@ class core_renderer extends renderer_base {
|
||||
if (empty($currentfile)) {
|
||||
$currentfile = get_string('nofilesattached', 'repository');
|
||||
}
|
||||
$maxsize = get_string('maxfilesize', 'moodle', display_size(get_max_upload_file_size()));
|
||||
if ($options->maxbytes) {
|
||||
$size = $options->maxbytes;
|
||||
} else {
|
||||
$size = get_max_upload_file_size();
|
||||
}
|
||||
$maxsize = get_string('maxfilesize', 'moodle', display_size($size));
|
||||
$html = <<<EOD
|
||||
<div class="filemanager-loading mdl-align" id='filepicker-loading-{$client_id}'>
|
||||
$icon_progress
|
||||
|
Loading…
x
Reference in New Issue
Block a user