File system repository: Difference between revisions

From MoodleDocs
(added link to tracker entry)
(Link added.)
 
(43 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{Repositories}}
{{Repositories}}
The file system repository allows users within Moodle to access files which have been uploaded via FTP into designated folders on the server.  A file system repository may be available site wide for everyone; within an individual course or for an individual user.(However - see this [http://tracker.moodle.org/browse/MDL-28656| tracker entry] regarding course and indvidual repositories)
The file system repository allows access to files which have been uploaded (e.g. via FTP) into designated folders on the server. ''(Note that these folders are '''not''' created inside the Moodle site, but on the server where Moodle is hosted.)''


This must be done by a systems admin who  has write permissions to the server directories.
A file system repository may be available site wide for everyone or  within an individual course (set up by admin) or for an individual administrator. See MDL-28656 regarding course and individual repository configuration.


=== Creating  folders for your file system repositories===
This must be done by a systems admin who has write permissions to the server directories.
 
When a file from the file system repository is re-used elsewhere on Moodle, the teacher has the option to make a copy (a new, unconnected version) or to create a shortcut or alias. See [[Working with files]] for more details.
 
Once a repository has been created and files uploaded to it, the files can be made available within the file picker for use within a course.  There are several steps to take to implement this feature:-
 
These must be done by a systems admin who  has write permissions to the server directories and admin permissions within Moodle.
 
==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:Moodledatarepo2.png]]
*FTP into the appropriate folder the files you want. (The folders can hold all types of files)


=== Enabling the File System repository plugin===
{|
| [[File:filesystemonserver.png|thumb|250px|Creating repositories on the server]]
|}


*Go to ''Settings > Site administration > Plugins > Repositories > Manage Repositories'';
*Copy into the appropriate folder the files you want (using FTP, SFTP, shared folder etc.). (The folders can hold all types of files)
*Select from the drop down next to File sytem "Enabled and visible"
[[File:Filesystemrepo.png]]


== Enabling the File System repository plugin==
*Go to ''Administration > Site administration > Plugins > Repositories > Manage Repositories'';
*Select from the drop down next to File system "Enabled and visible"
''Note'': Ignore the similarly named repository 'Server Files' (enabled by default).
*Click the '''Settings''' link..


===Setting up a site-wide file system repository===
==Setting up a site-wide file system repository==
*Once the repository is enabled as above, click on the  "Settings" link to the right.
Having clicked the "Settings" link as above:
*Scroll down to Repositories instances of the site
*Scroll down to Repositories instances of the site
*Click Create a repository instance
*Click ''Create a repository instance''
[[File:Sitefilesystemrepo.png]]
*Give it a name and (if there are several folders on the server) choose from the dropdown the one you want. Click '''Save.'''
*Give it a name and (if there are several folders on the server) choose from the dropdown the one you want. Click save
[[File:Namedfilesystem.png]]
*It will now be available in the file picker in all courses.
*It will now be available in the file picker in all courses.
{|
| [[File:createinstance23.png|thumb|Creating a new file system repository]]
| [[File:setuprepo23.png|thumb|Selecting and naming the repository]]
|}
''NOTE: Just repeat the process to get more than one site wide file system repository''
''NOTE: Just repeat the process to get more than one site wide file system repository''


===Setting up a repository inside a course===
==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)''
''NOTE only Moodle admins can do this''
*Go to the desired course and click on “repositories” in the administration block
 
*Scroll down and click "Create File System instance"
Enable repositories as in the instructions above. On the Settings page:
[[File:Courseinstance.png]]
*Check the top box allowing users to add a repository instance to the course (1 below)
*Go to the desired course and click on “repositories” in the administration block(2 below)
*Scroll down and click "Create File System instance" (3 below)
 
 
{|
| [[File:courseinstancerepo.png|thumb|1:Enable course repositories]]
| [[File:coursesettingsrepo1.png|thumb|2:Click "Repositories" in Course admin]]
| [[File:createcourseinstance.png|thumb|3:Click to create an instance in the course]]
|}
 
