Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Editor file management: Difference between revisions

From MoodleDocs
(New page: 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, vi...)
 
Line 29: Line 29:
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).
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).


[[Image:Filemanagerform.png]]


==Mockups==
==Mockups==

Revision as of 15:56, 2 July 2009

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?"

Conventions

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

File picker

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).

Filemanagerform.png

Mockups

Click on this diagram to see the full-sized version:

File:Editor file management.png

Mockup A

File manager in the Insert/Edit dialog.

Pros:

  • Management is kept separate from the file picker
  • Interface is similar to file manager forms element
  • No extra icon needed in editor toolbar

Cons:

  • 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


Mockup B

File manager is implemented as a separate repository inside the filepicker eg "Current files".

Pros:

  • 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).

Cons:

  • 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)


Mockup C

File manager is implemented separately from file picking, as a new tinymce plugin.

Pros:

  • 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

Cons:

  • Requires a new tinymce plugin that needs maintenance
  • Requires a whole new icon in the editor toolbar.