With the release of Moodle 2.0 beta preview, we’ll be posting about the new features and changes all week. Updated: Martin Dougiamas sent me a message this morning via Twitter informing me that FTP access can still be used in conjunction with the new filesystem: http://is.gd/bWPU
I’d heard and read that in Moodle 2.0 you will no longer be able to upload content to Moodle via FTP. Some Moodle.org Discussions of interest relating to this subject:
- FTPing to my moodledata in Moodle 2.0: http://moodle.org/mod/forum/discuss.php?d=124529
- Where is the dataroot on Moodle 2.0?: http://moodle.org/mod/forum/discuss.php?d=145679
Typically I’d use FTP access to quickly and easily upload content to Moodle. If you didn’t know you can connect to your pre-1.9 Moodle file server via FTP and upload content directly rather than using the Moodle front end – Particularly useful when dealing with large files or a large number of individual files.
However Moodle 2.0 has a new system for dealing with files – It’s called “Content-addressable-storage”. More details here: http://en.wikipedia.org/wiki/Content-addressable_storage.
This is great news for Moodle users!
Some of the details:
- Make it easy to determine which parts of Moodle use which files, to simplify operations like backup and restore.
- Avoid redundant storage, when the same file is used twice.
- Fully support Unicode file names, irrespective of the capabilities of the underlying file system.
More technical documentation here: http://docs.moodle.org/en/Development:File_API
That all sounds great and it is don’t get me wrong, but if you install Moodle 2.0 and then check the root directory of the location you set as your file store you’ll find a text file named ‘Warning.txt’. Inside is the following message:
This directory contains the content of uploaded files and is controlled by Moodle code. Do not manually move, change or rename any of the files and subdirectories here.
I’ve installed a copy of the Moodle 2.0 Preview Release 1 and uploaded a file to ‘Site Files’. Usually I’d expect to find the file in a directory named ‘1’ on the file server. This isn’t the case with Moodle 2.0. What I found was a new directory named ‘6e’, inside this directory I find a directory named ‘c8′ , inside this directory is another directory named ’06’. Finally inside the ’06’ directory I found a file named ‘6ec8061df7e8db71f2320ca07c603e27113be351’
Now for those of you not in the know that’s a PDF, I know ‘magic’.
Actually, it’s a file reference, that reference is unique to that file. Moodle has stored the file on the file server but all the details relating to the file, filename, location etc, are stored in the database.
The trouble is that file reference is only useful to Moodle, not to me as a Moodle Administrator. As such there is no way, currently, for me to mange site and course files via FTP.
How can I easily upload large volumes of data to the Moodle file store quickly and easily?