One method to share content

One method to share content

by Paul Duff -
Number of replies: 5

As an admin for our Moodle implementation, one of the facilities I've often wished for is the ability to re-use content on multiple courses without the need to duplicate the files.  The optimal solution is of course an integrated or linked CMS/DMS, but we're not there yet.

I'm sure that the following technique is known to others - I wouldn't be so vain as to think that I've discovered something hitherto unknown - but since it kinda feels like that to me - here goes.

I've 'discovered' that I can use the site-files upload area for the purpose.  As the admin, I can host resources in that area and teachers on any course can point to them as a Resource\WebLink thus (OK, I still need to let the teachers know the right URL but thats just process):-

http://estudy.wiltscoll.ac.uk/file.php/1/ShareDemo/enrolment.pdf

The 1 in the path denotes the site-file area, which the gatekeeper file.php allows unrestricted access to.  Obviously, this area isnt very secure, so one would need to be mindful of the nature of the content hosted by this method, but it looks useful nonetheless.

The method can probably be improved upon.  A bona fide course could be adopted solely for hosting content and the appropriate ID number substituted for the 1.  If we made the course hidden and made all teachers teachers on that course, and all students students on the course, then file.php would carry out its gatekeeper function and request a login for anybody who tried to access the content external to the Moodle environment.

The approach might even work for other module types too.  Not very elegant I grant you, but it feels part way to CMS today...........

Bet I've overlooked something!!!

Average of ratings: -
In reply to Paul Duff

Re: One method to share content

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
What we could without much effort is hardcode a "shared" folder in $CFG->dataroot, and modify the File manager slightly to always include this directory so that it looks like it appears within each course.  That way any teacher could put stuff in there, and it could be accessed from any course.
In reply to Martin Dougiamas

Re: One method to share content

by Sean Keogh -
Sounds like a good idea. Would certainly be useful here I think.
In reply to Martin Dougiamas

Re: One method to share content

by Paul Duff -

That's a solution - my suggestion was just a workaround.

Would you see this as a totally public facing store without any security?  If so, one enhancement worth considering might be to have file.php request a login, but allow any mdl_user (currently enroled on any course?) read access.

In reply to Paul Duff

Re: One method to share content

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Oh, my suggestion is also just a workaround compared to the document management system (I'm not calling it a CMS any more after all that confusion!)

Yes, it would be accessible to any logged in user.  Basically I think the URLs could use "share" instead of the course id, so file.php can handle it differently:

  http://sitename/file.php/share/path/file.ext