Google Apps integration: Google apps and moodle integration success!

Google Apps integration: Google apps and moodle integration success!

by Ben Wilkoff -
Number of replies: 62
I couldn't find any post on this topic yet, so I thought I would put my own up.

After a lot of work on the Public and Private key generation, I finally got Google Apps and Moodle to talk to one another and it works. I am so happy.

Here were the steps I followed

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.

I blogged these instructions here as well.
Average of ratings: Useful (8)
In reply to Ben Wilkoff

Re: Google Apps integration: Google apps and moodle integration success!

by Talia Carbis -
Hi, two problems I'm having:

1. I'm in moodle, and I go into the google user sync, and when I click on staus this error is displayed:
Google Apps error: Unable to Connect to ssl://www.google.com:443. Error #-34760: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?

How can I fix this?

2. I am believe I've installed everything correctly, but when I log into the moodle (as an administrator) and click notifications, this is all I see:

What am I doing wrong? sad

a
In reply to Talia Carbis

Re: Google Apps integration: Google apps and moodle integration success!

by Talia Carbis -
Problem 2 is now fixed (yay!), but I still have problem 1, with the error. Any ideas?

Google Apps error: Unable to Connect to ssl://www.google.com:443. Error #-34760: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?

In reply to Talia Carbis

Re: Google Apps integration: Google apps and moodle integration success!

by Rony Kohn -
Hi, i´m trying this but for the moment with no luck at all.
Followed the steps in a fresh Moodle 1.9.5 installation (hosted in Hostmonster) just to see it working before installing in our production moodle.

If i´m alreaday logged in GApps it works awesome, i have access to my mail account with no problem but if i´m not logged in GApps (the most common scenario for most users i guess) or the moddle account does not have an e-mail account asociated in Google Apps.

It does nothing, asks for login information when clicking the Gmail link in Moodle and nothing.

When checking this thread saw Ramandeep´s post and thought it may be interesting to try with his suggestion but had no luck.

Then turned debugging on to have a diagnose and here´s the results when entering user name and password after clicking the Gmail icon on the Gmail block.

Notice: Undefined variable: USER in /.../auth/gsaml/auth.php on line 203

Notice: Trying to get property of non-object in /.../auth/gsaml/auth.php on line 203

Warning: Cannot modify header information - headers already sent by (output started at /home1/autonom2/public_html/ac/auth/gsaml/auth.php:203) in /.../lib/moodlelib.php on line 2706

Warning: Cannot modify header information - headers already sent by (output started at /home1/autonom2/public_html/ac/auth/gsaml/auth.php:203) in /.../lib/moodlelib.php on line 2707

Any hints?

Thanks in advance, Rony.
In reply to Ben Wilkoff

Re: Google Apps integration: Google apps and moodle integration success!

by Richard van Iwaarden -
Picture of Particularly helpful Moodlers

This looks great. I do have a few questions though.

1. Does this work if Moodle is set to authenticate using LDAP and not to store any passwords. If a user-account is being created at the Google side, what password does Moodle give it?

2. What happens the first time a user logs into Google (coming from Moodle). Does he need to set a password in Google? How about agreeing to terms and that horrible captcha?

Nevertheless, we are very interested in these developments. Keep up the good work!

In reply to Richard van Iwaarden

Re: Google Apps integration: Google apps and moodle integration success!

by Rusty Meyners -

Yes, it works with LDAP without storing passwords. Moodle does not have to give Google a password, because Google has been setup to trust Moodle to authenticate the user for it, even if the password is different in Google.

Yes, the user has to agree to terms and do the captcha the first time but they don't have to use or maintain a Google password if Moodle has already authenticated them.

Here is a wiki for setup guidance:

http://moodle.eustaceisd.net/mod/wiki/view.php?id=1101&page=Setup+Single+Sign-on+Integration+of+Google+Apps+for+Education+and+Moodle

Now, can anyone confirm whether Google-Moodle can be setup on a Windows based Moodle. I am getting reports that sound like a fundamental conflict in the key/cert file paths.

In reply to Rusty Meyners

Re: Google Apps integration: Google apps and moodle integration success!

