Google Apps integration: Moodle 2.0 & Google Apps

Google Apps integration: Moodle 2.0 & Google Apps

by Melissa Benson -
Number of replies: 51
Has anyone tested the Moodle-GoogleApps SSO integration plugin with Moodle 2.0? Success?
Average of ratings: -
In reply to Melissa Benson

Re: Google Apps integration: Moodle 2.0 & Google Apps

by John Patten -
I would second this request? What is the status of that plugin in Moodle 2.0. We recently installed the the latest version for the start of the school year, 1.99, but were hoping that 2.0 would have come out earlier. We are implementing Google Docs too and I'd like to integrate with our existing Moodle. However, If 2.0 is going to be an easy migration from 1.99 and Docs works well, I can wait as opposed to investing time in older integration plug-ins.
In reply to Melissa Benson

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Fiona Dix -
Yes. I've tried - and failed. I'm just starting off with Moodle so once I had the Google Apps SSO and 1.99 working well, I tried upgrading to 2.0, but the plugin appears to be incompatible with it.

The three google-moodle blocks were actually deleted by the upgrade process (I upgraded using CVS), so it must have detected an incompatibility. Moodle 2.0 also puts its own version of the zend library in lib, including some additional files (maybe a more up to date version?).

I did try putting the 3 blocks back to see what happened, but with them in place I was just getting a blank screen for any page I tried to load. I didn't have time then to look at any debugging, so for the time being I've reverted to 1.99.

It would be great to know if anyone is currently working on upgrading the plugin for Moodle 2.0.

Fiona
In reply to Fiona Dix

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Barbara Peskin -
Hi,
Do either/any of you know if I can embed a Google Earth Tour .kmz file to play within Moodle?

