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

Implement Better office integrations project

    Details

    • Testing Instructions:
      Hide

      These instructions assume your site is running under HTTPS. It can be self-signed and the site does not need to be accessible from the internet.

       

       

      Here I will include testing instructions for all the new bits covered by this branch including -MDL-58219-

       

      OAuth Services

       

      Login as Admin

      Go to Site administration -> Server -> OAuth 2 Services

      Use the "Create from template" button to create an OAuth 2 service from the Google template. 

      Follow the google instructions on https://docs.moodle.org/dev/OAuth2_Services to setup Google as an OAuth service.

      Enable the OAuth 2 Authentication plugin. 

      Enable the setting authpreventaccountcreation.

      Log out and try and login with a google account using the "Login with Google" button on the login page.

      It should not work!!!!!

      Login as admin and turn the "authpreventaccountcreation" setting off.

      Logout again and try and login with a google account again.

      You should reach a screen saying a confirmation email has been sent.

      Check you email and follow the link in the confirmation email (I hope it was your email!). 

      This should complete the signup and create you an account with the picture and some profile info pulled from Google.

      Delete the user that was signed up via OAuth and login as someone else.

      Make sure this account has no current user picture.

      Go to your preferences page and visit "Linked logins".

      Link a google login to your Moodle account. 

      Logout and verify you can login to your Moodle account using your Google login.

      Verify the user picture is updated to the one from Google.

      Change your user picture to something else.

      Logout and login again with the google account.

      Verify the picture does not change.

      Unlink the google login from your Moodle account.

      Make sure your moodle email is the same as the email for the google account.

      Try and login using your google account when it's not linked to your moodle account.

      You should get to a "confirmation email was sent page".

      Check your email and follow the link to login and connect your google account to your moodle account.

      As an admin - edit the Google OAuth Service and set a login domain to something that won't match (iwontmatch.com is good).

      Logout and verify you cannot login using the google login.

      As an admin set the login domain to domain matching the email for your google account (e.g. gmail.com).

      Logout and verify you can login using the google login.

      As an admin set the login domain to domain matching the email for your google account (e.g. gmail.com) AND a non-matching domain (iwontmatch.com) separated with commas.

      Logout and verify you can login using the google login.

      Disable the google service and verify it no longer shows on the login page.

      Enable the google service and verify it shows on the login page again.

       

       

      Pause for air.

       

      Repositories

       

      Enable the "Google Drive" repository. 

      Link it to the Google OAuth service.

      Do not connect the Google OAuth service to a System account yet. 

      By uploading some files from Google to a folder resource, verify that the repo only supports "Internal (files copied to Moodle)" files. Note: Either file type will be available from the repository config page - it's only when you use the repository in a file picker that only internal files will be available. Note 2: When there is only one option available you don't even get a choice - so here you are verifying that you don't even get to choose.

      Connect the system account to a google account (preferably a new separate google account). This is done on the Site admin -> system -> Oauth 2 services page.

      Now verify the settings for the google drive repo can be used to restrict the available file types (internal or controlled link) and set the default type for the file picker.

       

      More air required...

       

      Verify the behaviour of internal files.

       

      Upload a binary file (image) from google drive as a copy.

       

      Verify the file is copied correctly and can be viewed in moodle.

       

      Upload an office file from google drive as a copy. 

      Verify the file is exported to Moodle in the configured file format (see repo settings) and can be viewed in Moodle. 

       

      Verify the behaviour of controlled links.

       

       

      Create an assignment allowing file uploads. 

      As a student upload a binary file from google.

      Verify the file shows in Moodle as a link.

      Verify clicking on the link gives you read access to the file.

      Verify deleting the original file from google drive does not affect the file linked to Moodle.

      Login as a teacher with "Edit other submission" capabilities (not default).

      Verify clicking on the link gives you WRITE access to the uploaded file.

       

      As a student upload a google doc file from google.

      Verify the file shows in Moodle as a link with extension gdoc.

      Verify clicking on the link gives you read access to the file.

      Verify changing the link (append &offline=1) gives you an offline (.doc) version of the google doc (this is for mobile offline access).

      Verify deleting the original file from google drive does not affect the file linked to Moodle.

      Login as a teacher with "Edit other submission" capabilities (not default).

      Verify clicking on the link gives you WRITE access to the uploaded file.

       

       

      Login to the google drive of the system account that was connected to the google service.

      Verify the files linked to Moodle show up in a folder structure that mirrors the context structure and file area structure in Moodle.

       

      Calendar

       

      Go to export your calendar. Verify there is an obvious link to the docs page describing how to subscribe to your Moodle calendar from Outlook / Google calendar.

       

      Repeat the above instructions for setting up an Office 365 OAuth Service and One Drive repository. It should function identically to the google drive one (except slower just because).

       

      Setup facebook as an OAuth service and verify you can login to Moodle with a facebook account.

      Show
      These instructions assume your site is running under HTTPS. It can be self-signed and the site does not need to be accessible from the internet.     Here I will include testing instructions for all the new bits covered by this branch including - MDL-58219 -   OAuth Services   Login as Admin Go to Site administration -> Server -> OAuth 2 Services Use the "Create from template" button to create an OAuth 2 service from the Google template.  Follow the google instructions on https://docs.moodle.org/dev/OAuth2_Services  to setup Google as an OAuth service. Enable the OAuth 2 Authentication plugin.  Enable the setting authpreventaccountcreation. Log out and try and login with a google account using the "Login with Google" button on the login page. It should not work!!!!! Login as admin and turn the "authpreventaccountcreation" setting off. Logout again and try and login with a google account again. You should reach a screen saying a confirmation email has been sent. Check you email and follow the link in the confirmation email (I hope it was your email!).  This should complete the signup and create you an account with the picture and some profile info pulled from Google. Delete the user that was signed up via OAuth and login as someone else. Make sure this account has no current user picture. Go to your preferences page and visit "Linked logins". Link a google login to your Moodle account.  Logout and verify you can login to your Moodle account using your Google login. Verify the user picture is updated to the one from Google. Change your user picture to something else. Logout and login again with the google account. Verify the picture does not change. Unlink the google login from your Moodle account. Make sure your moodle email is the same as the email for the google account. Try and login using your google account when it's not linked to your moodle account. You should get to a "confirmation email was sent page". Check your email and follow the link to login and connect your google account to your moodle account. As an admin - edit the Google OAuth Service and set a login domain to something that won't match (iwontmatch.com is good). Logout and verify you cannot login using the google login. As an admin set the login domain to domain matching the email for your google account (e.g. gmail.com). Logout and verify you can login using the google login. As an admin set the login domain to domain matching the email for your google account (e.g. gmail.com) AND a non-matching domain (iwontmatch.com) separated with commas. Logout and verify you can login using the google login. Disable the google service and verify it no longer shows on the login page. Enable the google service and verify it shows on the login page again.     Pause for air.   Repositories   Enable the "Google Drive" repository.  Link it to the Google OAuth service. Do not connect the Google OAuth service to a System account yet.  By uploading some files from Google to a folder resource, verify that the repo only supports "Internal (files copied to Moodle)" files. Note: Either file type will be available from the repository config page - it's only when you use the repository in a file picker that only internal files will be available. Note 2: When there is only one option available you don't even get a choice - so here you are verifying that you don't even get to choose. Connect the system account to a google account (preferably a new separate google account). This is done on the Site admin -> system -> Oauth 2 services page. Now verify the settings for the google drive repo can be used to restrict the available file types (internal or controlled link) and set the default type for the file picker.   More air required...   Verify the behaviour of internal files.   Upload a binary file (image) from google drive as a copy.   Verify the file is copied correctly and can be viewed in moodle.   Upload an office file from google drive as a copy.  Verify the file is exported to Moodle in the configured file format (see repo settings) and can be viewed in Moodle.    Verify the behaviour of controlled links.     Create an assignment allowing file uploads.  As a student upload a binary file from google. Verify the file shows in Moodle as a link. Verify clicking on the link gives you read access to the file. Verify deleting the original file from google drive does not affect the file linked to Moodle. Login as a teacher with "Edit other submission" capabilities (not default). Verify clicking on the link gives you WRITE access to the uploaded file.   As a student upload a google doc file from google. Verify the file shows in Moodle as a link with extension gdoc. Verify clicking on the link gives you read access to the file. Verify changing the link (append &offline=1) gives you an offline (.doc) version of the google doc (this is for mobile offline access). Verify deleting the original file from google drive does not affect the file linked to Moodle. Login as a teacher with "Edit other submission" capabilities (not default). Verify clicking on the link gives you WRITE access to the uploaded file.     Login to the google drive of the system account that was connected to the google service. Verify the files linked to Moodle show up in a folder structure that mirrors the context structure and file area structure in Moodle.   Calendar   Go to export your calendar. Verify there is an obvious link to the docs page describing how to subscribe to your Moodle calendar from Outlook / Google calendar.   Repeat the above instructions for setting up an Office 365 OAuth Service and One Drive repository. It should function identically to the google drive one (except slower just because).   Setup facebook as an OAuth service and verify you can login to Moodle with a facebook account.
    • Affected Branches:
      MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-58220-master

      Description

      This is a separate issue to review / integrate the set of changes for the skydrive repo + final improvements.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  2 Vote for this issue
                  Watchers:
                  18 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    15/May/17