*Follow the same process as [[#Setting_up_a_site-wide_file_system_repository|here]]
*Follow the same process as [[#Setting_up_a_site-wide_file_system_repository|here]]


===Setting up an individual file system repository instance===
==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)
''NOTE: Only Moodle admins can do this''
''
 
*In the navigation block, click on “my profile”
Enable repositories as in the instructions above. On the Settings page:
*Click on “repositories”
*Check the top box allowing users to add a repository instance to the user context (1 below)
*Scroll down and click “create File System instance”
*From the user menu, click "Preferences"
*Click on “Repositories”
*Click “Create File System instance”
*Follow the same process as [[#Setting_up_a_site-wide_file_system_repository|here]]
*Follow the same process as [[#Setting_up_a_site-wide_file_system_repository|here]]
*This will create a personal file system repository connecting just you to a folder on the server.
*This will create a personal file system repository connecting just you to a folder on the server (2 below)
[[File:Privaterepo2.png]]
 
{|
| [[File:userinstancerepo.png|thumb|1:Enable user repository instances]]
| [[File:userprivaterepo.png|thumb|2:Adding files from individual repository]]
|}
 
*Upload any files required by course creators to the appropriate folders
 
Server permissions  are needed here to add via FTP (or other method) the required files.
 
From this point on the check boxes need not be set - leaving them set just invites people to create a repository instance and then advises them that they do not have sufficient privilges.
 
 
===Using a File System repository file===
 
A user  can now make use of the uploaded files by accessing the repository from within the file picker, creating a resource link to a document, for example.  This process copies the uploaded file into Moodle and students may access the resource.
 
It's possible to search the files in the File system repository to make locating files easier if there are many files available.
 
[[File:FileSystemreposearch.png|thumb|600px|center|Searching the file system repository]]


===Using it===
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.
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.


[[File:Filesystemeg.png]]
==Repository capabilities==
 
There is just one capability, [[Capabilities/repository/filesystem:view|View file system repository]], which is allowed for the default manager, course creator, non-editing teacher and editing teacher roles. It is not set for the authenticated user role. Thus, students cannot by default view the file system repository.


==See also==
==See also==
*[[File_system_repository_FAQ|File system repository FAQ]]
*[[File_system_repository_FAQ|File system repository FAQ]]
* [[Restoring file aliases]]
* Overview of [[Repositories|Repositories]]
* Overview of [[Repositories|Repositories]]
* [http://moodle.drupalgardens.com/article/tue-06152010-1918/ftp-files-moodle-20-repository-api FTP files into Moodle 2.0 with the repository API article from moodle.drupalgardens.com] including screencast
* [http://www.somerandomthoughts.com/blog/2010/06/15/ftp-files-into-moodle-2-0-with-the-repository-api/ FTP files into Moodle 2.0 with the repository API article from somerandomthoughts.com] including screencast


[[Category:Site administration]]
[[Category:Site administration]]
[[de:Dateisystem-Repository]]
[[de:Dateisystem-Repository]]
[[es:Repositorio_sistema_de_archivo]]
[[fr:Dépôt système de fichier]]

Latest revision as of 09:01, 30 September 2018

The file system repository allows access to files which have been uploaded (e.g. via FTP) into designated folders on the server. (Note that these folders are not created inside the Moodle site, but on the server where Moodle is hosted.)

A file system repository may be available site wide for everyone or within an individual course (set up by admin) or for an individual administrator. See MDL-28656 regarding course and individual repository configuration.

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

When a file from the file system repository is re-used elsewhere on Moodle, the teacher has the option to make a copy (a new, unconnected version) or to create a shortcut or alias. See Working with files for more details.

Once a repository has been created and files uploaded to it, the files can be made available within the file picker for use within a course. There are several steps to take to implement this feature:-

These must be done by a systems admin who has write permissions to the server directories and admin permissions within Moodle.

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.
Creating repositories on the server
  • Copy into the appropriate folder the files you want (using FTP, SFTP, shared folder etc.). (The folders can hold all types of files)

Enabling the File System repository plugin

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

Note: Ignore the similarly named repository 'Server Files' (enabled by default).

  • Click the Settings link..

Setting up a site-wide file system repository

Having clicked the "Settings" link as above:

  • Scroll down to Repositories 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.
Creating a new file system repository
Selecting and naming the repository


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

Setting up a repository inside a course

NOTE only Moodle admins can do this

Enable repositories as in the instructions above. On the Settings page:

  • Check the top box allowing users to add a repository instance to the course (1 below)
  • Go to the desired course and click on “repositories” in the administration block(2 below)
  • Scroll down and click "Create File System instance" (3 below)


1:Enable course repositories
2:Click "Repositories" in Course admin
3:Click to create an instance in the course
  • Follow the same process as here

Setting up an individual file system repository instance

NOTE: Only Moodle admins can do this

Enable repositories as in the instructions above. On the Settings page:

  • Check the top box allowing users to add a repository instance to the user context (1 below)
  • From the user menu, click "Preferences"
  • Click on “Repositories”
  • Click “Create File System instance”
  • Follow the same process as here
  • This will create a personal file system repository connecting just you to a folder on the server (2 below)
1:Enable user repository instances
2:Adding files from individual repository
  • Upload any files required by course creators to the appropriate folders

Server permissions are needed here to add via FTP (or other method) the required files.

From this point on the check boxes need not be set - leaving them set just invites people to create a repository instance and then advises them that they do not have sufficient privilges.


Using a File System repository file

A user can now make use of the uploaded files by accessing the repository from within the file picker, creating a resource link to a document, for example. This process copies the uploaded file into Moodle and students may access the resource.

It's possible to search the files in the File system repository to make locating files easier if there are many files available.

Searching the file system repository


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 capabilities

There is just one capability, View file system repository, which is allowed for the default manager, course creator, non-editing teacher and editing teacher roles. It is not set for the authenticated user role. Thus, students cannot by default view the file system repository.

See also