by Chris Potter -
Unfortunately, I cannot answer your question, but I can say I'm curious about it running on Windows as well.
In reply to Rusty Meyners

Re: Google Apps integration: Google apps and moodle integration success!

by Rusty Meyners -
I have had it confirmed that Google-Moodle can and will work with Windows based Moodles. It takes extra config.php edits and even some database edits. I don't yet have the details to post yet, as my Moodle is on Linux and the person who confirmed their success on Windows has not had time to pass on the documentation.
In reply to Rusty Meyners

Re: Google Apps integration: Google apps and moodle integration success!

by Ryan Panning -
I have most of the Google-Moodle implementation working, except for the GMail block. There is a bug with the Google-Moodle code which doesn't check for Windows paths but I have submitted a patch which fixes that issue, you can view the bug report/patch here:

http://tracker.moodle.org/browse/CONTRIB-2091
In reply to Rusty Meyners

Re: Google Apps integration: Google apps and moodle integration success!

by James Cluckie -

I've only recently discovered this plug-in and I'm very excited by its prospects. Well done on a fantastic idea.

There is just one idea I want to check on: I understand that the Google calendar integrates with the Moodle one. I presume this is true for multiple courses. This would enable me to use the calendar function as a homework diary i.e. every teacher could enter a deadline when homework is due and it would appear in each pupil's calendar. Is this interpretation correct?

Many thanks

In reply to Rusty Meyners

Re: Google Apps integration: Google apps and moodle integration success!

by mandy honeyman -
Hi Rusty,

I am following my query up with Google as well as here.

I have installed everything following the excellent help files available for this plugin.

Diagnostics gives me:
Trying to init a gdata to google connection
Success
and I get this for one sync'd user - my moodle admin (however this email address is already a docs.google user):
admin Mandy Honeyman (admin) madmkh@gmail.com Tuesday, 17 March 2009, 10:49 AM OK

The rest of my users get this response:
04benolley Ben Olley 04BenOlley@students.lvc.org Never Failed to create Google Apps account

The one thing that I have so far resisted doing is to set up the MX record for email, hoping instead to be able to retain our users on their MS exchange mail server, which arguably gives us more control over things like cyberbullying and tracking user emails.

Anyway, any ideas and advice you could offer would be warmly received.

Thanks.
Mandy
In reply to Ben Wilkoff

Re: Google Apps integration: Google apps and moodle integration success!

by Stacey Walker -
Hi,

Users for one of our Moodles are redirected to use My Moodle when they log in, bypassing the frontpage. When configuring the Gmail and Google Apps blocks it appears that I can only add them to the frontpage and not anywhere further down in Moodle (Courses, Categories or My Moodle etc). This means that our users are never able to see the blocks themselves and therefore cannot use them as we had anticipated.

I have checked all the settings for these two blocks and on the Moodlerooms documentation and can't see anything out of the ordinary or even that would suggest the frontpage is the only place this can be added.

Is there anything that I am missing in order to add them to My Moodle or anywhere other than the frontpage or is this a feature that is not available with this plugin (but hopefully will be very soon).

Thanks in advance
In reply to Stacey Walker

Re: Google Apps integration: Google apps and moodle integration success!

by Matt Campbell -
You will need to have access to the code, and will want to look in the /blocks/ directory on your Moodle install. With the Google Apps block, the folder is called gapps, and inside that you'll find block_gapps.php.

About 30 lines down, you'll find the following function:

function applicable_formats() {
return array('site' => true);
}

Change this to the following to add support for My Moodle:

function applicable_formats() {
return array('site' => true, 'my' => true);
}

You can get more information about how to use the applicable_formats function at http://docs.moodle.org/en/Development:Blocks#Authorized_Personnel_Only.

Thanks,
Matt

In reply to Matt Campbell

Re: Google Apps integration: Google apps and moodle integration success!

by Stacey Walker -
Hi Matt,

Thanks for this, we actually just found it yesterday which is great! Will definitely come in handy for other situations I think.

Cheers for the response,
Stacey
In reply to Stacey Walker

Re: Google Apps integration: Google apps and moodle integration success!

by Stephen Keep -
Hi all,

I have gone through all the settings and when a user logs on it creates the account in google. However, when the user clicks on the inbox i get the error:

SAML Auth Code Failed turn debugging on for more information

Any ideas what this may be?

Thanks
In reply to Stephen Keep

Re: Google Apps integration: Google apps and moodle integration success!

by Derrin Kent -
Hi everyone,
this is a great extension! I'm having trouble getting it to work properly so far though.. I have followed all the instructions in the WIKI and set up the private/public keys, but I get the following behaviour.

1. Users that already exist in google and have the same username as in moodle can jump to their documents etc from the moodle site.
2. new moodle users dont get created in the google apps.
3. when I run the diagnostics, I get the following error..
Trying to init a gdata to google connection
Google Apps error: Unable to Connect to ssl://www.google.com:443. Error #110: Connection timed out
exception 'blocks_gdata_exception' with message 'Google Apps error: Unable to Connect to ssl://www.google.com:443. Error #110: Connection timed out' in /srv/moodle.tdm.info/public/htdocs/blocks/gdata/gapps.php:210
Stack trace:
#0 /srv/moodle.tdm.info/public/htdocs/blocks/gdata/gapps.php(180): blocks_gdata_gapps->gapps_connect()
#1 /srv/moodle.tdm.info/public/htdocs/auth/gsaml/diagnostics.php(130): blocks_gdata_gapps->__construct()
#2 {main}

4. The gmail block says 'sorry could not obtain mail'

Obviously there is a problem connecting to google, but I dont have a clue why...

Any help on this would be very very appreciated!

In reply to Matt Campbell

Re: Google Apps integration: Google apps and moodle integration success!

by Tony Bleything -
I don't have that folder I have the following inside the /blocks folder:
/gdata
/gaccess
/gmail

would this .php file be in one of these instead?
In reply to Tony Bleything

Re: Google Apps integration: Google apps and moodle integration success!

by Colin Matheson -
When you unzip the google.zip you also get an auth folder with a gsaml folder inside. You need the gsaml folder (and its contents) in your auth folder of the moodle install.
In reply to Matt Campbell

Re: Google Apps integration: Google apps and moodle integration success!

by Tony Bleything -
"You will need to have access to the code, and will want to look in the /blocks/ directory on your Moodle install. With the Google Apps block, the folder is called gapps, and inside that you'll find block_gapps.php."


I don't have block_gapps.php. I have the following inside the /blocks folder:
/gdata
/gaccess
/gmail

would this .php file be in one of these instead?
In reply to Tony Bleything

Re: Google Apps integration: Google apps and moodle integration success!

by Colin Matheson -
Oh I see. You are trying to change the code to allow the goodle link block to appear on the MyMoodle page. Yes the code mentioned is in the blocks/gdata folder. However the block doesn't do anything magical, it just provides links to http://mail.google.com/a/yourdomain and http://docs.google.com/a/yourdomain. You can put those links in an html block (or if you get a theme with dropdown menus, add the links there).
In reply to Ben Wilkoff

Re: Google Apps integration: Google apps and moodle integration success!

by Éric Bugnet -
Picture of Documentation writers Picture of Plugin developers Picture of Translators
Hi,

I got one problem using the Auth method.

All work fine ten minutes (can connect, on moodle), and now, when a user connect to moodle, he have a white page on http://mymoodle.org/login/index.php and nothing else.

Nothing writen with error reporting activated...

I think, it's when I begin to use user synch my auth don't work.

And now, I can't use this beautifull tool !

Helllllllpppp meeeeee plz !!!

I follow all instructions...
I have uninstall the files correctly, deleted login/index.php, made a cvs update (create a new one), and reinstall the files and configuration correctly...

Éric
In reply to Éric Bugnet

Re: Google Apps integration: Google apps and moodle integration success!

by Éric Bugnet -
Picture of Documentation writers Picture of Plugin developers Picture of Translators
Hi again,

After a big cleaning, and a reinstall, this block works again...
But, I'm afraid that is SyncBlock wich was making my site going out... so I didn't activate it...

