The way files are handled in Moodle 2.x has changed from earlier versions. Students and teachers will use the File picker to upload and organize their files in areas called Repositories. Repositories can be located on the Moodle site (server files) or externally (Google docs, Merlot, Alfreso, Youtube, etc).
Note: the server files are the repository for files uploaded to Moodle. This repository resides in Moodles file storage area.
Sections/Summary of the Steps
Before getting into the details of the new file system, please note the following sections.
- Section 1: Overview
- Section 2: How External Repositories Work with Moodle
- Section 3: Features Summary
- Section 4: How to use the File System
Section 1: Overview
Site administrators can reveal, restrict, add, edit or create repositories for the site. A different way of looking at the shift in structure is to think of it as a virtual file system that limits the duplication of files on the server. Files are stored once then linked to; multiple links could be established, instead of multiple files being stored.
To provide an example of the workflow, let’s say we upload a file to a course; Moodle would then handle the file and transfer it to a storage area. Once in storage a link is established to the file for the resource. If the same file was uploaded again Moodle would check to see if the file exists and, if it does, the original file would be linked to instead of creating a duplicate. Furthermore, to create a visual representation of this linking to a file, Moodle will create a virtual file structure that mimics the arrangement of course categories, courses, and activities/resources. In addition to the virtual file structure, access privileges are granted or denied for users based on their role within Moodle and/or ownership of a file. If a file being uploaded already exists the structure and privileges are just extended to account for that new instance of the file being used.
Here is a Moodle docs page describing the file handling system, complete with an instructional video.
This video provides a good “how to” through a case study as an example.
How deleting files work
Since a file can be used multiple times throughout a Moodle site in different courses when a user deletes a resource or goes into a resource and deletes a file it can be thought of as deleting the link or connection to the file. Moodle will detect any unused file and then delete it automatically after a period of time. Users cannot delete files manually, since they may be used elsewhere.
Legacy course files
When a Moodle 1.9.x course is restored or when a site is upgraded from 1.9.x, the course files area is renamed 'Legacy course files'. By default, this area is not available in new courses.
It is recommended that teachers make use of the new repositories in Moodle 2.0 for storing course files, rather than saving them in the legacy course files area.
When a teacher is working in the restored or upgraded course the Legacy course files will contain the course’s previously used files. Any new files added to the course will be by default added to the new server file repository area.
Section 2: How External Repositories Work with Moodle
A repository can be thought of as a storage area from which users can retrieve files to add to their course. When an outside repository system is used it either links to the file or makes a copy of the file on the server file area (Moodles local file storage area). When a 3rd party file system is used the following should be kept in mind.
- Maintenance of another system
- Accessing two systems to manage files
- Change of storing files twice as the file could be copied to Moodle
- Not all repository systems allow linking and as a result are copied to Moodle
Figure 1: Types of Repositories
Figure 2: displaying how the different features of the file system and repositories work with Moodle. Note how the YouTube Repository content is not copied to Moodle but is instead linked to.
Section 3: Features Summary
- Previously, if a file was used in different courses, it was duplicated. In Moodle 2.0, files are stored only once, saving disk space.
- Full support for Unicode file names on all operating systems.
- Metadata about each file (author, date, license, etc) and what the file is used for are stored in the database.
- Files are no longer just "uploaded to the course". Files are connected to the particular bit of Moodle content that uses them. (For example, a file may belong to a file resource, a forum post or a wiki page). Access to these files is controlled by the same contextual rules that exist for different areas and roles in Moodle, increasing security.
- File picker has a list (file tree) or icon view
Section 4: How to use the File System
Files can be accessed by users in courses once the repositories have been enabled at the site level.
Enter a course > turn editing on
Add a resource/activity to a topic or week by choosing an item from the drop down menu of “Add a resource” or “Add an activity”.
In the resource/activity fill out the settings as needed and to add a file go to the content area then click the “add” button.
The file picker should popup allowing access to the server files, other repositories, or the upload a file option.