Display folders from file repository in a course

Display folders from file repository in a course

by Andrej Bauer -
Number of replies: 8

I set things up so that I upload course material to a file repository (using ssh+rsync). Whatever is uploaded into the repository should automatically be available in the course. But I cannot figure out how to do that without having to manually alias each uploaded file.

I have the course instance for the repository, and I see that individual files from the repository can be copied or aliased. But I want to display the whole repository, without having to manually alias uploaded files. How can I do that?

Average of ratings: -
In reply to Andrej Bauer

Re: Display folders from file repository in a course

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I don't think it is possible to do what you are asking, without writing some custom code to do it. It should be possible to write a custom activity which scanned a given server directory (either on demand, or every 5 min) and synchronised that with the internal Moodle structure for the activity. Alternatively, a custom plugin (maybe a block or a local plugin) could be written which could be given the path to a server directory and the details of an existing 'folder' resource in the course and synchronise them.

An experienced Moodle developer could probably put something like that together in 0.5-1 day of work (but, unless you found someone with some spare time on their hands, you would probably have to pay for it to be done).

In reply to Davo Smith

Re: Display folders from file repository in a course

by Andrej Bauer -

Well, thanks. That's a bit disappointing, as I would expect it to be a common demand. For instance, in a course where during the lecture a lot of files are generated (programming), it would be natural to sync them to the server and have them simply appear there.

In essence the answer is that I should use a separate web server (easier than trying to develop a plugin), which kind of beats the purpose of having Moodle.

In reply to Andrej Bauer

Re: Display folders from file repository in a course

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Of course, the other solution is to zip the files up, then drag + drop them onto a course page. You should then be able to select 'unzip and create a folder resource' (assuming you are using a reasonably up-to-date browser, that accepts drag and drop upload).

In reply to Davo Smith

Re: Display folders from file repository in a course

by Andrej Bauer -

Perhaps my question is not clear. The whole purpose of what I am asking for is to not have to do anything on the Moodle side of things. That is just busy work that does not accomplish anything. The files are already there on the server, I shouldn't have to "connect" or "enable" them on Moodle, or anything.

Average of ratings: Useful (1)
In reply to Andrej Bauer

Re: Display folders from file repository in a course

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
I am sure you've considered http://docs.moodle.org/en/File_system_repository, just in case.
In reply to Visvanath Ratnaweera

Re: Display folders from file repository in a course

by Andrej Bauer -

Yes, thanks, that's what I used to set up the repository. But please see my question, there is no way to display a folder from the file system repository on a moodle course page.

In reply to Andrej Bauer

Re: Display folders from file repository in a course

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
You are right.

Yes, if one could set a link to a directory under the file system repository on a course page, that'll save a lot of headaches. The last time I checked, it was not possible.
In reply to Visvanath Ratnaweera

Re: Display folders from file repository in a course

by Ger Tielemans -

Yes, especially when you have a set of connected pages/files and one html page is the start-page.. You can do it in a course but not in a repository, which makes a repository almost useless for an advanced user. It is a pitty.

Average of ratings: Useful (1)