-
New Feature
-
Resolution: Fixed
-
Major
-
2.5, 3.0.4, 3.1, 3.2.2, 3.3
-
MOODLE_25_STABLE, MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE, MOODLE_33_STABLE
-
MOODLE_32_STABLE, MOODLE_33_STABLE
-
MDL-39913-master-new-validation -
-
3.3 sprint 5
DESCRIPTION UP FOR DISCUSSION IN https://moodle.org/mod/forum/discuss.php?d=217532#p996584
When creating an assignment, teachers should have the option to restrict the types of files students may submit. When a student edits their submission, the filepicker should not allow files to be uploaded that do not match the specified filetypes.
The filetype options should be as follows:
Word (*.doc, *.docx, *.rtf) - selected by default
PDF (*.pdf) - selected by default
Image (*.gif, *.jpg, *.jpeg, *.png), *.svg, *.tiff)
Video (*.mp4, *.flv, *.mov, *.avi)
Audio (*.mp3, *.ogg, *.wav, *.aac, *.wma)
Other (text box, type in comma-separated)
The settings should be located within the “submission settings” area.
Note: it may be easier to use Moodle’s in-built file_get_typegroup function to retrieve sets of related extensions - for discussion.
Notes on settings:
● the “restrict file types” option should only be enabled if “file submissions” is on
● the file type options (Word, PDF, etc) should only be enabled if “restrict file types” is on
● form validation should ensure the “other” value is in the correct format, eg *.extn (comma-separated list)
● Error message: List should be in the format *.doc,*.docx
● form validation should ensure that if “restrict file types” if set to “yes”, then at least one file type must be checked
● help text should be as follows:
● If Restrict File Types is enabled, you can specify the file formats you will accept for this assignment. Students will not be able to upload files that are not in the format you select.
● If Restrict File Types is set to No, there will be no restriction on the type of files students may submit.
The filepicker element in the edit submission page should restrict the file types based on the assignment settings.
$mform->addElement('filepicker', 'userfile', get_string('file'), null,
array('maxbytes' => $maxbytes, 'accepted_types' => '[filetypes]'));
- blocks
-
MDL-53240 Form element and admin setting type to choose file types and type groups
- Closed
- caused a regression
-
MDL-58632 Assignment file type restrictions don't work with correctly arbitrary types
- Closed
- has a non-specific relationship to
-
MDL-58182 Course drag and drop dialogue missing buttons
- Closed
-
MDL-50794 Workshop: Restricting file types as attachments to a workshop
- Closed
- has a QA test
-
MDLQA-10965 A teacher can specify assignment submission file types
- Open
- has been marked as being related by
-
MDL-66242 File type restrictions for Forum
- Closed
-
MDL-58411 File type restrictions for Quiz essay question type
- Closed
-
MDL-59299 Use new filetypes form element for assignment file types
- Closed
- is blocked by
-
MDL-49466 Policy: What to do about new mimetype requests
- Closed
- is duplicated by
-
MDL-44600 mod/assign: File type restrictions for Assignment submissions + Information
- Closed
-
MDL-49727 Option to allow only PDFs in Assigment file uploads
- Closed
-
MDL-53479 Add filetype restriction to assign module
- Closed
- will help resolve
-
MDL-54716 Add allowed file type definition to all locations with file upload option for students
- Open