From 2d129fbea02de23736bdcb2e0a39fb4afe00fb5a Mon Sep 17 00:00:00 2001 From: Charles Fulton Date: Wed, 9 May 2012 05:07:49 -0700 Subject: [PATCH] MDL-32861 filemanager: respect course upload limit --- lib/form/filemanager.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/form/filemanager.php b/lib/form/filemanager.php index ca821f1256b..3fa15e11c17 100644 --- a/lib/form/filemanager.php +++ b/lib/form/filemanager.php @@ -273,7 +273,8 @@ function form_filemanager_render($options) { $extra = ''; } - $maxsize = get_string('maxfilesize', 'moodle', display_size(get_max_upload_file_size($CFG->maxbytes, $course_maxbytes, $options->maxbytes))); + $options->maxbytes = get_max_upload_file_size($CFG->maxbytes, $course_maxbytes, $options->maxbytes); + $maxsize = get_string('maxfilesize', 'moodle', display_size($options->maxbytes)); $loading = get_string('loading', 'repository'); $html .= <<