Note: You are currently viewing documentation for Moodle 2.0. Up-to-date documentation for the latest stable version is available here: Google Apps Integration.

Google Apps Integration

From MoodleDocs
Revision as of 17:19, 26 April 2010 by Jason Hardin (talk | contribs)

Google Apps Education Edition™ Integration

Introduction

Moodlerooms and Google have worked together to build a state of the art integration. The 1.0 version of the integration provides:

   * Automatic creation of users in Google Apps (Google Docs™, Google Calendar™, and Gmail™) when they are created in Moodle
   * Automatic log in to Google Apps when a user logs in to Moodle
   * A Gmail block in Moodle that displays latest Gmail messages on the Moodle Front Page
   * A Google Apps block on the Moodle Front Page displays links to Google Start Page, Google Docs, Google Calendar and Gmail
   * A Moodle app on the Google Apps Start PageGoogle Apps can integrates with Moodle v1.9 and above.  There is a contributed code block that can be added to Moodle and a widget which can be added to Google. It will allow for a single sign-on for users from Moodle to Google.  

Integration Setup

There are a few steps involved with setting up the Google Apps Education Edition Integration. This setup should be configured by a technically knowledgeable Moodle administrator.

  1. Set up Moodle's Authentication
  2. Set up Google's Authentication
  3. Add and configure the Gmail and Google Apps blocks
  4. Add and setup the User Sync block (optional; for those who do not have a Google account creation/management process)

Requirements

  1. gsaml, gaccess, gmail, gdata and lib/zend code must be installed
    • auth/gsaml
    • blocks/gmail
    • blocks/gdata
    • blocks/gaccess
    • lib/zend

Generating Private Key and SSL signed Certificate

sudo openssl genrsa -des3 -out googleappsidp.key 1024 sudo openssl rsa -in googleappsidp.key -out googleappsidp.pem sudo openssl req -new -key googleappsidp.key -out googleappsidp.csr sudo openssl x509 -req -days 9999 -in googleappsidp.csr -signkey googleappsidp.key -out googleappsidp.crt

Set Up Moodle's Authentication

  1. Log in to Moodle as an Administrator
  2. Click Notifications to update block tables
  3. Enable the Google Authentication plug-in from the Manage Plug-ins admin page
  4. In the Site Admin menu, select "Users." Next, select "Authentication" and click "Google Authentication."
  5. Enter your Google partner page domain name.
  6. Upload private key (for more information on creating this, refer to Google documentation regarding key generation)
  7. Upload the SSL signing certificate (for more information on creating this, refer to Google documentation regarding key generation)
  8. Click Save Changes

Set Up Google's Authentication

  1. In a new browser window, log in to the Google Apps Control Panel page as an admin. To access this page, you can use this URL -- just change the end to have your partner page domain information: https://www.google.com/a/yourpartnerpagedomainname.com.
  2. Click the Advanced tools tab
  3. Click the Set up single sign-on (SSO) link next to Authentication
  4. Select the checkbox to "Enable Single Sign-on"
  5. Enter this URL into the Sign-in page URL text field:
    • http://<moodle site url>/login/index.php
  1. Enter this URL into the Sign-out page URL text field:
    • http://<moodle site url>/login/logout.php
  1. Enter this URL into the Change password URL text field:
    • http://<moodle site url>/login/change_password.php
  1. Generate and upload a verification certificate to Google (X.509 certificate containing the public key)
  1. Click Save Changes
  2. Click the User Accounts tab
  3. This displays existing users as well as a message that says "You can create up to ### user accounts for this domain." If you are using the Google User Sync block for account management, this number must match or be larger than the number of accounts you plan on creating. Request more accounts if you need them by clicking the request more link on this page.
  4. Click the Settings link. Check the box to "Enable provisioning API" (otherwise users will NOT be updated) (Users and Groups > Settings > Enable provisioning API must be checked.)
  5. Click Save Changes
  6. Next you will add and configure the blocks as well as the Moodle-Google Gadget. See the "Google Blocks Configuration" and "Moodle-Google Gadget Setup" tutorials for more information.

