Allowed file types not working in moodle 3.9?

Re: Allowed file types not working in moodle 3.9?

by Paul Lindgreen -
Number of replies: 4
Picture of Particularly helpful Moodlers
the restriction appears to only apply to submitted assignments, not course material uploaded by a teacher.
In reply to Paul Lindgreen

Re: Allowed file types not working in moodle 3.9?

by Paul Lindgreen -
Picture of Particularly helpful Moodlers
I tried mp4 as well and got the same results.

Is there any method to prevent all users from uploading mp4 files to moodle?

We would like to disable mp4 for instance as we want users to use our streaming service, vimeo or youtube. Many larger files of mp4/m4a/pptx also throw a lot of 500 errors on our server for some unknown reasons too (should this post be in a different section related to performance instead of security?)
In reply to Paul Lindgreen

Re: Allowed file types not working in moodle 3.9?

by Paul Lindgreen -
Picture of Particularly helpful Moodlers
after revisiting this feature I can submit Assignment that are mp4 even though the filetype was deleted here /admin/tool/filetypes/index.php

my only restriction is in the Assignment settings for file types, I cannot enter .mp4 as a teacher (see screenshot). But I can leave it blank which will then allow students to submit mp4. If I select Video mp4 is not in the list.

I cannot see significant benefit of deleting File types at the system level if a student and teacher can submit those file types?
mp4
In reply to Paul Lindgreen

Re: Allowed file types not working in moodle 3.9?

by Paul Lindgreen -
Picture of Particularly helpful Moodlers
the hack at the following link appears to work, small code addition.
An array of acceptable filetypes is provided and a nice pop up warning occurs if you try to upload something not in the list
https://moodle.org/mod/forum/discuss.php?d=278392
In reply to Paul Lindgreen

Re: Allowed file types not working in moodle 3.9?

by Eva Koperdakova -
Hello,
I have experienced the same issue. Moodle docs say that I can modify accepted file types using Home|Site administration|Server|File types, but removing all video filetypes does not work, teachers are still able to upload video files.
Is old "hack" working for 3.9?
What happens when you update moodle (security, as 3.9 is LTS)? Have to modify moodle/repository/upload/lib.php each time after update?