-
Functional Test
-
Minor
-
Moodle 4.0
Set up:
- You will need a file smaller than this limit (File 1), and a file larger than this limit (File 2).
- You will need a user who does not have moodle/course:ignorefilesizelimits (User 1) and one who does (User 2).
- You will need a course that both users can edit
- Create an instance of the File System repository, and place both files in the directory that it points to.
- Set post_max_size and upload_max_filesize in php.ini to something small e.g. 1M.
- Log in as User 1
- Go to a course and create a File resource.
- Attempt to drag-and-drop File 1 on to the Select Files file manager
- The file should be attached to the file manager
- Click on the file in the file manager and delete it.
- Attempt to drag-and-drop File 2 on to the Select Files file manager
- You should see the error message "The file File 2 is larger than the maximum size allowed."
- Click on the "Add..." icon in the File manager
- Using the Upload a file repository, attempt to upload File 1
- The file should be attached to the file manager
- Click on the file in the file manager and delete it.
- Click on the "Add..." icon in the File manager
- Using the Upload a file repository, attempt to upload File 2
- You should see the error message "The file you tried to upload is too large for the server to process."
- Using the File system repository instance you created, attempt to upload File 1
- The file should be attached to the file manager
- Click on the file in the file manager and delete it.
- Click on the "Add..." icon in the File manager
- Using the File system repository instance you created, attempt to upload File 2
- You should see the error message "The file is larger than the maximum size allowed."
- Log out
- Log in as User 2
- Go to a course and create a File resource.
- Attempt to drag-and-drop File 1 on to the Select Files file manager
- The file should be attached to the file manager
- Click on the file in the file manager and delete it.
- Attempt to drag-and-drop File 2 on to the Select Files file manager
- You should see the error message "The file File 2 is larger than the maximum size allowed."
- Click on the "Add..." icon in the File manager
- Using the Upload a file repository, attempt to upload File 1
- The file should be attached to the file manager
- Click on the file in the file manager and delete it.
- Click on the "Add..." icon in the File manager
- Using the Upload a file repository, attempt to upload File 2
- You should see the error message "The file you tried to upload is too large for the server to process."
- Using the File system repository instance you created, attempt to upload File 1
- The file should be attached to the file manager
- Click on the file in the file manager and delete it.
- Click on the "Add..." icon in the File manager
- Using the File system repository instance you created, attempt to upload File 2
- The file should be attached to the file manager
- is a QA test written for
-
MDL-54785 File System Repository silently obeys maximum file size
- Closed