Your Moodle version

Repositories: Course File Area

Maintained by Me ! Tim Williams
Course file storage repository for Moodle 2, which replicates the Moodle 1.x course files functionality.


This plugin is part of set Course files.
This repository plugin provides a course file storage area within Moodle 2.x which is similar in function to the Course Files functionality in Moodle 1.x, using the same numbered directories within the moodle data directory.

This repository is capable of operating as both an internal and external files repository,
although the internal capability is disabled by default. If the internal files capability
is enabled on a normal Moodle system then any files used will be copied into the new Moodle 2.x
file structure.

You will also need to install the "Repository File Manager" on your Moodle to make use of this plugin.

Please check our website for the latest plugin versions.




Me !
Tim Williams (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Me !
    Tue, Aug 28, 2012, 7:28 PM
    Jean Pierre : I'm intrigued that $COURSE is working for you in 2.2.3+, the reason fro the change to $USER->currentcourseaccess[0] in Moodle 2.2+ is because $COURSE->id always comes back as 1 on my server (I reported this bug here:, but Moodle HQ don't seem to be too interested in fixing it), no matter what course the user is actually in, while $USER->currentcourseaccess[0] always gave the correct result, so if you are seeing the opposite in Moodle 2.2, then this is most mysterious. I'm planning to have a dig into the Moodle code at some point soon to see if I can fix MDL-32969 myself, but I've not gotten to it yet.

    There isn't currently a git/github version (I'm a very committed SVN user), although this may happen at some point it's not a priority at the moment.

    Urs: Is this preventing any functions of the repo from working? An incompatible change was made to the Repository API in Moodle 2.3, I suspect this warning is a result of the technique I was forced to use in order to support both the pre Moodle 2.3 and Moodle 2.3 versions of the Repository API within the same codebase. That said, I'll put this on my to-do list to see if I can cure the warning, it's possible there has been a further change in Moodle 2.3 which has triggered this warning.
  • Paul
    Mon, Oct 1, 2012, 5:46 PM
    I should like to also ask if this plugin will allow the linking of files. What I am really looking for, and have been for some time, is a repository plug in the really allows me to perform the same function as I currently do when I upload files to my FTP server, and then link to them using a URL.
    The problem with this system is it is difficult for course administrators since they do not always know the paths to the files.
    Is it possible for someone to produce a repository system that allows the files to not be imported into the Moodle system as such in order that when a file is updated in the repository, it is also updated in Moodle live on-line. A sort of Dynamic Repository if you like.

    many thanks,
  • Me !
    Tue, Oct 2, 2012, 4:49 AM
    Paul, what you describe is more or less how this plugin works, it generates a web link to the file in the repository and if the file is then changed, that change is immediatly reflected in the moodle resource. I wrote this addon in order to solve the problem you describe.
  • Picture of Steve Bond
    Tue, Dec 18, 2012, 1:30 AM
    Hi, I like this plugin but a bit worried about lack of backup. When I backup a course containing this repository, then restore it, the files in the repository are all gone. Is that by design - or do you plan to add a backup facility?
  • Me !
    Wed, Dec 19, 2012, 4:14 AM
    Hello Steve,

    I would like to add backup, but unfortunately the moodle 2 backup system can't act on the contents of an external repository, so getting this to tie into the regular backup system is impossible (I've tried...). The reccomended backup method is to use the zip function of the Repository file manager to save or restore the content of any give course area.
  • Me !
    Mon, Feb 4, 2013, 12:45 AM
    Sam, the plugin can't update a file in the central repository (I have yet to find a way to do this...). However, if you use the plugin an an external repo, the you are effectively linking to an single copy of a file.

    Bei: That might be down to the $COURSE problems mentioned earlier in this thread, I've had a similar problem when testing against Moodle 2.4. This will be fixed in the next release, which I should be uploading very soon.
  • Picture of Robert G
    Wed, Feb 27, 2013, 2:48 AM
    Hi, I am running Moodle 2.4 and using the Course File Area repository. I uploaded an image using it and i was able to view the image directly at the link it created here: /repository/coursefilearea/file.php/1/ads/fundamentals_180x150_EN.jpg.

    However, when i embed this image into an html block using img src it will not display. Has anyone run into this or know how i can fix it? Thanks.
  • Picture of Alex Julian
    Mon, May 6, 2013, 5:04 PM
    Hi, Please, Can I create service to search, and copy from this repository?
  • Picture of Camilo Ernesto Quintana Martínez
    Wed, Mar 5, 2014, 6:25 AM

    How delete or uninstall this repository?

    Tanks smile
  • Me !
    Fri, Mar 7, 2014, 6:58 PM
    Hello Camilo, Moodle doesn't have a "delete" method for Repositories. However, there are no special requirements for removing this, so if you do a web search you should be able to find some suitable instructions.
  • Picture of anna ko
    Sun, May 4, 2014, 7:05 PM
    Hello Tim
    It seemed like a great plugin and we wanted to use it in our system, but after a depth check we found out that with providing an old functionality, it also keeps the old problems sad
    As we saw, it handles the files in the old way (and not using the new moodle 2 files ystem). Winch means, that anyone who has a link to a file - can reach other files in the library (security leak).
    1. Is that true?
    2. If yes, are you planing to fix it?
    3. If so, what then the difference between using this block or the Course Legacy Files..?

    Thanks on advance,
  • Me !
    Mon, May 5, 2014, 7:23 PM
    Hi Anna,

    The whole point of this plugin is that it replicates the Moodle 1.x file system on disk, changing it to use the Moodle 2.x file system would defeat it's purpose (and cause it to be no different to Course Legacy Files). So anybody with access to the course can access all the files in the course. Our courses actually rely on this ability (we have single courses with 100's and in some cases 1000's of individual files which are totally unmanageable with the Moodle 2.x file system), so fixing it would break our systems.

    Tim W
  • Picture of anna ko
    Thu, May 8, 2014, 3:12 PM

    thanks for the answer!

    I still did not understand then, if it's the same -
    why don't you use the Course Legacy Files..?
  • Me !
    Thu, May 15, 2014, 9:00 PM
    I think you mis-understand. My plugin is very different to Course legacy files. My plugin uses the numbered directories inside moodle-data, the same as moodle 1.x. If I were to change it to to use the moodle file store then it would be the same as course legacy files, however the whole point here is that I need the moodle 1.x file structure on disc. This repository is designed to work with the Repository File Manager block, which replicates the Moodle 1.x file manager.
  • Picture of David Restrepo
    Tue, Jun 10, 2014, 7:29 AM
    I downloaded the plug in for moodle 2.6, but when I want to install, an error shows..."English language file name mismatch".

    Please help me with that, 'cause I don't know what could be.

    Same happens with the Repository File Manager plug-in.

1 2
Please login to post comments