File picker is central to almost all file operations in Moodle. Files can be selected from a wide range of sources known in Moodle as repositories. Moodle repositories are accessed by navigating to Plugins | Repositories | Manage repositories:
Each repository has one of the following three states:
The order in which the repositories are listed reflects the order in which the repositories appear in File picker. This can be changed using the up and down arrows. As soon as a repository has been enabled, a Settings link will be displayed for almost all the repositories. Every repository has a repository plugin name
parameter that lets you override its default name. Some repositories also have additional settings, which will be discussed throughout this chapter.
Some repository types support multiple instances. The number of existing site-wide, course-wide, and private user instances are displayed under the Settings link. These can then be configured in the relevant context, that is, by going to Course administration | Repositories in the course settings and also by navigating to Preferences | Manage instances in the Repositories section of a user:
Site-wide instances are created as part of Settings when managing the plugins, for example, the File system repository:
For the sake of simplicity, we distinguish between internal and external repositories. An internal repository is one that accesses internal Moodle files. An external repository is located outside Moodle, either on some local media, in another application's data storage, or in the cloud.
There are a number of internal repository plugins to choose from, as follows:
Name |
Description |
Settings |
---|---|---|
Server files |
These are files on your Moodle system to which a user has access. Files are arranged in a hierarchy reflecting Moodle contexts (refer to Chapter 2, The Moodle System). | |
Recent files |
Recently used and uploaded files. |
Number of recent files |
Private files |
Personal files of a user, which can be accessed throughout Moodle. | |
File system |
Allows access to subdirectories in the |
Allow users to add a repository instance into the course (can be configured only by admins) Allow users to add a repository instance into the user context (can be configured only by admins) |
Embedded files |
Allows users to reuse the files embedded in the current text area. | |
Legacy course files |
Access to files after migrating from Moodle 1.9 |
Server files, Recent files, and Private files are managed by Moodle. The User quota parameter can be specified for private files by going to Security | Site policies. The default value is 100 MB. The File system plugin has already been described in detail in Chapter 2, The Moodle System, where external access to the Moodle filesystem was required, for example, to upload files via FTP.
One area that requires some attention is the Legacy course files plugin. In Moodle 1.x, all the files were stored in a course files area. They were not linked to a specific activity, resource, or any personal files, which can be accessed across courses, that exist. This caused problems with backups, data security, and data integrity. A new File
API
has been introduced in Moodle 2, which rectifies these shortcomings. An issue arises when updating from Moodle 1.9 to Moodle 2 (you cannot upgrade straight to Moodle 3.x). During the migration process, Moodle is able to allot files to activities and resources, but it does not know what to do with unused files or files that have been linked from within certain resources. It stores these in the Legacy course files area. Users will have to move these files to the appropriate place manually, that is, their personal files area as well as resources and activities.
Two settings related to legacy files can be found in Common repository settings, which will be dealt with at the end of the Repository section.
External repository plugins will add, that is, copy, stream, or link, new files or content to your Moodle system. They may be uploaded from your local computer, a USB pen drive, network drive, or a cloud storage, such as Google Drive, Dropbox, Microsoft OneDrive, Box, and Amazon S3. Additionally, external applications, such as Alfresco, EQUELLA, Flickr, Picasa, and YouTube, are supported as sources.
It is expected that the number of repository plugins will grow in the near future to access other storage types and applications. Repository
API
of Moodle makes the development of these add-ons relatively painless for a programmer.
The following repository plugins form a part of the core of Moodle and act as file or data storages. They are described in detail in the following table:
The application repository plugins connect to applications and are part of the Moodle core. They are described in detail in the following table:
A number of shared settings can be found by navigating to Plugins | Repositories | Common repository settings. They are explained in detail in the following table:
Once the repository setup has been completed, it is best to test the access from a number of contexts (users, sites, and courses) and also make sure that no users have access to sources that they shouldn't have and vice versa.
Now that our File picker is fully populated and your users are able to get content into Moodle, let's have a look at how they can achieve the opposite and get content out of Moodle.
Additional information on all the mentioned Moodle repositories can be found at https://docs.moodle.org/en/Repositories.
18.117.138.104