I am starting to implement a WebDAV access point for working more comfortably with files in Moodledata -- thanks to some serious commitment from Godalming College to get this to happen
The relevant branch is here http://git.catalyst.net.nz/gitweb?p=moodle-r2.git;a=shortlog;h=mdl19-webdav -- I am initially basing it on top of 1.9, but it's not going to be in 1.9 proper (can you spell "feature freeze"? )
Here are my dev notes in case anyone is interested in following/helping/testing... or using it!
It will use the same user/password authentication mechanisms that Moodle provides (so it will use AD/LDAP if Moodle is so configured), but will not have SSO, as the webbrowser does not share information with the WebDAV client code in any operating system.
Access to WebDAV will be controlled by a capability defined within the Moodle roles/capabilities system. So you can define WebDAV access as part of the system-wide roles.
Note: Unfortunately, WebDAV does not work well with very large files -- if you are planning on routinely hosting files over 100MB, WebDAV will fall short of your expectations. For the occassional large file, it will do just fine. (AFAIK anyway - I have to test how it works with large files and document it)
Another consideration is that a "raw" view of the directories held in moodledata would expose files and directories that Moodle does not normally show, and could allow users to do things that will break Moodle - such as moving one course directory into another (an accidental drag-and-drop can be disastrous!). We will have to prevent such operations, and hide directories that hold no interest for end users.
The rough plan is to
- Reuse existing WebDAV server library
- Replace authentication mechanism with Moodle authentication
- Hide Moodle's own data directories in Moodledata
- Replace top-level directory names from numbers to 'course-shortnames' for usability
- Prevent operations on top-level directories -- such as moving one course directory into another course directory.
- Filter allowable file names with the same rules as Moodle does today
- Good performance
- New capabilities to control this - one at the system level ("connect via webdav") and one at the course level ("manage files via webdav").
I hope to have something testable in a few days