MDL-24108, display max file size in filepicker and filemanager
This commit is contained in:
@@ -979,6 +979,7 @@ $string['maximumshort'] = 'Max';
|
||||
$string['maximumupload'] = 'Maximum upload size';
|
||||
$string['maximumupload_help'] = 'This setting determines the largest size of file that can be uploaded to the course, limited by the site-wide setting set by an administrator. Activity modules also include a maximum upload size setting for further restricting the file size.';
|
||||
$string['maxsize'] = 'Max size: {$a}';
|
||||
$string['maxfilesize'] = 'Max single file size: {$a}';
|
||||
$string['memberincourse'] = 'People in the course';
|
||||
$string['messagebody'] = 'Message body';
|
||||
$string['messagedselectedusers'] = 'Selected users have been messaged and the recipient list has been reset.';
|
||||
|
||||
@@ -265,6 +265,7 @@ function form_filemanager_render($options) {
|
||||
$extra = '';
|
||||
}
|
||||
|
||||
$maxsize = get_string('maxfilesize', 'moodle', display_size(get_max_upload_file_size()));
|
||||
$html .= <<<FMHTML
|
||||
<div class="filemanager-loading mdl-align" id='filemanager-loading-{$client_id}'>
|
||||
$icon_progress
|
||||
@@ -275,6 +276,7 @@ $icon_progress
|
||||
<button id="btnadd-{$client_id}" onclick="return false">{$icon_add_file} $straddfile</button>
|
||||
<button id="btncrt-{$client_id}" onclick="return false">{$icon_add_folder} $strmakedir</button>
|
||||
<button id="btndwn-{$client_id}" onclick="return false" {$extra}>{$icon_download} $strdownload</button>
|
||||
<span> $maxsize </span>
|
||||
</div>
|
||||
<div class="filemanager-container" id="filemanager-{$client_id}">
|
||||
<ul id="draftfiles-{$client_id}" class="fm-filelist">
|
||||
|
||||
@@ -778,7 +778,7 @@ class core_renderer extends renderer_base {
|
||||
|
||||
/**
|
||||
* Produces a header for a block
|
||||
*
|
||||
*
|
||||
* @param block_contents $bc
|
||||
* @return string
|
||||
*/
|
||||
@@ -812,7 +812,7 @@ class core_renderer extends renderer_base {
|
||||
$output .= $bc->content;
|
||||
$output .= $this->block_footer($bc);
|
||||
$output .= html_writer::end_tag('div');
|
||||
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
@@ -1914,6 +1914,7 @@ 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()));
|
||||
$html = <<<EOD
|
||||
<div class="filemanager-loading mdl-align" id='filepicker-loading-{$client_id}'>
|
||||
$icon_progress
|
||||
@@ -1921,6 +1922,7 @@ $icon_progress
|
||||
<div id="filepicker-wrapper-{$client_id}" class="mdl-left" style="display:none">
|
||||
<div>
|
||||
<button id="filepicker-button-{$client_id}">$straddfile</button>
|
||||
<span> $maxsize </span>
|
||||
</div>
|
||||
EOD;
|
||||
if ($options->env != 'url') {
|
||||
|
||||
Reference in New Issue
Block a user