Thanks,
Barbara
In reply to Barbara Peskin

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Hi Barbara
I saw your post about this the other day and I meant to check it out - I haven't done this but I will give it a try later on this afternoon and get back to you.smile Don't your students need to have google earth installed to be able to view it? (I haven't read any of the instructions yet!)
In reply to Mary Cooch

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Barbara Peskin -
Thank you so much for checking it out.

Yes, I think they do need Google Earth - but they have it.. I could get them to the tour with a URL or other link, but if I could embed the .kmz file it would be great - I'm guessing it's possible - maybe it's not?

(For now I've made a .mov file of the .kmz file and do it that way but then they aren't live in Google Earth.)


In reply to Barbara Peskin

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
I did try but when I followed the instructions and uploaded and pasted in the URL of my kmz file it kept saying "error loading" and I could never get any further than that sad
Personally I have done similar to you with flythroughs -making them as wmvs and converted to flv and then they embed nicely and you have control of them with the player button. They aren't in Google Earth though true, but then with a movie file they don't need to rely on having GE and they can't be distracted to wander into another part of world (or solar system) - which can be an issue when embedding google maps for instance
In reply to Fiona Dix

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Eric Smith -
Has anyone explored SAML integration with google apps and the Shibolleth auth module in Moodle 2.0?
In reply to Fiona Dix

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Chris Stones -

Yes a 2.0 version is in progress.

In reply to Chris Stones

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Melissa Benson -

Great to hear, Chris. Is there a road map to follow or what would be the best place to see progress or announcements? Thanks!

In reply to Melissa Benson

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Rob Johnson -

A possible stop-gop solution would be to network a Moodle 1.9.X site with a 2.0 site.  The 1.9 installation would serve to provide access to GApps and 2.0 could hold courses.  I do not plan to upgrade until next summer, but if the integration for 2.0 is not ready by then, networking is what we will be doing.

Rob

In reply to Chris Stones

Re: Google Apps integration: Moodle 2.0 & Google Apps

by mandy honeyman -

Great to hear this Chris.

Any idea of a date so that I can plan my site going into production with 2.0?

cheers

Mandy

In reply to Chris Stones

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Ahmad Arshad -

Hey There...

Is there any update on this plugin... btw... its a great piece of code which worked flawlessly in 1.9.9

Thanks

In reply to Ahmad Arshad

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Dominic Bond -

I second that! Any timelines available yet? Just awaiting the Google Apps SSO so we can migrate over to Moodle 2.0.

In reply to Melissa Benson

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Jonathan Harker -

Hi all,

Thanks to funding from the New Zealand Ministry of Education, Peter Bulmer and I at Catalyst have ported the Moodlerooms 1.9 integration work over to work in Moodle 2.0 - the relevant git branch is available here: http://git.catalyst.net.nz/gw?p=moodle-r2.git;a=shortlog;h=refs/heads/feature-20-googleapps

In reply to Jonathan Harker

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Eric Smith -

For those looking to test this out, you can go to the git branch and download the snapshot. This is a snapshot of the full moodle 2.01 install with the new Google Apps plug-ins pre-installed. I uploaded this to my server for a test today, dumped our existing 1.9.10 database (a few hundred megs) to a new test DB, copied our moodle_data directory, moved our existing config.php file over, made changes to the config.php (specifically pointing to the test DB file and the copied moodle_data directory) and fired it up. So far, so good. While I'm still a few months away from moving us to Moodle 2, this is really what I've been waiting for to even begin full-scale testing.

Thanks to Jonathan, Peter, and of course the NZ Ministry of Ed! Awesome job guys!

In reply to Eric Smith

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Daniel Wagner -

Eric:

If we already have 2.01 installed, can we install the snapshot download w/Google Apps over our existing intallation or will that cause problems?  Also, do you know how to configure/install the SSO for this separately?

Many thanks!

In reply to Daniel Wagner

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Ahmad Arshad -

same question... we already have an install

In reply to Daniel Wagner

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Ahmad Arshad -

same question... we already have an install

In reply to Ahmad Arshad

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Jonathan Harker -

Hi, If you already have an install, you should be safe grabbing the zip snapshot from the top commit of our branch here: http://git.catalyst.net.nz/gw?p=moodle-r2.git;a=shortlog;h=refs/heads/feature-20-googleapps (which is based on top of MOODLE_201_RELEASE) and copying into your Moodle installation the following:

  • auth/gsaml
  • blocks/gaccess
  • blocks/gdata
  • blocks/gmail
  • lib/zend/Zend/Validate/Hostname/At.php
  • lib/zend/Zend/Validate/Hostname/Ch.php
  • lib/zend/Zend/Validate/Hostname/De.php
  • lib/zend/Zend/Validate/Hostname/Fi.php
  • lib/zend/Zend/Validate/Hostname/Hu.php
  • lib/zend/Zend/Validate/Hostname/Interface.php
  • lib/zend/Zend/Validate/Hostname/Li.php
  • lib/zend/Zend/Validate/Hostname/No.php
  • lib/zend/Zend/Validate/Hostname/Se.php

Hope that helps smile

Average of ratings: Useful (1)
In reply to Jonathan Harker

Re: Google Apps integration: Moodle 2.0 & Google Apps

by oscar suarez -

Hi Jonathan, do you know if there is like an official upgrade for the integration sistem, I tried uploading the file you said but I couldn't figure it out, a year ago I was working with Moodle 1.9 and it worked perfect, but then I had to erase everything and know I cant even remember what I have to do to install it in the new Moodle. 

In reply to Daniel Wagner

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Eric Smith -

I'd recommend against it. If you're just using the stock 2.01 you could just upload the new snapshot, rename your old moodle directory to moodleold, name the new 2.01 snapshot directory to moodle (or whatever your moodle directory is named) and things SHOULD just work.

BACKUP your database and moodle_data directory first in case something goes screwy. You can always change back by just renaming your directories.

In reply to Eric Smith

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Eric Smith -

One more thing. As I was updating from a 1.9.10+ install to the 2.0.1 I had to temporarily remove the Gmail block from the new install until all the DB upgrading was done. (As well as flush the server's PHP cache). After the upgrade to 2.0.1 was complete I just put the block back where it belonged and ran moodle/admin/notifications again to finish the upgrade. For some reason it refused to do the DB upgrade unless I did it in that order.

In reply to Eric Smith

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Dave Perry -
Picture of Testers

I can't figure out how to just get the module files from the git thing. i.e. just the auth/ and blocks/ folders on there own?

In reply to Dave Perry

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Dave Perry -
Picture of Testers

OK I managed to just extract the folders noted, but the gmail one causes an error:

Plugin "mod_js" is defective or outdated, can not continue, sorry.

And this was using the most recent snapshot (March 2011).

 

Thanks,
Dave

In reply to Jonathan Harker

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Daniel Wagner -

I have almost everything working except that my Google Users Sync block doesn't show up when I want to add the block under the admin account?  Any suggestions?

In reply to Daniel Wagner

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Ahmad Arshad -

i dont see it either... When i go to install/blocks/gdata and try to use Add users to sync... I get a blank page... Not sure whats up...

It wouldve been much easier if someone would have updated the code on http://code.google.com/p/moodle-google/

As such, none of my users are getting synced

In reply to Jonathan Harker

Re: Google Apps integration: Moodle 2.0 & Google Apps

by mandy honeyman -

Hi Jonathan,

Is there somewhere where we can discuss additional functionality for the google/moodle app?

For example, I have two domains attached to our google account, however I cannot see how it would be possible to manage these using the moodlerooms api.

cheers

Mandy

In reply to mandy honeyman

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Ahmad Arshad -

Mandy , google sync block working for you?

In reply to mandy honeyman

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Jonathan Harker -

Hi Mandy,

I'm hoping to hear back from Moodle Rooms soon regarding our Moodle 2.0 port of their 1.9 Google Apps integration. In the meantime, depending where in the world you are, you may be able to get the Moodle Partner in your area to build the functionality you require on top of the work done so far. It sounds like a potentially complex bit of work, but nothing's impossible!

In reply to Jonathan Harker

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Jean-Baptiste BOUGNET -

Hi Jonathan,

I've been through the process of implementing google apps integration. Twice.

I've just install Moodle 2.03+ and integrate blocks, gsaml and zend lib from you're last commit.

I encounter difficulties to make it works. Sometimes, it works, sometimes it doesn't, I can't find out why.

Status is "Authentication with Google Apps was successful."

Sometimes synchronisation takes a while, sometimes it works straigth away after creating new account.

Sometimes I got access to google apps from moodle, sometimes not.

Lastly I got this message when trying to get access to google mail, calendar or docs from within moodle :

"SAML Auth Code Failed turn debugging on for more information

Warning: openssl_sign(): supplied key param cannot be coerced into a private key in /var/www/moodle/auth/gsaml/samllib/xmlseclibs.php on line 450"

Is there something wrong with my key ? or with my server  (ssl) ?

Can you give me any advice ?

thanks for the help.

Jean-Baptiste

In reply to Jean-Baptiste BOUGNET

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Jean-Baptiste BOUGNET -

Hi,

It's working again. But not totaly. I re-enter different public and private keys and now I can access to google apps from within Moodle. If I disconnect myself from google apps, It also disconnect me from Moodle : OK.

But when I disconnect myself from within Moodle, it doesn't disconnect me from google apps. And if I'm reconnecting with username2 within Moodle, and click on gmail blocks, I'm still connected to google apps with the username1.

What did I did wrong ? Any thought ?

Thanks for the help.

Jean-Baptiste

PS : the gmail block give me access to 2 function only : Inbox and Compose. Is that correct, I've expected unread messages and name.

Attachment gmail block.jpg
In reply to Jean-Baptiste BOUGNET

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Jean-Baptiste BOUGNET -

Hi,

One of my problem is solved : SSO is working fine (the moodle server was 2 minutes late, I have to set up an NTP client) and Gmail block is also working fine now.

When I log out from google apps, it also ask me to log out from Moodle. But, still, when I log out from moodle, I'm not logged out from google apps. Witch is a problem, since students use public access PC.

Anyone encountered the same problem ?

Thanks for the help,

Jean-Baptiste

In reply to Jean-Baptiste BOUGNET

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Richard Kassissieh -

Yes, my site behaves that way, too.

Also, redirect does not work for me if I start the login process at Google Apps.

In reply to Richard Kassissieh

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Jean-Baptiste BOUGNET -

Hi,

I find a piece of code that is involve in logging out of Google Apps from Moodle. The code goes from line 262 to 278 in /mymoodle/auth/gsaml/auth.php :

I encounter 2  problems :

  1. first the log out page of gmail has changed. So, on line 277, I substitute

redirect('https://mail.google.com/a/'.$this->config->domainname.'/?logout');

 with

redirect('https://mail.google.com/mail/?logout');

2. line 267 to 272 were preventing Moodle from loggin out of Google Apps, so I withdraw theses lines. But now, when loggin out from my moodle site while not log in Google Apps leads to an anormal behavior : the browser stop on the log out page of gmail not redirecting to my moodle site.

Sorry for my poor english,

Regards,

Jean-Baptiste

In reply to Jean-Baptiste BOUGNET

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Richard Kassissieh -

Jean-Baptiste,

Many thanks for your post, which solved our logout issue. We don't have GMail or the Google block enabled, so changing the redirect and commenting out the block code solved it.

I don't understand the problem you describe. If Google-Moodle SSO is properly enabled, then logging out of Google should log the user out of Moodle as well, so the user should never be in a state where he is logged into Moodle but not logged into Google.

Richard

In reply to Richard Kassissieh

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Jean-Baptiste BOUGNET -

Hi Richard,

The behavior of my installation : till my student didn't click on Gmail block or Google block, they are not log in google apps, only in Moodle. If they didn't loggin Google Apps, when they log out of Moodle, the browser stop on the gmail loggin page (I would I have prefered the loggin page of Moodle, but that's not a big issue, just an ergonomic issue).

My question : If you don't have Gmail and Google block, how you're student accessed to Gmail ? How are they loggin to Google Apps ?

Thanks for your feedback,

Jean-Baptiste

In reply to Jean-Baptiste BOUGNET

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Richard Kassissieh -

The GMail service is disabled for our users at Google. I also did not install the GMail Moodle block. Since we have configured Google SSO to look to our Moodle installation for authentication, Google redirects users to Moodle via a SAML request when they go to a Google app. If the user is already logged into Moodle, then this all happens very quickly. The user can see the URLs change in the address bar, but they get to Google Docs very quickly. If the user is not yet logged into Moodle, then Moodle presents them with the Moodle login page.

In other words:

Google Docs -> Moodle SAML request -> Moodle login page -> Moodle SAML response -> Docs home

In reply to Jean-Baptiste BOUGNET

Re: Google Apps integration: Moodle 2.0 & Google Apps

by oscar suarez -

Hi Jean-Baptiste,  did you find any solution of your problem, that also happens to me : "the browser stop on the log out page of gmail not redirecting to my moodle site." I dont know what to do and is making me crazy! heheee..

In reply to oscar suarez

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Jean-Baptiste BOUGNET -

Hi Oscar,

I'm sorry to tell you I didn't find time to search for a solution.

When I have a little time, I will search a solution, so that any users  should be login google apps when login Moodle (the way authentication seems to work in Richard's environment).

Regards,

Jean-Baptiste

In reply to Jean-Baptiste BOUGNET

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Aaron Saxton -

Jean-Baptiste,

Did you find a solution to this problem? I've tried a few things but not had any luck.

Aaron

In reply to Aaron Saxton

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Jean-Baptiste BOUGNET -

Sorry but I didn't find any solution to this problem.

The problem is : moodle shouldn't try to log out from google till your users are not authenticated in google.

So you need programming knowledge to modify a bit of code :

- to retain 1 information (authenticate or not in google)

- put an alternative path directly to the moodle log out page when not log in google

But I don't know how.

Regard's,

Jean-Baptiste

In reply to Jean-Baptiste BOUGNET

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Aaron Saxton -

Thanks for getting back to me Jean-Baptiste.

Like yourself I understand the problem but don't have the programming knowledge to rectify the issue. If I work it out I'll let you know.

Regards,

Aaron

In reply to oscar suarez

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Aaron Saxton -

Hi Oscar,

Did you manage to find a solution to this problem? It's also driving me crazy.

In reply to Melissa Benson

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Eric Close -

Hi, Is there any update if this is working with 2.2.1?

Thanks.

In reply to Eric Close

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Dr Tech -

Can't get user sync to work either.. Diagnostics don't return any error..

 

Working with Moodle 2.2.1

In reply to Eric Close

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Dr Tech -

running the gdata/cron.php i get these errors..

no idea how to fix this... any ideas?

 

Error message:

Starting Moodle to Google Apps synchronization Error(1402): Error 1402: InvalidPassword Invalid Input: "not cached"

 

Google Apps error: The server encountered the following errors processing the request:

 

Error 1402: InvalidPassword Invalid Input: "not cached"Debugging Traceback (to hide, turn off debugging):

line 225 of blocks/gdata/gapps.php: call to blocks_gdata_gapps->gapps_create_user()

line 641 of blocks/gdata/gapps.php: call to blocks_gdata_gapps->create_user()

line 52 of blocks/gdata/rest.php: call to blocks_gdata_gapps->sync_moodle_user_to_gapps() Debugging Traceback (to hide, turn off debugging):

line 641 of blocks/gdata/gapps.php: call to blocks_gdata_gapps->create_user()

line 52 of blocks/gdata/rest.php: call to blocks_gdata_gapps->sync_moodle_user_to_gapps()

Number of Google Apps accounts deleted: 0

Number of Google Apps accounts created: 0

Number of Google Apps accounts updated: 0

Number of errors: 1

End Moodle to Google Apps synchronization Execution took 2.588499 seconds

 

In reply to Dr Tech

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Dr Tech -

This has been fixed once i realised that the password for the users i was trying to sync were less than 8 characters long - which is the minimum number of password characters allowed by Google!

In reply to Melissa Benson

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Killian Holmes -

I've managed this in with Moodle 2.2.1, cPanel and MySQL. The instructions are rather long and I've gathered the necessary files together. The zip is bigger than the 100kb limit here so they are on my blog - http://curvelearning.ie/wp

In reply to Killian Holmes

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Rob Johnson -

Hi Killian,

How is your code different from the code released by Catalyst?  I have problems with the user sync using that version.  Is user sync working for you?

Thanks,

Rob

In reply to Rob Johnson

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Killian Holmes -

Rob

This isn't my code! A guy called Piers Harding at http://www.moodleinschools.org.nz/ should get the credit.

I don't know what the difference is but I downloaded the version of Moodle from them and then uploaded the relevant files to my server.

User sync works for me. I had to play with the settings in Google Apps a little.

Killian

In reply to Melissa Benson

Re: Google Apps integration: Moodle 2.0 & Google Apps

by Jonathan Harker -

Hi all, there is now substantially overhauled code for Google based authentication, SSO and Apps available that was done for the NZ Moodle in Schools project - see the release notes for more information.

Note that the codebase for 2.2 and up is based on Pier's work on Github and is separate from the codebase for 2.0 and 2.1

Cheers, Jonathan