Things to Consider:

  • The Gmail feed might not be found and display an error. Troubleshooting tips include:
    • Turn on debugging and the diagnostics page will perform a basic check on the Gmail feed.
    • If you are using the Google User Sync block, check to see if an admin or guest user has been added to the sync. If so, remove them.
    • If you are using the Google User Sync block, be sure your Google user settings are set to allow the number users you are adding to the sync in Moodle. If the number of Moodle users is larger than the number set in Google, then those accounts will not be created or synced (ie, if Google is set to 1000 users and Moodle has 1500, 500 accounts will fail to be created or synced).
  • The location of the Google Authentication Plug-in in the Authentication order is important. Currently, it needs to override a user's auth type when a Moodle user changes passwords. This behavior may affect M-Net users. A solution for this problem has not yet been found.
  • Do not add a user to the sync if their user name has been deleted from Google. You need to wait five days before adding them to the User Sync.
  • See the Diagnostics Page in the gsaml settings for more information about your setup.

Gmail Block Settings

In Site Admin, go to Modules > Blocks > Manage Blocks

  1. Define the OAuth consumer secret. To find your consumer secret:
    • Log in to http://www.google.com/a/YOURDOMAIN with your Google Admin account
    • Click Advanced Tools
    • Click Manage OAuth Access
    • Copy the OAuth consumer secret from this screen and paste it into the Moodle text box
  1. Unread Message Count: Here, you can specify the number of unread messages to display in the Gmail block. Leave as zero for no limit.
  2. New Window Links: By default, the Gmail links open in a new browser window or tab. You can change this to open in the same window by unchecking this setting.
  3. Show first name and Show last name: By default, the author's first and last name is displayed next to the e-mail title -- uncheck these settings to hide.
  4. Save changes

Google Apps Settings

In Site Admin, go to Modules > Blocks > Manage Blocks By default, Google Apps will open in a new browser window or tab. You can change this to open in the same window by unchecking this setting.

Google User Sync Block Settings

Google User Sync can be configured from the settings link inside the block. The same settings can be found in the Site Administration area. In Site Admin, go to Modules > Blocks > Manage Blocks. For information on how to configure the Google User Sync, see the "Google User Sync Settings" tutorial.

Moodle-Google Gadget Setup

To set up the Moodle-Google gadget, you need to first set up and configure the Google Apps Education Edition Integration. To complete this process, you must be an admin for both the Moodle installation and the Google installation.

  1. Log in to the Google Control Panel as an admin. Use the link below, substituting your Google domain name for "mroomsdev.com"
  1. Click the Service Settings tab, then the Start Page link.
  2. Click Customize and Publish
  3. Click Select default content
  4. Click Refresh default content below to make the Add stuff link appear
  5. Click Add stuff
  6. Click Add by URL
  7. Paste the following URL, substituting your Moodle domain name for "test.mroomsdev.com"
    • http://<moodle site url>/auth/gsaml/moodlegadget.php
  1. Click Add
  2. Click close
  3. Click Back to Homepage
  4. You should see the Moodle Gadget appear
  5. Lastly, be sure to click the Publish link in the furthest upper right-hand corner.


Things to Consider

The Moodle-Google Gadget is a beta prototype. In the future, it may be much more useful. Currently, there is a known bug regarding the Gadget not updating immediately upon install. Developers are looking into it.


Features

  • Moodle users are automatically created in Google Apps (Google Docs, Calendar, and Gmail).
  • When you log in to Moodle, you are automatically logged in to Google Apps.
  • A Gmail block in Moodle displays your latest Gmail messages when you login to the Moodle Front Page.
  • A Google Apps block on the Moodle Front Page displays links to your Google Start Page, Google Docs, Google Calendar and Gmail.
  • A Google Widget shows a link to Moodle on the Google side.

Description

Essentially, once the integration is complete, students will be presented with a Google Apps block that will link out to their Google account. This will allow Moodle students to work online collaboratively rather than each downloading a document, making edits, uploading it to Moodle and then comparing with other documents.

This would be great for online group activities or exercises, collaborative websites and collaborative calendars.

How to set up

As an admin, you need to coordinate your Moodle accounts with your Google accounts. Set up an Admin Account at Google - this is generally free if you are an educator. Each student in Moodle that is synced with Google apps will be granted a Gmail acccount. As a site admin or teacher, you will need to determine if you class(es) will use Gmail services to communicate or if you want to use the email address associated with your Moodle account (in some cases they could be the same).

Tips and tricks

  • Once the Moodle accounts are disabled, so are the Google accounts. However one could choose to grant access via Google to continue collaboration after a course is completed.

See also