mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 01:46:45 +02:00
MDL-53577 repository: Added maxbytes error message
Changing the error message that is displayed to users when they upload a file that is greater than the maximum upload size. Does not include all upload cases; focuses on those most used by students.
This commit is contained in:
parent
fed66ad9e2
commit
a2fb838e82
8 changed files with 54 additions and 9 deletions
|
@ -191,7 +191,9 @@ class repository_upload extends repository {
|
|||
}
|
||||
|
||||
if (($maxbytes!==-1) && (filesize($_FILES[$elname]['tmp_name']) > $maxbytes)) {
|
||||
throw new file_exception('maxbytesforfile', $_FILES[$elname]['name']);
|
||||
$maxbytesdisplay = display_size($maxbytes);
|
||||
throw new file_exception('maxbytesfile', (object) array('file' => $record->filename,
|
||||
'size' => $maxbytesdisplay));
|
||||
}
|
||||
|
||||
if (file_is_draft_area_limit_reached($record->itemid, $areamaxbytes, filesize($_FILES[$elname]['tmp_name']))) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue