The Killer App: Google Apps and Moodle Integration?

Moodle
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 (http://google.com/a/yourdomain.com)
  • 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.
    http://YourMoodleDirectory/login/index.php
  • Insert this url into the Sign-out page URL text field.
    http://YourMoodleDirectory/login/logout.php
  • Insert this url into the Change password URL text field.
    http://YourMoodleDirectory/login/change_password.php
  • 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]

69 thoughts on “The Killer App: Google Apps and Moodle Integration?”

    1. I am not sure. I am interested in trying it out on 2.0, but none of my
      Moodles are ready to go there yet. Perhaps later this year I will try it
      out. Let me know if you try it out and find out one way or another.

  1. 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

  2. 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.

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

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

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>