Editor file management
This document is to start a usability discussion about the best way to implement a particular new feature in Moodle 2.0.
HTML texts may have associated embedded media, such as images, videos and sounds. These are added to the HTML file using the HTML editor (which in Moodle 2.0 is a modified version of TinyMCE) and stored in the "file area" associated with the text. This applies to all texts in Moodle 2.0, ranging from simple forum posts to full-blown mini-web sites in the Resource module.
There may be more than one file, and files may change or require deletion, so they need to be managed.
The question we need to solve is: "What is the best interface to manage and browse these files?"
Example 1: Office document (Word, OpenOffice, Google Docs). Once the "Open" dialog is used to bring the media into the page, the only way it can be removed from the document is by deleting it from the document directly. Office applications do not have a way of managing media separately from the document view.
Example 2: Dreamweaver.
Example 3: Box net. Documents can be made an images added, but there is no interface in the document to manage media. However, when looking at the filesystem view one can see the media in a folder and can edit it. Obviously changing names and deleting things will break the links in the HTML.
(TODO: more examples)
Related Moodle 2 features
The file picker is designed to mimic the file open dialog.
As usual, the button/link/menu that initiates the file picker can specify what mime types are being looked for, and the resulting display is limited to those repositories that support those mime types, and only files matching the mime types are shown.
File manager form element
The file manager form element allows any form to have a set of files, such as a set of attachments to a forum. Files can be added (by calling the file picker) or deleted (by pressing a little X next to any file).
Click on this diagram to see the full-sized version:
File manager in the Insert/Edit dialog.
- Management is kept separate from the file picker
- Interface is similar to file manager forms element
- No extra icon needed in editor toolbar
- Insert/Edit image dialog needs to be modified, and maintained
- harder to deal with many files
- Interface clutter for people who won't use this feature
File manager is implemented as a separate repository inside the filepicker eg "Current files".
- Very easy to implement across Moodle, no changes to editors are needed.
- Makes sense when re-choosing images already chosen (eg to add another copy of the same image).
- Breaks the paradigm of the "file picker" because files can be deleted, zips uploaded etc.
- "Current files" difficult to separate logically from the "Local files".
- Files can be deleted here resulting in missing media from the HTML.
- Constantly clutters repository list with an item that many will not use.
- Inconsistent with the filemanager form element (used for attachments etc)
- Either we show all files (ignore mimetype) or only show files matching mimetype (incomplete management)
File manager is implemented separately from file picking, as a new tinymce plugin.
- Functionality is separate from the file picker so file picker paradigm preserved
- People who don't need it don't have to see it (unclutters interface)
- Interface is very similar to the file manager form element
- Requires a new tinymce plugin that needs maintenance
- Requires a whole new icon in the editor toolbar.