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

Update Google Drive repository to allow Shared drive files

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      NOTE: This issue should be tested internally.

      Prerequisites

      1. 2 Google Drive accounts:
        1. one supports and has shared drives (ex. Google Workspace account)
        2. one does not support shared drive. (ex. Personal Google account)
      2. In both accounts create new API service with credentials. (https://docs.moodle.org/310/en/OAuth_2_Google_service)
      3. As admin, create 2 new Google OAuth2 services (Site administration > Server > OAuth 2 services) and configure them using the credentials that were generated earlier .
      4. Enable the Google Drive repository (Site administration > Plugin > Repositories > Manage Repositories)

      Test content browsing in a repository that has shared drives

      1. Login as Admin.
      2. Go to Site administration > Plugin > Repositories > Manage Repositories
      3. Go to the settings page for the Google Drive repository
        1. Set 'OAuth 2 service' to the previously configured Google OAuth2 service with the credentials from the account which supports shared drives.
        2. Save changes.
      4. Go to 'Private files'.
      5. Click on the 'Add...' button in the filemanager.
      6. Select the Google Drive repository and login to your account.
      7. Once authorized:
        • confirm that 2 folders are displayed in the repository root,  'My Drive' and 'Shared Drives'
      8. Go to 'My Drive'. (make sure previously that your 'My Drive' in the Google Drive account has multiple files and folders with content or you extract and upload the folder from the boost.zip file attached in the issues)
        • confirm that the proper content is displayed (files are displayed as icons representing the file type)
          (Note: shortcut files will not be displayed in the repository)
        • confirm that the folders are displayed first (ordered alphabetically) and then the files (ordered alphabetically)
        • confirm that the breadcrumb navigation is properly displayed.
      9. Navigate through the existing folders within the 'My drive' area.
        • confirm that the proper content is displayed in each folder.
        • confirm that the folders are displayed first (ordered alphabetically) and then the files (ordered alphabetically)
        • confirm that the breadcrumb navigation is properly displayed.
      10. Navigate back to the root level of the repository by clicking on the first navigation node in the breadcrumb (should be the name of the repository)
      11. Go to 'Shared drives'.
        • confirm that there are folders that represent each existing shared drive.
        • confirm that the breadcrumb navigation is properly displayed.
      12. Navigate through the shared drive folders and also through directories within them.
        • confirm that the proper content is displayed in each folder.
        • confirm that the folders are displayed first (ordered alphabetically) and then the files (ordered alphabetically)
        • confirm that the breadcrumb navigation is properly displayed.

      Test content searching in a repository that has shared drives

      Assuming that the Google Drive repository is still configured to use the Google OAuth2 service with the credentials from the account which supports shared drives.

      1. Login as Admin.
      2. Go to 'Private files'.
      3. Click on the 'Add...' button in the filemanager.
      4. Select the Google Drive repository and login to your account.
      5. Add a search term in the repository search box (make sure the search term fully or partially matches some existing files and folders on the shared drives and my drive), and press Enter.
        • confirm that the proper results are returned and displayed (confirm that shared drive content is included)
        • confirm that the folders are displayed first (ordered alphabetically) and then the files (ordered alphabetically)
        • confirm that the last node in the breadcrumb navigation is presented as "Search results for: 'searchterm'"
      6. Click on some of the folders which were returned by the search .
        • confirm that you are able to navigate to the given folder and directories within that folder.
        • confirm that the proper content is displayed in each folder.
        • confirm that the confirm that the breadcrumb navigation is properly displayed (appending nodes after the search nav node).
      7. Click on the search node in the breadcrumb navigation ("Search results for: 'searchterm'")
        • confirm that you are directed back to the search results and the proper results are still returned and displayed.

      Test whether a content from shared drives can be used

      Assuming that the Google Drive repository is still configured to use the Google OAuth2 service with the credentials from the account which supports shared drives.

      1. Login as Admin.
      2. Go to 'Private files'.
      3. Click on the 'Add...' button in the filemanager.
      4. Select the Google Drive repository and login to your account.
      5. Go to 'Shared drives'
      6. Go into one of the existing shared drive folders that has content in it.
      7. Click on a file from within the shared drive and select it.
        • confirm that the file now appears in the in 'Private files' area.
      8. Save changes.
        • confirm that the file still exists in the 'Private files' area.
      9. Click on the file and attempt to download it.
        • confirm that the file can be downloaded.

      Test content browsing in a repository that hasn't any shared drives (Shared drives folder should not be present)

      1. Login as Admin.
      2. Go to Site administration > Plugin > Repositories > Manage Repositories
      3. Go to the settings page for the Google Drive repository
        1. Set 'OAuth 2 service' to the previously configured Google OAuth2 service with the credentials from the account which doesn't support shared drives.
        2. Save changes.
      4. Go to 'Private files'.
      5. Click on the 'Add...' button in the filemanager.
      6. Select the Google Drive repository and login to your account.
      7. Once authorized:
        • confirm that 1 folder is displayed in the repository root,  'My Drive'.
      8. Repeat the steps 8-9 from the first test ("Test content browsing in a repository that has shared drives") and confirm that everything works as expected.
      Show
      NOTE: This issue should be tested internally. Prerequisites 2 Google Drive accounts: one supports and has shared drives (ex. Google Workspace account) one does not support shared drive. (ex. Personal Google account) In both accounts create new API service with credentials. ( https://docs.moodle.org/310/en/OAuth_2_Google_service ) As admin, create 2 new Google OAuth2 services (Site administration > Server > OAuth 2 services) and configure them using the credentials that were generated earlier . Enable the Google Drive repository (Site administration > Plugin > Repositories > Manage Repositories) Test content browsing in a repository that has shared drives Login as Admin. Go to Site administration > Plugin > Repositories > Manage Repositories Go to the settings page for the Google Drive repository Set 'OAuth 2 service ' to the previously configured Google OAuth2 service with the credentials from the account which supports shared drives. Save changes. Go to 'Private files'. Click on the 'Add...' button in the filemanager. Select the Google Drive repository and login to your account. Once authorized: confirm that 2 folders are displayed in the repository root,  'My Drive' and 'Shared Drives' Go to 'My Drive'. (make sure previously that your 'My Drive' in the Google Drive account has multiple files and folders with content or you extract and upload the folder from the boost.zip file attached in the issues) confirm that the proper content is displayed (files are displayed as icons representing the file type) ( Note : shortcut files will not be displayed in the repository) confirm that the folders are displayed first (ordered alphabetically) and then the files (ordered alphabetically) confirm that the breadcrumb navigation is properly displayed. Navigate through the existing folders within the 'My drive' area. confirm that the proper content is displayed in each folder. confirm that the folders are displayed first (ordered alphabetically) and then the files (ordered alphabetically) confirm that the breadcrumb navigation is properly displayed. Navigate back to the root level of the repository by clicking on the first navigation node in the breadcrumb (should be the name of the repository) Go to 'Shared drives'. confirm that there are folders that represent each existing shared drive. confirm that the breadcrumb navigation is properly displayed. Navigate through the shared drive folders and also through directories within them. confirm that the proper content is displayed in each folder. confirm that the folders are displayed first (ordered alphabetically) and then the files (ordered alphabetically) confirm that the breadcrumb navigation is properly displayed. Test content searching in a repository that has shared drives Assuming that the Google Drive repository is still configured to use the Google OAuth2 service with the credentials from the account which supports shared drives. Login as Admin. Go to 'Private files'. Click on the 'Add...' button in the filemanager. Select the Google Drive repository and login to your account. Add a search term in the repository search box (make sure the search term fully or partially matches some existing files and folders on the shared drives and my drive), and press Enter. confirm that the proper results are returned and displayed (confirm that shared drive content is included) confirm that the folders are displayed first (ordered alphabetically) and then the files (ordered alphabetically) confirm that the last node in the breadcrumb navigation is presented as "Search results for: 'searchterm' " Click on some of the folders which were returned by the search . confirm that you are able to navigate to the given folder and directories within that folder. confirm that the proper content is displayed in each folder. confirm that the confirm that the breadcrumb navigation is properly displayed (appending nodes after the search nav node). Click on the search node in the breadcrumb navigation ("Search results for: 'searchterm'") confirm that you are directed back to the search results and the proper results are still returned and displayed. Test whether a content from shared drives can be used Assuming that the Google Drive repository is still configured to use the Google OAuth2 service with the credentials from the account which supports shared drives. Login as Admin. Go to 'Private files'. Click on the 'Add...' button in the filemanager. Select the Google Drive repository and login to your account. Go to 'Shared drives' Go into one of the existing shared drive folders that has content in it. Click on a file from within the shared drive and select it. confirm that the file now appears in the in 'Private files' area. Save changes. confirm that the file still exists in the 'Private files' area. Click on the file and attempt to download it. confirm that the file can be downloaded. Test content browsing in a repository that hasn't any shared drives (Shared drives folder should not be present) Login as Admin. Go to Site administration > Plugin > Repositories > Manage Repositories Go to the settings page for the Google Drive repository Set 'OAuth 2 service ' to the previously configured Google OAuth2 service with the credentials from the account which doesn't support shared drives. Save changes. Go to 'Private files'. Click on the 'Add...' button in the filemanager. Select the Google Drive repository and login to your account. Once authorized: confirm that 1 folder is displayed in the repository root,  'My Drive' . Repeat the steps 8-9 from the first test ("Test content browsing in a repository that has shared drives") and confirm that everything works as expected.
    • Affected Branches:
      MOODLE_311_STABLE, MOODLE_38_STABLE, MOODLE_400_STABLE
    • Fixed Branches:
      MOODLE_311_STABLE
    • Pull 3.11 Branch:
      MDL-61768-311-3
    • Pull Master Branch:
      MDL-61768-master-3
    • Story Points:
      3
    • Sprint:
      4.0 Navigation blitz, 4.0 Navigation blitz 2

      Description

      Update the Google API to v3 and the Google Drive repository so Shared drive (previously called Team Drive) files can also be browsed from Moodle.

        Attachments

        1. boost.zip
          736 kB
        2. MDL-61768 1 (2 folders).png
          MDL-61768 1 (2 folders).png
          34 kB
        3. MDL-61768 2 (icons).png
          MDL-61768 2 (icons).png
          60 kB
        4. MDL-61768 3 (shared).png
          MDL-61768 3 (shared).png
          53 kB
        5. MDL-61768 4 (search).png
          MDL-61768 4 (search).png
          41 kB
        6. MDL-61768 5 (folder first).png
          MDL-61768 5 (folder first).png
          42 kB
        7. MDL-61768 6 (file).png
          MDL-61768 6 (file).png
          15 kB

          Issue Links

            Activity

              People

              Assignee:
              Geshoski Mihail Geshoski
              Reporter:
              meltonml Michelle Melton
              Peer reviewer:
              Peter Dias Peter Dias
              Integrator:
              Jake Dallimore Jake Dallimore
              Tester:
              Simey Lameze Simey Lameze
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              17 Vote for this issue
              Watchers:
              21 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                17/May/21

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 weeks, 1 day, 5 hours, 4 minutes
                  2w 1d 5h 4m