Repositories FAQ

What is a repository?

A repository can be thought of as a storage area from which users can retrieve files to add to their course. There are several repositories enabled by default, such as Server files which contains files from other courses a user has access to, or Upload a file which allows the user to search their computer or USB drive for a file to upload. Other repositories include Google Drive or Flickr. See Repositories for more information.

How can I enable repositories in LMS?

Repositories can be enabled by a site administrator in Administration > Site administration > Plugins > Repositories > Manage repositories.

All enabled and visible repositories will appear in the file picker.

How can I delete an embedded file previously added using the file picker?

There is no need to do anything, as any unused files are detected and then deleted automatically after a period of time. Users cannot delete files manually, since they may be used elsewhere.

When an activity or resource which uses a file is deleted, the file is moved immediately to trash. The frequency with which trash is emptied i.e. files are deleted depends on the settings in Site administration > Server > Scheduled tasks (coretaskfile_trash_cleanup_task)

If I add a file (File resources) to a page, then delete the File resource, will the file I added remain in my Recent files list?

No. The file will not be available.

How do I create a new repository on my site?

You can create a new repository that will show up on the file picker. See File system repository.

How can I prevent users from accessing the private files repository?

If you want to prevent users from accessing it but still wish other users to access it, follow these steps:

  1. In Administration>Site administration>Users>Permissions>Define Roles create a new role (such as “no private files”) and assign it in the system context. (See Creating custom roles for help creating a new role)
  2. Search for and set the capabilities lms/user:manageownfiles and repository/user:view to prohibit.
  3. In Administration>Site administration>Users>Permissions>Assign system roles, give this role to the user(s) you do not wish to access private files.
  4. They may be enrolled as normal users in courses, but will not be able to use their private files.

An alternative, but more dramatic, because it involves modifying standard roles, is to edit both the authenticated user role AND the user role to prevent the capabilities “lms/user:manageownfiles” and “repository/user:view” – and then edit the teacher role (and any others) to allow them. You have to do it to the authenticated user role as well, as all users are authenticated users in the system as well as instructors or users.

What happens if an instructor adds a file from their Private files to the course and they later leave and their account is closed?

As long as a file is used in a context, such as a course, the file should remain available in that context.

That holds true when an instructor copies a file in a course from his My private files area and also when an instructor creates an alias/shortcut: in the latter case if aaninstructor deletes his files from My private files area that are used as alias/shortcut in some courses, LMS will convert existing alias/shortcuts into file copies, so your course file links won’t break.

I cannot access a user’s repositories when logged in as that user

This is intentional, as there is a security and privacy risk involved in an administrator being able to log in as a user/student and then explore and use the user’s Google Drive, Dropbox, and other similar repositories.

See also