File "Management" and Moodle

File "Management" and Moodle

by Brian Maynes -
Number of replies: 1

I have a general question regarding how Moodle references files used throughout the site such as custom site images (headers, etc) vs course-specific files (images, .css, .swf, etc).

I know that I can go into Administration > Server > Site Files and create custom folders, but I don't necessarily want these folders created under \moodledata\1\. For example, if I create a new folder in Administration it gets created in \moodledata\1\<foldername>. However, when I try and insert a file (.jpg for example) in a course resource, it doesn't look in this location, so I end up having to hardcode the full http:// address to the file manually...a real pain.

Can I change the location of where these folders get created? And if so, how do I tell Moodle to look in these folders for course content and general interface (theme) elements?

As it stands, if I upload an image while working in a course, it gets uploaded to a \moodledata\xx\ folder (not \moodledata\1\ like above)...where xx is some arbitrary number moodle assigns. This makes keeping track of course-specific files much more difficult than having one file repository that all courses reference. This would be helpful in situation where a specific course resource shares images, custom .css styles, and other media.

I saw this thread: http://moodle.org/mod/forum/discuss.php?d=65049, but I was wondering if I was missing something. Any help would be greatly appreciated.

Brian

Average of ratings: -
In reply to Brian Maynes

Re: File "Management" and Moodle

by Steve Hyndman -

Brian,

A couple (few) points:

  • moodledata\1:  is the location of your "site" files--course 1.
  • moodledata\xx: is the location of your course files--any other course you create. The number isn't actually arbitrary...it is the number of the associated course...the one at the end of the course url. Each course will have its own number.
  • moodledata: is where your site/course files and images are stored, but is not where your theme files and images are stored...they are stored in moodle/themes
  • If you are hardcoding the full http:// url for the files in your moodledata folder, then it sounds like you have your moodledata folder in your public_html directory. You probably want to move this outside that directory...see installation instructions.

Bottom line...there is no way to do what you want without a lot of code customization since all uploaded files are related to the "course" and not the "user" or some single site area. As you have pointed out, you can use moodledata\1 as a "common" storage area, but you will have to enter the path to that location from within your courses. I suppose it may be possible to change the code so that all courses look to course 1 for the "data", but that would probably take some in-depth hacking.

Steve