Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-76343

Google Drive repository: Make temporary access feature available for G-Suite only

XMLWordPrintable

    • MOODLE_401_STABLE
    • Hide

      This test requires three regular Google accounts (non-organizational), one for the site, one for the student and one for the teacher.

      Note: It is important to log out of all Google accounts between the different stages in this test otherwise Google will open the document using whatever is the first account in the list of accounts, and even if you have edit access for another account it will appear read-only until you switch users.

      1. Log in as an admin and set up and configure the OAuth 2 Google service with a client ID and secret, as described in the documentation OAuth2 Services and OAuth 2 Google service.
      2. Enable the OAuth2 authentication plugin.
      3. Enable the Google Drive repository, making sure it is connected to the Google service.
      4. Set the supported files to "Internal and External".
      5. Set the "Default return type" to "External (only links stored in Moodle)".
      6. Go again to the OAuth2 services page, connect the account to a site Google account and consent the access to Google drive.
      7. Go to Site admin->Users->Permissions->Define roles. Edit the default teacher role permissions and add the capability "mod/assign:editothersubmission". Set to 'allow'.
      8. As a teacher, create an assignment that allows file submissions.
      9. Log out of all Google accounts.
      10. Log in as a student, select a document from your Google account and select 'Create an access controlled link to the file'.
      11. Log out of all Google accounts.
      12. Log in as the teacher. Access the assignment. Click on the link. Verify that you are prompted to log in to your Google account.
      13. Log in with a different Google account to the one used to upload the student's submission. Verify you can edit the student's document.
      14. Make some changes, such as adding text, to the student's document.
      15. Log out of all Google accounts.
      16. Log in as the student, access your assignment and verify you see the changes that the teacher made in the returned Google doc. 
      17. As the student, go to your personal Google drive and verify the original document has not been altered.
      Show
      This test requires three regular Google accounts (non-organizational), one for the site, one for the student and one for the teacher. Note: It is important to log out of all Google accounts between the different stages in this test otherwise Google will open the document using whatever is the first account in the list of accounts, and even if you have edit access for another account it will appear read-only until you switch users. Log in as an admin and set up and configure the OAuth 2 Google service with a client ID and secret, as described in the documentation OAuth2 Services and OAuth 2 Google service . Enable the OAuth2 authentication plugin. Enable the Google Drive repository, making sure it is connected to the Google service. Set the supported files to "Internal and External". Set the "Default return type" to "External (only links stored in Moodle)". Go again to the OAuth2 services page, connect the account to a site Google account and consent the access to Google drive. Go to Site admin->Users->Permissions->Define roles . Edit the default teacher role permissions and add the capability "mod/assign:editothersubmission". Set to 'allow'. As a teacher, create an assignment that allows file submissions. Log out of all Google accounts. Log in as a student, select a document from your Google account and select 'Create an access controlled link to the file'. Log out of all Google accounts. Log in as the teacher. Access the assignment. Click on the link. Verify that you are prompted to log in to your Google account. Log in with a different Google account to the one used to upload the student's submission. Verify you can edit the student's document. Make some changes, such as adding text, to the student's document. Log out of all Google accounts. Log in as the student, access your assignment and verify you see the changes that the teacher made in the returned Google doc.  As the student, go to your personal Google drive and verify the original document has not been altered.

      For Assignment and Google Drive repository.

      Moodle will try to create a Share to the submitted file of students with limited time access, so the teacher can modify the content of the submitted file and the student can view it (Default is 7 days from today).

      After the expiration time, the teacher will not be able to access the file anymore.

      This feature is only available for paid G-Suite accounts, not for free accounts.

      If we use the free account, we will get an error as below.

      We should make this feature available for G-Suite accounts only.

       

      — Original description —

      While testing MDLQA-17180, an error is trigger when selecting trying to access a student's access controlled link as a teacher with the teacher role permission - mod/assign:editothersubmission set to allow.

      There error message generated is: expiration dates cannot be set on this item

            Unassigned Unassigned
            david.woloszyn@moodle.com David Woloszyn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 15 minutes
                1d 15m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.