Moodle repositories

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:

Moodle repositories

Each repository has one of the following three states:

  • Enabled and visible: The repository will be available throughout the system.
  • Enabled but hidden: Already set up repositories will be available, but no new instances can be created. This only applies to repositories that allow multiple instances (discussed later in this section).
  • Disabled: The repository is not available in your Moodle system.

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.

Tip

When you disable a repository plugin, its settings and all of its instances will be removed. You have the option to download any content or references there to Moodle.

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:

Moodle repositories

Site-wide instances are created as part of Settings when managing the plugins, for example, the File system repository:

Moodle repositories

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.

Internal repository plugins

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 $CFG->dataroot/repository. A readable directory has to be selected for each instance. Setup and access have been covered in Chapter 2, The Moodle System.

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.

Tip

Legacy course files are intended to be a temporary measure. The objective is to discontinue their use once all the files have been migrated.

External repository plugins

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.

Data storage repositories

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:

Name

Description

Settings

Upload a file

Manually uploading a file that can be accessed from your local PC or Mac. This will be used a lot by all users.

 

WebDAV repository

Access to a WebDAV server. A repository instance has to be created in the course or user context where a number of parameters have to be specified, such as Name, WebDAV type, WebDAV server, WebDAV path, Authentication, and the optional WebDAV server port, WebDAV server user, and WebDAV server password parameters.

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)

Google Drive

Access to users' documents in Google Drive. Access has to be granted by each user when the plugin is used for the first time. It requires OAuth2.0.

CLIENT ID and CLIENT SECRET

Microsoft OneDrive

Access to users' documents in MS OneDrive. Access has to be granted by each user when the plugin is used for the first time.

Client ID

Secret

Dropbox

Access to a single Dropbox folder, not one for each user. Click and follow the Dropbox developers link under the Settings link, and click on the Create an App button to get access to the two required parameters (App key and App secret).

Dropbox API Key

Dropbox Secret

Cache Limit

Box

Similar to the Dropbox repository. Follow the link on the Settings page and log on for an API key.

Client ID

Secret

Amazon S3

Access to the Amazon S3 storage service, including the ability to select in which geographical region your data will be stored.

Access key

Secret key

Amazon S3 endpoint

URL Downloader

Importing a file via a URL link. This can be an internal or external web address.

 

Application repositories

The application repository plugins connect to applications and are part of the Moodle core. They are described in detail in the following table:

Name

Description

Settings

Alfresco repository

Access to Alfresco, a commercial, open source content management system. Both copying and linking are supported.

Allow users to add a repository instance into the course

Allow users to add a repository instance into the user context

Flickr

Access to the personal accounts of Flickr, a photo sharing site. A login required when accessing it the first time.

API key

Secret

Flickr public

Access to the public area of photo sharing site, Flickr.

API key

Allow users to add a repository instance into the course

Allow users to add a repository instance into the user context

Picasa web album

Access to Picasa web albums. A login is required. It requires OAuth2.0.

Client ID

Secret

Youtube videos

Access to the YouTube video platform. Videos will be streamed to Moodle, not copied.

API key

Merlot.org

Access to MERLOT (Multimedia Education Resource for Learning and Online Teaching).

License key

Wikimedia

Access to the Wikimedia Commons platform.

 

EQUELLA

Access to the EQUELLA repository

Allow users to add a repository instance into the course

Allow users to add a repository instance into the user context

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:

Setting

Description

Cache expire

This setting specifies the number of listings that are stored locally. The default value of 120 seconds is sufficient unless you have users with erroneous connections.

Get file timeout

Timeout needed to download external files.

Sync file timeout

Timeout needed to synchronize external files.

Sync image timeout

Timeout needed to synchronize images.

Allow external links

By default, this setting is enabled. External links are supported by some repositories, for instance, File system or Alfresco.

Legacy course files in new courses

Legacy course files have been discussed earlier; unless really necessary, it is recommended that you leave this option unchecked.

Allow adding to legacy course files

If legacy course files exist in a course, this setting allows the adding of new files to it. This should be avoided if possible.

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.

Application repositories

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.

Note

Additional information on all the mentioned Moodle repositories can be found at https://docs.moodle.org/en/Repositories.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.138.104