Note: You are currently viewing documentation for Moodle 2.3. Up-to-date documentation for the latest stable version is available here: Course files.
This page talks about the "course files" in Moodle 2. It's useful for any teacher who wants to know how to add files to a Moodle 2.0 course (especially if you previously used Moodle 1.9 or earlier).
- 1 Files in Moodle 1.9
- 2 Files in Moodle 2.0
- 3 How to duplicate Moodle 1.x functionality
- 4 Roadmap for future improvements
- 5 See also
Files in Moodle 1.9
In every version of Moodle before 2.0, all the files uploaded into Moodle were stored in a physical directory on disk, known as the 'Course Files' area.
As well as files that a teacher might upload to be part of the course content, this area also included everything students uploaded, such as assignments and forum attachments. These "activity files" were stored in a special folder called "moddata" in a certain structure that helped modules keep track of their own files.
Typical Moodle 1.x workflows
The course files area was accessed in two ways through the Moodle interface by teachers.
- Through the "Files" link in the Course Administration block, or
- When a file was required in other places, such as a resource, or attachment.
(Students had no access to the file area at all, and always had to upload things direct from their desktop computer)
When publishing a file as a resource, say a PDF file, a teacher might:
- Upload it to their course files area along with all the other files they intend to use in the course
- Add a resource to the course
- Select the PDF from the course files
A less typical workflow
- Use FTP to push files straight into the course files area
- Add resources to the course using these files
- Update the resources later by updating the files directly via FTP
Problems with the Moodle 1.x model
- Storing files on disk meant names were restricted (eg Japanese names would break on some operating systems)
- If the original file is deleted or renamed from Course Files then it breaks everywhere it was being shown
- All files had to be accessible to students (if you knew the URL) because Moodle had no way of telling what context you were viewing a file in
- You could not re-use an upload in multiple courses, you had to upload it over and over
- Backups had to include ALL course files, just in case they were required, even if the backup only contained one activity
- Media might appear to teachers sometimes and look fine, but others would not see it (eg course descriptions)