- do not die with fatal error if source file in moodle internal repository is missing;
- moved code duplication for moodle repositories into class repository (functions send_file, get_reference_details, get_file_by_reference, get_file_reference);
- update file status after repository::sync_external_file so we know that it is missing (or not missing anymore). Do not run this function more than once for file within one request;
- display readable name for Private Files and Server files with the new format;
- display broken icon in filemanager if we know that source is missing, display information (for admin) where it was located before: see repository::get_reference_details() and extending classes;
- removed unnecessary queries in stored_file::sync_external_file();
- syncronize files before displaying it's size in mod_resource, do not query directly
- Added possibility for editor form field to specify return_types (default FILE_INTERNAL | FILE_EXTERNAL | FILE_REFERENCE)
- For assignment, workshop, quiz essay submissions and form posts do not allow FILE_REFERENCE
- Fixed mod_resource return_types, reset them to default, because filemanager does not know how to work with FILE_EXTERNAL links
- use finfo to determine mimetype of a file only when it is unknown from file extension
- display filetype icon and mimetype in filemanager based on file extension
- fixed a small issue with specifying extension instead of group in file_get_typegroup()
- allow only web-compartible image types when embedding into editor or using in database field
- created new groups web_video and web_audio to use in resource module
- function get_mimetypes_array() now contains also information about filetype groups and language strings
- use 'smart' human-readable mimetype description
- never determine filetype group based on filetype icon image! remove function mimeinfo_from_icon()
- get rid of class filetype_parser and file lib/filestorage/file_types.mm, replaced with functions file_get_typegroup(), file_extension_in_typegroup() and file_mimetype_in_typegroup()
- support multiple icon sizes, not only 16 and 32
- retrieve filetype icon only using proper functions file_..._icon() from lib/filelib.php throughout the code
- increase size of repository thumbnails to 90 and icons to 24 (will take effect when new icons exist)
Thanks to Mary Cooch & Martin Dougiamas who contributed to this
rewording.
AMOS BEGIN
REM These module help texts are going to be displayed more prominently in the Moodle interface
AMOS END
This change makes the resource module use the new API when it embeds media
files (audio/video/Flash), and removes the resourcelib library functions
which were previously used for this.
The old API is still used for embedding non-media files such as PDFs and
HTML.
The URL and Lesson module both used copy/paste duplicates of a section of
resource module code which called the removed functions. I have changed
these too. As a bonus this significantly reduces the duplication involved.