-
Bug
-
Resolution: Deferred
-
Minor
-
None
-
3.9
-
MOODLE_39_STABLE
-
MDL-69141-master -
-
Moppies Kanban
When two plugins have their own file extensions (for example one with .h5p and one with .HTML) the upload form stops filtering by extension instead of just permit the valid extensions.
How to reproduce:
- Install the provided contenttype_html plugin
- Go to the content bank as admin and click on the "upload" button
Expected: the upload form should only permit upload .h5p and .HTML files
What happens: the extension filter is disabled.
Why this happens
The current upload form uses a content bank method called "get_supported_extensions_as_string" which returns a comma-separated extensions list. This works well with just one extension, the problem is when you have more than one extension. The file picker expects an array of extensions, not a comma-separated.
The solution is to delete the "get_supported_extensions_as_string" method and create anew method "get_supported_extensions" which is exactly the same but returning an array.
- Testing discovered
-
MDL-69187 Filepicker: file type validation behaves inconsistently depending on how the list of accepted types is passed
-
- Closed
-