The Killer App: Google Apps and Moodle Integration?


Image via Wikipedia

Even though I haven’t used Moodle as much as WordPress and Wikispaces in my own teaching and learning, I have installed it enough times to know what it does well and what it does not do so well.

Moodle does a very good job of monitoring students, giving assessments/grades, providing content, and doing discussion forums. It does not do a very good job of synchronous collaboration, wikis, email, or any of the other things that Google Apps does an amazing job at. I guess that is why Moodlerooms decided that it would be a great idea to get the two projects together and create an easy way to do single-sign-on.

I am amazed at the potential for something like this. Imagine being able to log into your classes, your e-mail, your sites, and your docs all at one place. Well, after much working on my own installation, I would like to provide a simple how to for making this process happen in your Moodle instance:

Step 1: Download Moode-Google Integration “plugin”

Step 2: Unzip the files into your moodle installation.

Step 3: Follow these instructions for the moodle side:

  1. Login to Moodle as an Administrator
  2. Click Notifications to update block tables
  3. In the Site Admin menu, select Users. Next, select Authentication and click Google Authentication.
  4. Enter your Google partner page domain name.

Step 4: Create the Private and Public Keys for Moodle and Google Apps

Open up Terminal and enter in the following two strings:

  • openssl genrsa -out rsaprivkey.pem 1024
  • openssl req -new -x509 -key rsaprivkey.pem -out rsacert.pem

The first command creates the private key that is stored only on Moodle and the second command creates the public key that is stored on both Moodle and Google Apps.

Step 5:

Step 6:

  • In a new window open Google Apps Control Panel page as admin (
  • Click the Advanced tools tab.
  • Click the Set up single sign-on (SSO) link next to Authentication.
  • First check the Enable Single Sign-on box.
  • Now insert this url into the Sign-in page URL text field.
  • Insert this url into the Sign-out page URL text field.
  • Insert this url into the Change password URL text field.
  • Upload the Verification certificate to Google (X.509 certificate containing the public key). This is the rsacert.pem file that you uploaded to Moodle already.

Step 7:

  • Click the User Accounts tab in Google Apps.
  • 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 the number of accounts you plan on creating. Request more accounts if you need them by clicking the “request more” link on this page.
  • Click the Settings link. Check the box to Enable provisioning API (otherwise users will NOT be updated).
  • Click Save Changes.
  • Click on Advanced tools in Google Apps one more time
  • Click on “Manage OAuth Access”
  • Upload your (X.509 certificate containing the public key) here too. This is the rsacert.pem file that you uploaded to Moodle already.
  • Then copy to your clipboard (Control+C/Apple+C) the OAuth consumer secret

Step 8 (in order to get Gmail to fully talk with Moodle):

  • Enable all of the google blocks in your Moodle Instance by logging in as an admin and then adding them to the front page.
  • Open up the blocks admin (under modules) and click on the Gmail block.
  • Paste the OAuth Consumer secret into the field that asks for it.
  • Click Save Changes
  • Click on the Google User Sync block in the blocks admin menu.
  • Fill out your admin information for Google Apps

I think that is pretty much it. Once I did all of those things, I was able to create users in Moodle and have them transfer over to Google Apps. I was able to log into docs, sites, gmail, etc directly from the Google Apps block in Moodle.

As excited as I am that I was actually able to get it to work, I am more excited for the possiblity of stopping the excuses that many people have in either not implimenting a LMS because it doesn’t have a collaborative suite built in or not implimenting Google Apps because it doesn’t work within their LMS. I would like to get to a point where people only are talking about the learning possibilities, not the pitfalls of the technology.

(Also, let me know if I have screwed up in any way on this how-to. I would post it on a wiki for others to make it better, but since I don’t know where the Moodle wikis are, I will wait until someone illuminates me.)

Reblog this post [with Zemanta]

You may also like...

70 Responses

  1. Khalil Amar says:

    Please go to to get the most updated zip file / version of the “Moodle-Google” project. Thanks

  2. Syamil Mj says:

    This is gem. Thank you

  3. Bonnie Thurber says:

    I have been using this for three years now. I want to know which Moodle Group created it.

  4. Bonnie Thurber says:

    Hello Peter, I have sync set up and I add new users to Moodle and then sync with Google every day. I have a cron job set up that does sync every

  5. David Sweigert says:

    Starting this school year (2011-12) my users have been randomly (but more frequent than I would like) getting the attached error.  It states “Password Not Valid” and this is when attempting to log into Moodle.  We are doing LDAP authentication to our PDC and then using the Moodle-Google plugin for SSO.  We are using the first version of the plug in.
    Does anyone think that my issue is my Moodle server (Moodle 1.9.9+ (Build: 20100707)) or should I consider upgrading my plug in or is is Google (did they upgrade something on their end).
    Any thoughts appreciated.

    • Collinsl says:

      I am having similar issues and they began about 5 days ago! I can’t tell if it is Google or Moodle

    • David Sweigert says:

      I posted on the forum today.  Maybe someone will have an idea.  I will let you know if I find anything out.

  6. Alexa says:

    This will integrate Google Apps services with Moodle. The Moodle administrators can manage google Apps accounts within Moodle and all the Moodle users will be able to access gApps services within Moodle.

Leave a Reply