Moodle Submission Restrictions
In Moodle assignments that use Cincopa's embedded upload iframe, it's important to control the types of files students can submit. Allowing only images and videos helps keep submissions relevant and easy to manage. Setting these restrictions ensures a smoother experience for both students and teachers.
Why Restrict File Types?
When students submit assignments via Moodle using the Cincopa upload iframe, unrestricted uploads may lead to issues with unsupported file types. To ensure a controlled and reliable user experience, Cincopa now supports a restriction mechanism that filters uploads at the iframe level.
How It Works
Moodle uses an iframe provided by Cincopa to handle media uploads inside assignments. A custom field can be added to the assignment or system configuration, which passes values to the iframe. These values determine the types of files that are allowed.
Supported File Extensions
Images: jpe, jpg, jpeg, webp, jfif, tif, tiff, heic, png, gif, bmp
Audio: amr, wav, wma, mp3, flac, aac, aif, aiff
Video: m4a, f4a, f4b, ogv, ogg, mkv, rmvb, mp4, f4v, f4p, m4v, flv, 3g2, 3gp, 3gpp, ts, tod, mod, m2t, m2ts, mts, asf, vob, m1v, qt, tix, div, divx, dv, wmv, mpeg, mpe, mpg, avi, webm, mov
Other: All other file types not listed above
How to implement
Step 1: Log in to the Moodle test site and navigate to the course where you want to create or edit an assignment by clicking on “Add an assignment or resource”.
Step 2: After creating an assignment in your course, then Scroll down to the Submission types section.
Step 3: Check the box for Cincopa submissions to allow uploads through Cincopa.
In the Allowed Asset Types field, enter the file types you want to allow.
For example, entering image,video
will restrict uploads to only image and video files.
Finally, click Save Assignment to apply the settings.
Step 4: Now, log out from the teacher account and log in as a student.
Step 5: Open the assignment and try uploading files through the Cincopa iframe. Only image and video files will be accepted.
If you try to upload any other file types, they will be rejected, and an error message will appear.
What Happens During Upload?
When a student tries to upload a file through the Moodle assignment, the system first reads the value set in the custom field (for example, allowed asset types
set to image,video
). This value is then passed as a parameter to the embedded Cincopa iframe, which handles the actual file upload interface.
Inside the iFrame, Cincopa uses this parameter to determine which file types should be allowed for upload. Before the file is uploaded to the server, the iFrame performs client-side validation by checking the file’s extension and format against the allowed list. If the file does not match the allowed types (for example, if the student tries to upload a PDF or other unsupported format), the upload is blocked immediately, and the student receives a message informing them of the restriction.