-
Functional Test
-
Minor
-
Moodle 4.3
Setup
- Set post_max_size and upload_max_filesize in php.ini to something small e.g. 1M.
- Restart your server to ensure the limits take effect.
- Prepare two files: one that is smaller than the limit you set in the previous steps (Small file), and one that is larger (Large file).
- Go to Site admin -> Plugins -> Repositories -> File system. Create an instance of the File System repository, and place both files in the directory that it points to.
- Create a course with a Teacher participant.
- Note: This test assumes that the Teacher role has upload limitations with moodle/course:ignorefilesizelimits set to disabled.
Drag and drop (Teacher)
- Log in as the Teacher
- Go to a course and create a File resource.
- Drag-and-drop Small file to the Select Files file manager
- CONFIRM the file attaches to the file manager successfully
- Click on the file in the file manager and delete it.
- Drag-and-drop Small file to the Select Files file manager
- CONFIRM you are not able to upload the file.
Upload a file (Teacher)
- Click on the "Add..." icon in the File manager
- Using the Upload a file repository, attempt to upload Small file
- CONFIRM the file attaches to the file manager successfully
- 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 Large file
- CONFIRM you are not able to upload the file.
File system instance (Teacher)
- Click on the "Add..." icon in the File manager
- Using the File system repository instance you created, attempt to upload Small file
- 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 Large file
- CONFIRM you are not able to upload the file.
Drag and drop (Admin)
- Log in as the Admin
- Go to the same course and create a File resource.
- Drag-and-drop Small file to the Select Files file manager
- CONFIRM the file attaches to the file manager successfully
- Click on the file in the file manager and delete it.
- Drag-and-drop Small file to the Select Files file manager
- CONFIRM you are not able to upload the file.
Upload a file (Admin)
- Click on the "Add..." icon in the File manager
- Using the Upload a file repository, attempt to upload Small file
- CONFIRM the file attaches to the file manager successfully
- 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 Large file
- CONFIRM you are not able to upload the file.
File system instance (Admin)
- Click on the "Add..." icon in the File manager
- Using the File system repository instance you created, attempt to upload Small file
- 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 Large file
- CONFIRM the file attaches to the file manager successfully
- is a QA test written for
-
MDL-54785 File System Repository silently obeys maximum file size
- Closed