- 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.
1. Implement core_course_get_contents web service
2. Implement callbacks in folder, resource, page and url modules
3. Implement download script for web service
For modules that still used the 'old' generic object return from _get_coursemodule_info instead of returning a cached_cm_info object, I changed them to use the new format as part of this. This made a few areas of code regarding onclick links slightly nicer.
This patch replays the logic of resource_20_migrate() function. If a
file is referred via URL to the course files of the course being
backed up, then such a resource is converted to the File module
(mod/resource) rather than URL module.
During the restore, the section's sequence field is ignored and the
order of modules is controlled by the order of the <contents> activity
elements. This patch makes sure that the modules are listed in that
section in the right order.
Also, the patch removes the obsolete stash sectionidslist which was
introduced when the method get_stash_itemids() had not existed yet.