For now :
  • Connection is fine
  • Google Apps block works fine
  • BUT : Gmail block don't show me any mail...
Am I alone in this case ?

Eric
In reply to Ben Wilkoff

Re: Google Apps integration: Google apps and moodle integration success!

by Aisha Abdul Rahman Wells -
Its not working, no SSO link. Its not there sad What did I do wrong?A video would be nice, for us visual people.
In reply to Ben Wilkoff

Re: Google Apps integration: Google apps and moodle integration success!

by Jill Woyak -
I feel like I am SO close on this!

We have Moodle 1.9.3 (on Ubuntu Server) that authenticates to LDAP (Active Directory). I'd like to allow students to log on to their Moodle page with their AD account (which already works), and have SSO to Google Apps, Education Edition. I've followed these directions, but here are the errors I'm encountering.

When an AD user logs in (with full debugging on), I see the following error - exception 'blocks_gdata_exception' with message 'User already exists' .... SAML Auth Code Failed turn debugging on for more information, and a continue button on the bottom. I can click continue and be brought to our main screen, no problem.

Now, if I click on any of the Google Apps, I get this exception message -
Unable to locate metadata for 'google.com/a/<my google Apps domain>' in set 'saml20-sp-remote'.
and the same SAML Auth Code Failed turn debugging on for more information error with the continue button.

It doesn't bring me to Google Apps, just back to Moodle, and none of the users are being created.
The GSAML diagnostics page reports only successes, and in the Google User sync the
status is "Authentication with Google Apps was successful." but all User accounts are listed as Never updated -> Failure to create Google Apps Account.

WHat am I missing here? I feel like it's SO close but I just can't get this last step to work.
Any thoughts/help would be appreciated, and I'd gladly provide any more info you need.

Thanks!
Jill
In reply to Ben Wilkoff

Re: Google Apps integration: Google apps and moodle integration success!

by Sean Cullinan -
I tried these instructions and still get the SAML Auth Code Failed turn debugging on for more information error. See below for the debug information. Any ideas?

Exception Object
(
[message:protected] => Unable to locate metadata for 'google.com/a/somedomain.com' in set 'saml20-sp-remote'.
[string:private] =>
[code:protected] => 0
[file:protected] => /Library/WebServer/Documents/auth/gsaml/samllib/MetaDataStorageHandler.php
[line:protected] => 287
[trace:private] => Array
(
[0] => Array
(
[file] => /Library/WebServer/Documents/auth/gsaml/samllib.php
[line] => 173
[function] => getMetaData
[class] => SimpleSAML_Metadata_MetaDataStorageHandler
[type] => ->
[args] => Array
(
[0] => google.com/a/somedomain.com
[1] => saml20-sp-remote
)

)

[1] => Array
(
[file] => /Library/WebServer/Documents/auth/gsaml/auth.php
[line] => 324
[function] => gsaml_send_auth_response
[args] => Array
(
[0] => ..........................................a very long string..........................................
)

)

[2] => Array
(
[file] => /Library/WebServer/Documents/login/index.php
[line] => 51
[function] => loginpage_hook
[class] => auth_plugin_gsaml
[type] => ->
[args] => Array
(
)

)

)

)

* line 282 of auth/gsaml/samllib.php: call to debugging()
* line 324 of auth/gsaml/auth.php: call to gsaml_send_auth_response()
* line 51 of login/index.php: call to auth_plugin_gsaml->loginpage_hook()

SAML Auth Code Failed turn debugging on for more information
In reply to Sean Cullinan

Re: Google Apps integration: Google apps and moodle integration success!

by Trevor Fidler -
Did anyone ever figure out the cause of the "SAML Auth Code Failed turn debugging on for more information" error?

I'm experiencing this problem with our Moodle/Google environment whilst trying to set up SSO.
In reply to Trevor Fidler

Re: Google Apps integration: Google apps and moodle integration success!

by Jill Woyak -
We had this same problem! In my case, I had to go into Google Apps, Advanced Tools, Setup Single Sign On and UNCHECK the "use a domain specific issuer" box. Depending on how your network is set up, you may need to check it instead of unchecking it, but it might be worth a try! Good luck.
In reply to Jill Woyak

