FTP files into Moodle 2.0 with the repository API
Some people have been a bit worried that the changes in the Moodle 2.0 file system would stop teachers FTPing files up into Moodle to use in their course. Now these changes are massive improvements, but they seemed to have blocked the normal approach to uploading lots and big files with FTP. However this is not the case.
Now although it has stopped ftping files into the course area of Moodle, there is a nice easy workaround, which possibly is easier to manage longterm.
In a previous articles I have focused on how the repository API can work with GoogleDocs and Flickr. When files are on other sites the use of the API is obvious. However, there is a use for this powerful API which may not have been as obvious.
One of the options in the repository section for admins is "File System". Once enabled, this creates a folder called repositories in the moodledata folder so you have moodledata/repositories.
Then you can go ahead and create folders for each teacher, or course or however you want to structure the files, and give the content creators (probably the teachers) upload permissions to the folders using FTP or whatever method you allow.
The Moodle 2.0 admin can then add those directories as sources for files in the file picker.
- The admin setup of the repository api
- The FTPing of files into the moodledata/repositories folders
- The insertion of an image into a Moodle course using those uploaded files.
Dont forget to check out the full article on repositories