Google Drive repository
Google Drive can serve both as a repository from which users can access files they have previously uploaded from Moodle and also as a portfolio into which they can "push" files they want to keep. When using the auth/drive.file scope, users cannot browse or pull files directly from their full Google Drive; only files uploaded via Moodle will be shown. Both options need to be enabled by the administrator before they are available for teachers and students. Both options need to be enabled by the administrator before they are available for teachers and students.
Enabling the Google Drive repository
To use the Google Drive repository, an administrator must first create a Google service (a new requirement in Moodle 3.3 onwards).
- Go to 'OAuth 2 services' in Site administration and click the button to create a new Google service.
- Follow the instructions in OAuth 2 Google service and obtain a client ID and secret.
- Enter the client ID and secret and save changes.
- Go to 'Manage repositories' in Site administration and enable the Google Drive repository.
- On the Google Drive configuration page, make sure that Google is selected as the OAuth 2 service then save changes.
Troubleshooting
If you obtain a 'This app isn't verified' message, you will need to complete a OAuth Developer Verification Form. The list of scopes that Moodle requires are: openid profile email https://www.googleapis.com/auth/drive.file.
See the discussion Google Drive Repository and Moodle 3.3.1 for more details.
Access controlled links
Students may submit files from Google Drive as 'access controlled links' in assignments. Once submitted, the student may no longer change them, but the teacher is allowed to edit them.
Teachers may display files from Google Drive as 'access controlled links'. The teacher can then continue updating the files, but students can only view them.
To enable this feature, ensure that:
- A system account has been connected in OAuth 2 services in Site administration. This account will own and control access to files submitted by students and teachers. Teachers will be able to edit the files but students will not. This should be a dedicated account for this purpose.
- "Supported files" is set to "Internal and External".
- "Default return type" is set to "External (only links stored in Moodle)".
Getting ("pulling") your files from Google Drive
- From the file picker, click on the Google Drive link and a prompt to log in will appear:
- If it is your first time, the click the "Allow access" button to log in.
- Your files will display for you to choose from (you will only see files that you have previously uploaded from Moodle to Google Drive.)
- You also have the option to upload a new file to Google Drive using the upload icon. After uploading, the file will appear in the list and can be selected like any other repository file.

- You can view them in three ways by clicking one of the options at the top right.
Repository capabilities
There is just one capability, View Google Drive repository, which is allowed for the default authenticated user role.
See also
- Issue with submitting assignments via Google Drive for those using Google Education Plus
- OAuth 2 authentication for enabling users to log in to Moodle with their Google account
- Google Drive repository in 3.3 with non-institutional accounts forum discussion
- Google Drive Repository and Moodle 3.3.1 forum discussion