Re: Google Apps integration: Google apps and moodle integration success!

by Trevor Fidler -
Tried this both ways and neither seem to fix it sad

Thanks for the suggestion though.
In reply to Sean Cullinan

Re: Google Apps integration: Google apps and moodle integration success!

by Ramandeep Sandhu -
Hi

Go to file auth/gsaml/metadata/saml20-sp-remote.php
and search for around line number 50....
'google.com' => array(
'AssertionConsumerService' =>


change the 'google.com' to google.com/a/somedomain.com

here somedomain.com will be the name of your domain.

It will work......

In reply to Ramandeep Sandhu

Re: Google Apps integration: Google apps and moodle integration success!

by David Sweigert -

I posted on Mr. Wilkoff's site but I thought I'd add this here as well - straying a little from the discussion but...

Now that I have made the changes, when my users log off our Moodle server they go to a new log off URL (http://ourmoodleserver/login/logout.php?sesskey=fNFykG7nS4 (key# varies)) and it comes up as an error (Internet Explorer cannot display the webpage) unless you refresh the page and then you are out logged out of the Moodle site. Has anyone else seen this? Am I doing something wrong?
And can this BLOCK be placed into a course?  We put it on our front page but of course teachers have already asked if they can embed it into their individual courses.  Thanks in advance.

In reply to David Sweigert

Re: Google Apps integration: Google apps and moodle integration success!

by David Sweigert -

I did some investigation and logging out of Google works fine for me at home, but when at school behind our content filter it fails. On a Macintosh computer it shows the failure logging out at https://mail.google.com/a/wssd.bz/ because we block free email (google mail). The person who is in charge of the content filter was able to do a bypass but it still comes up with a network failure. I assume most other people don’t block gmail?  The filtering workaround is still not acceptable to me, does anyone see this issue too when logging out of Google Apps or Moodle once you have enabled SSO?

In reply to David Sweigert

Re: Google Apps integration: Google apps and moodle integration success!

by David Sweigert -
Above problem solved. Our web content filter was prohibiting access to mail.google.com.
In reply to David Sweigert

Re: Google Apps integration: Google apps and moodle integration success!

by Valery Fremaux -

I all, maybe I can get some help in this thread.

I've configured the whole configuration process with the Google plugins, and setup all SSO reading again and again (and translating in French the whole lang packs for those blocks).

Unfortunaletely I didn't get to the end of the behaviour.

Moodle is authenticated through a remote CAS at the state wide education administration.

When I use a test user as a teacher in Moodle, connecting through CAS, the result I get is as shown. (Translating for convenience : This service is unreachable, as your connection credentials are not yet valid.

(wondering what "not yet" mean).

Google/Moodle diagnostics acknowledges all connection status as accomplished, and this is not an SAML error which is more explicit.

I ran across and accross the Google domaine management console without finding anything.

Could the CAS (without LDAP, as LDAP is not reachable at our administrative center) have some trouble with the Google SSC protocol ?

Other thing bothering me : when I use the local admin session and trying to go to Google, I open the domain administrator session, which IS NOT me !!

Thanks for help !  

Attachment bad_connection_screen_google.jpg
In reply to Valery Fremaux

Re: Google Apps integration: Google apps and moodle integration success!

by Valery Fremaux -

Very last part, is a trailing cookie effect on an open window.

The fact is that NO SSC auth at all is performed, althought the SAML response output by Moodle and locally captured seems indicating Success status and has effective account identity in payload.

I'm seeking other French people who have this same experience degree...

Cheers.

In reply to Valery Fremaux

Re: Google Apps integration: Google apps and moodle integration success!

by Marco Gonzalez -

This may come (ironically) too late to be of help but I came across a "credentials not YET valid" error recently (Moodle 2.0.3).

The cause turned out to be the local time of the server had a slight difference (a few minutes) relative to the user.

Activating an NTP client (Network Time Protocol) on the Moodle Server fixed the problem for me. 

Average of ratings: Useful (1)
In reply to Ben Wilkoff

Re: Google Apps integration: Google apps and moodle integration success!

by Marcus Thimm -

We have almost everything working except one feature: once Google Apps SSO is enabled login to Google Apps only works when login into our Moodle site first, then clicking the Google Apps links. It fails however, when going directly to the Google Apps login pages. like docs.ourdomain.org. We have SSO setup as per direction. The user lands on the Moodle login page, but the process fails with a "Password is not valid error".

We wonder if this is certificate related. Any help?

In reply to Ben Wilkoff

Re: Google Apps integration: Google apps and moodle integration success!

by Sam Norman -
Hi there,

Wonderful block and plugin, however has anybody got any ideas for stopping the guest account from automatically being added to the sync?

We use the guest account for one of our courses which is set to automatically log guests in so can not disable it.

The guest account is not able to access the google apps block (we altered the permissions to hide the block from guests) but the guest account constantly shows up in the sync list even after being removed from the sync.

Thanks in advance for any help.

Cheers,

Sam
In reply to Sam Norman

Re: Google Apps integration: Google apps and moodle integration success!

by Jason Nguyen -

Were able to get it working the other direction?  I'm experiencing the same issue.  Thanks, Jason

In reply to Ben Wilkoff

Auth going the other way?

by vik Rajewski -
Is it possible to get Moodle to authenticate via google apps instead? Seems this plugin does the reverse.
In reply to vik Rajewski

Re: Auth going the other way?

by Balasubramanian Bhaskaran -
We are trying to integrate to our portal. We are running on PHP Version 4. The plugin we downloaded is not working with PHP 4. Does this integrate if we are using PHP 4?
In reply to Ben Wilkoff

Re: Google Apps integration: Google apps and moodle integration success!

by Colin Matheson -
This worked for our site. Thanks again. Here are a few tips from my implementation.

I didn't have terminal access but the Cpanel provided by our host did have the ability to generate private keys (.key files) and public certificates (.crt files). I just copied the text from the cpanel screen including -----BEGIN RSA PRIVATE KEY----- and -----END RSA PRIVATE KEY----- and saved that as a text file called rsaprivkey.pem and then copied -----BEGIN CERTIFICATE----- up to and including -----END CERTIFICATE---- and saved that as a text file called rsacert.pem

I also discovered not to add users to the sync block. Just login as a test user and click the gmail or docs link. This will create the user in GAPPS (as long as Provisioning API is turned on!) and add that username to the sync block. If you manually add the user in the block first it blocks the user creation, so only use this if the students already have accounts on your GAPPS site.


In reply to Ben Wilkoff

Re: Google Apps integration: Google apps and moodle integration success!

by Tony Bleything -
I'm stuck on step five and six. In Step Five, I don't know how to 'upload' the things that were generated...

Step six: I don't have any of the options mentioned in the directions. Under advanced tools, I only see 'create multiple users', 'API references', 'Google Apps desktop features', and 'user email uploads'. There are no checkboxes to be found
In reply to Tony Bleything

Re: Google Apps integration: Google apps and moodle integration success!

by Colin Matheson -
How to upload: When I installed the Google plugin on Moodle I got a new Google option under Users->Authentication->Manage Authentication. I clicked the eyeball to activate it and then clicked the settings. On the settings page there is a link Upload next to the key and the certificate. (I had to copy the text from the key generated on my host's server and paste it into a text file which I saved and uploaded).

Step six: Maybe turn on the provision API first....
SSO should be an option with the Education and Premiere editions of Google Apps (do you have the education edition? http://www.google.com/support/a/bin/answer.py?hl=en&answer=60757
In reply to Colin Matheson

Re: Google Apps integration: Google apps and moodle integration success!

by Tony Bleything -
I realized I had the standard edition and am waiting to be approved for the education edition. I am hoping that this will be the reason I can't do that yet.

I did figure out the upload too...thanks.
In reply to Ben Wilkoff

Re: Google Apps integration: Google apps and moodle integration success!

by Adam Watkins -

Hi,

Installed on windows server 2003... Is there anywhere to specify a proxy server?  All traffic on our network is forced through a proxy device.  Without specifying a proxy, I cannot get this to work.

Thanks very much.

Adam

In reply to Adam Watkins

Re: Google Apps integration: Google apps and moodle integration success!

by reg phenna -

I'm in the same position as you adam. I have my moodle installed on a linux box but all our internet goes through a proxy.

Has anyone managed to do this?

In reply to reg phenna

Re: Google Apps integration: Google apps and moodle integration success!

by Jonathan Harker -

Ah - that sounds plausibly like a curl call that is not respecting the Moodle proxy set up. I'll have a look into this!

EDIT: Ah - my bad, I thought you were talking about our Moodle 2.0 port.

In reply to Jonathan Harker

Re: Google Apps integration: Google apps and moodle integration success!

by reg phenna -

I'm all ears even for the moodle 2.0 version?

I could always look through for the equivalent files in 1.9?

In reply to reg phenna

Re: Google Apps integration: Google apps and moodle integration success!

by John Sig aucun -

Hi !

I try to instal google Apps in moodle and i would like to follow the instructions in step 3 but when i go to the site i have this message : 

This course is currently unavailable to students.

Do you know how open this ? 

thanks for response. 

In reply to Ben Wilkoff

Re: Google Apps integration: Google apps and moodle integration success!

by Yogesh Nahar -

I am close to completing this integration but am having a hard time debugging a few issues.

I have everything installed and enabled. I am not using user sync. When I try to login on Moodle, I get a blank page. With these error messages:

Warning: require_once(Zend/Http/Client.php) [function.require-once]: failed to open stream: No such file or directory in D:\xampp\htdocs\ed\blocks\gdata\http.php on line 36

Fatal error: require_once() [function.require]: Failed opening required 'Zend/Http/Client.php' (include_path='D:\xampp\htdocs\ed/lib/pear;.;D:\xampp\php\pear\;D:\xampp\htdocs\ed/lib/zend') in D:\xampp\htdocs\ed\blocks\gdata\http.php on line 36

I am running a test environment on Server 2003 with XAMPP (PHP 5.2.8, MySQL 5.1.30 and Moodle v1.9.8). I looked at Moodle Guy's instructions on the changes to be made for a windows environment here, but still I have no luck with the Google authentication.

Please advice on what I might be missing here. Thank you.

Yogi

In reply to Ben Wilkoff

Google to Moodle Integration

by Miguel Guhlin -

Not sure if this is the right place for it, but...

A question about Google-Moodle Integration...

I have School A, who has Google accounts.
School A people want to connect to Moodle and use Single Sign On. That is, they login to the Moodle using their Google username and password.
Is that possible?
Another way to put it: Google users already exist and i want Moodle to check Google, as if it were LDAP Authentication, before creating the user in Moodle.
With appreciation,

Miguel Guhlin
 
 
 
 
 
In reply to Ben Wilkoff

Re: Google apps and moodle integration success!- 2.1?

by sue sugizaki -

Hi!

Just wondering if this works for 2.1.

BR, Sue

In reply to sue sugizaki

Re: Google apps and moodle integration success!- 2.1?

by Rob Johnson -

There is a thread in this forum that links to the Moodle 2 version.  I have been using it with 2.1 since August.

In reply to Rob Johnson

Re: Google apps and moodle integration success!- 2.1?

by sue sugizaki -

Hi!

Q: did you use the plugin mentioned at the top of this forum?

In reply to sue sugizaki

Re: Google apps and moodle integration success!- 2.1?

by Rob Johnson -

That is the first release for 1.9.  It has been updated a few times at development.moodlerooms.com.  The 1.9 code will not work with Moodle 2+.  The code I use is here.  It is referenced in this thread.

In reply to Rob Johnson

Re: Google apps and moodle integration success!- 2.1?

by sue sugizaki -

Thank you for your quick reply.

>That is the first release for 1.9

Yupp, I'm testing things on my testmoodles and I've totally forgotten that I installed it on 1.9 early this year...

>The code I use is here.

I'll check it out tomorrow!

In reply to Ben Wilkoff

Re: Google Apps integration: Google apps and moodle integration success!

by Siddharth Patel -

Greetings,

I tried to get the package and followed the installation process, but could not get it done.

When I got the folder in the auth directory, I am having the following error:

helpbutton() has been deprecated. Please change your code to use $OUTPUT->help_icon().
  • line 2985 of \lib\deprecatedlib.php: call to debugging()
  • line 69 of \auth\gsaml\settings.php: call to helpbutton()
  • line 81 of \admin\settings\plugins.php: call to include()
  • line 5573 of \lib\adminlib.php: call to require()
  • line 2674 of \lib\navigationlib.php: call to admin_get_root()
  • line 2584 of \lib\navigationlib.php: call to settings_navigation->load_administration_settings()
  • line 583 of \lib\pagelib.php: call to settings_navigation->initialise()
  • line 599 of \lib\pagelib.php: call to moodle_page->magic_get_settingsnav()
  • line 134 of \blocks\settings\block_settings.php: call to moodle_page->__get()
  • line 279 of \blocks\moodleblock.class.php: call to block_settings->get_content()
  • line 232 of \blocks\moodleblock.class.php: call to block_base->formatted_contents()
  • line 882 of \lib\blocklib.php: call to block_base->get_content_for_output()
  • line 934 of \lib\blocklib.php: call to block_manager->create_block_contents()
  • line 342 of \lib\blocklib.php: call to block_manager->ensure_content_created()
  • line 3 of \theme\base\layout\frontpage.php: call to block_manager->region_has_content()
  • line 639 of \lib\outputrenderers.php: call to include()
  • line 597 of \lib\outputrenderers.php: call to core_renderer->render_page_layout()
  • line ? of unknownfile: call to core_renderer->header()
  • line 1200 of \lib\setuplib.php: call to call_user_func_array()
  • line 89 of \index.php: call to bootstrap_renderer->__call()
  • line 89 of \index.php: call to bootstrap_renderer->header()


Fatal error: Call to undefined method admin_setting::admin_setting() in D:\xampp\htdocs\moodle20\auth\gsaml\admin_upload.php on line 65


I am having this error for all the versions 2.3.1, 2.2.3 as well as 2.0

Regards..
Sid

In reply to Ben Wilkoff

Re: Google Apps integration: Google apps and moodle integration success!

by Ola Akintunde -

I uploaded the extracted google.zip contents to my moodle 2.4 installation folder and the whole site went blank. (Displays nothing). I had to delete the uploaded folders to have my site back to normal.

Still urgently need the Google Apps - Moodle Integration. Any help for moodle 2.4 pls?

In reply to Ben Wilkoff

Re: Google Apps integration: Google apps and moodle integration success!

by Jason Touw -

I was just reading this thread and it has been quite some time since there has been a post.  I am curious if anyone is using Google Apps as a means to login to Moodle 3.x?

In reply to Jason Touw

Re: Google Apps integration: Google apps and moodle integration success!

by Ken Task -
Picture of Particularly helpful Moodlers

Wow!  Resurrected a thread that began in 2009.   But, there have been advances NOT mentioned in this thread ... and that's why am responding.

Might want to visit https://moodle.org/mod/forum/view.php?id=8273 from here on out.

Yes ...

http://sos.tcea.org/moodle31/

Above link  not using an ISD Google Domain but if restricted to a Google domain wouldn't allow just anyone with Google credentials in.  The above does for purposes of demo/tinkering.

Do have an ISD that has gone Google/Chrombook and their Moodle uses a plugin to authenticate via their ISD Google Domain.   Nothing special about the plugin.

https://moodle.org/plugins/auth_googleoauth2

There only two catch 22's ...

* when logging out of Moodle, one is not logged out of Google.  Think the maker of the plugin is gonna work on that.

* the time to get students into the Moodle using Google credentials is from the get go.  If one had been using LDAP or Manual those are one account.   Using the above method of authentication would create yet another account for the student, which looks like the old LDAP/Manual, but isn't.  Thus all students now using Google Auth  would have to be placed in courses or sign up for them again.   If students have already turned in papers checked by TurnItIn or something like that Google account/Moodle doesn't know about it and don't think there is a way to merge accounts .... LDAP -> Google Auth.

'spirit of sharing', Ken