Note: You are currently viewing documentation for Moodle 2.2. Up-to-date documentation for the latest stable version is available here: File system repository.

File system repository: Difference between revisions

From MoodleDocs
Line 2: Line 2:
<p class="note">'''Please refer to [[Page_notes#File system repository configuration|these notes]] before editing this page.'''</p>
<p class="note">'''Please refer to [[Page_notes#File system repository configuration|these notes]] before editing this page.'''</p>


==What is the filesystem repository?==
==What is the file system repository?==


The file system repository allows users within Moodle to access files which have been uploaded via FTP into designated folders on the server.  A files system repository may be available site wide for everyone; within an individual course or for an individual user
The file system repository allows users within Moodle to access files which have been uploaded via FTP into designated folders on the server.  A files system repository may be available site wide for everyone; within an individual course or for an individual user
Line 10: Line 10:
Here is [http://moodle.drupalgardens.com/article/tue-06152010-1918/ftp-files-moodle-20-repository-api a video] that may be helpful.
Here is [http://moodle.drupalgardens.com/article/tue-06152010-1918/ftp-files-moodle-20-repository-api a video] that may be helpful.


=== Creating  folders for your file sysrem repositories===
=== Creating  folders for your file system repositories===
*Find the moodledata folder on the server
*Find the moodledata folder on the server
*Inside it, create a folder  called "repository"
*Inside it, create a folder  called "repository"
*Inside that folder, create as many folders as you need, named appropriately.
*Inside that folder, create as many folders as you need, named appropriately.
[[File:Moodledatarepo.png]]
*FTP into the appropriate folder the files you want. (The folders can hold all types of files)
*FTP into the appropriate folder the files you want. (The folders can hold all types of files)






===2. Enable the File System repository plugin===
=== Enabling the File System repository plugin===


You do this in the Settings block, under Site Administration > Plugins > Repositories > Manage repositories >File system.  
*Go to Site Administration>Plugins>Repositories>Manage Repositories;
*Select from the drop down next to File sytem "Enabled and visible"
[[File:Filesystemrepo.png]]


Once enabled, click on the "Settings" link beside it.


Alternatively, you will now see "File system" in the list of links in Plugins > Repositories. Click on this link, will also take you to the settings page.
===Setting up a site-wide file system repository===
*Once the repository is enabled as above, click on the  "Settings" link to the right.
*Scroll down to Repository instances of the site
*Click Create a repository instance
*Give it a name and (if there are several folders on the server) choose from the dropdown the one you want. Click save
*It will now be available in the file picker in all courses.
''NOTE: Just repeat the process to get more than one site wide file system repository''


===3. (Optional) Set up the personal repositories===
Still in the File system settings page:
You can safely ignore the settings at the top.  These are for rare cases where you want to allow users to create their own virtual repositories from the filesystem, either for themselves or a course.


===4. Create some actual usable repositories (instances)===
===Setting up a repository inside a course)===
In settings at the bottom of the page
''NOTE:  A regular user needs to have been given permission to do this by admin (MORE DETAILS SOON)''
# Click on "Add a repository instance".
*Go to the desired course and click on “repositories” in the administration block
# Give it a name. The name will display in the [[File picker]] interface  with the other repository areas.
*Scroll down and click “ create File System instance
# Choose the appropriate subdirectory from the list.
*Follow the same process as in ... above
# Click save


===5. Check permissions===


Although permissions should be on by default, you may have to check the roles and make sure that the "Authenticated User" role (or some other role, if you have set up a special one) has the "repository/filesystem:view" capability allowed.
===Setting up an individual file system repository instance===
 
''NOTE: A regular user needs to have been given permission to do this by admin (MORE DETAILS SOON)
(If you are using 2.0 Preview 1 then this was not on by default)
''
*In the navigation block, click on “my profile”
*Click on “repositories”
*Scroll down and click “create File System instance”
*Follow the same process as in .. above
*This will create a personal file system repository connecting just you to a folder on the server.


===6. Use it!===
===6. Use it!===

Revision as of 13:33, 8 August 2011

Please refer to these notes before editing this page.

What is the file system repository?

The file system repository allows users within Moodle to access files which have been uploaded via FTP into designated folders on the server. A files system repository may be available site wide for everyone; within an individual course or for an individual user

This must be done by a systems admin who has write permissions to the server directories

Here is a video that may be helpful.

Creating folders for your file system repositories

  • Find the moodledata folder on the server
  • Inside it, create a folder called "repository"
  • Inside that folder, create as many folders as you need, named appropriately.

Moodledatarepo.png

  • FTP into the appropriate folder the files you want. (The folders can hold all types of files)


Enabling the File System repository plugin

  • Go to Site Administration>Plugins>Repositories>Manage Repositories;
  • Select from the drop down next to File sytem "Enabled and visible"

Filesystemrepo.png


Setting up a site-wide file system repository

  • Once the repository is enabled as above, click on the "Settings" link to the right.
  • Scroll down to Repository instances of the site
  • Click Create a repository instance
  • Give it a name and (if there are several folders on the server) choose from the dropdown the one you want. Click save
  • It will now be available in the file picker in all courses.

NOTE: Just repeat the process to get more than one site wide file system repository


Setting up a repository inside a course)

NOTE: A regular user needs to have been given permission to do this by admin (MORE DETAILS SOON)

  • Go to the desired course and click on “repositories” in the administration block
  • Scroll down and click “ create File System instance
  • Follow the same process as in ... above


Setting up an individual file system repository instance

NOTE: A regular user needs to have been given permission to do this by admin (MORE DETAILS SOON)

  • In the navigation block, click on “my profile”
  • Click on “repositories”
  • Scroll down and click “create File System instance”
  • Follow the same process as in .. above
  • This will create a personal file system repository connecting just you to a folder on the server.

6. Use it!

Everything should be working. If you try to add a file in Moodle, then the File Picker should show you your new file system repository, and you should be able to browse it and select files to use.

Note that file types are respected (based on file extensions), so if you are adding an image in the editor, then you won't see Office docs (for example) appear in the File Picker.

Repository-filesystem-filepicker.png

FAQ

How do the files get into the File system repository?

  1. Get your person with server access to copy them in
  2. Set up FTP
  3. Set up access to that folder as a Windows share

Is there a way to upload files to a File system repository from inside Moodle?

If you are talking about core (vanilla) Moodle: not at the moment

See also