Drupal's "Moodle" block first offers a link "Sign-on to Moodle" to users logged into Drupal but haven't switched to Moodle so far.
I found a bug.. when i login in drupal then i can login to moodle, the if i logout in moodle, i still login in drupal, and the link still say switch to moodle... when i click, the new moodle window open, but go to the moodle login form.
Somethings would be great.. when i logout in one place should be logged out in both sites (drupal and moodle)
Don't pass the password from ldap in plain text ... maybe a new authentication method in moodle...
For the job until now congrats rob
Glad it's working for you, too .-)
Do you know how to hook the logout action un drupal? I think one solution can be there.. for instance when i call the drupal logout function we can send an ajax request to the moodle/logout.php and then go on with the drupal logout.. What do you think?
I'm searching how to do that in the template.php file of the theme... if you can help with some info that you know it would be great
In moodle i must find the current sessionkey or i will asked to confirm if i really want logout... next task... find that moodle sessionkey in the drupal
v0.4 (2009-02-22) + Progress bar is now dynamically and in "Drupal style" + The block can optionally also display a link to Drupal's Forums. Useful to only offer the "Forums" link to authenticated users.
Drupal is in: http://mydomain.com
and Moodle is in: http://subdomain.mydomain.com
does your code still applies to this? or only to directories within the same domain..??
if so, how could I config the URL at the file "Moodle Block.php" since it is asking for a slash at the begining and at the end
# URL to Moodle's home directory:
# Must begin and end with a slash (/)!
$moodle_url = 'http://subdomain.mydomain.com/';
I have this same exact need! This module would be TERRIFIC if it went from Moodle to Drupal instead of the other way around.
I have done the same as you told but for me it is not working.When i click on the link in Drupal,the moodle site is asking to login,
Please Help me i have spen so many hours on this.
I am using moodle 1.9 version and please find my LDAP Settings for Moodle
Please Help me in this.
Thanks in Advance
Instead of having a new browser window, can I incorporate Moodle into my Drupal node?
I think I could do this with an iframe, but want to avoid this.
Will Panels do this in Drupal?
v0.5 (2009-02-25) + The "drupal2moodle.php" page ensures to always fetch fresh content from the server + If SSO capability has been detected, the Moodle block will always offer the "Sign-on to Moodle" link to logged-in Drupal users when a page is loaded. This ensures to always load the Moodle window as logged-in Moodle user, regardless of Moodle's actual login status or present cookies. + Text addedd to the progress bar + ReadMe file ("ReadMe.txt") enhanced.
@Quinn: No, Drupal and Moodle do not use the same users SQL table. The user data are stored on the LDAP server and automatically synchronized to and from both Drupal and Moodle.
@Glenn: I also dislike iframes and will not write or use code that makes use of them. At the moment, both Drupal and Moodle operate in their own windows.
Thanks. The project I am working on currently uses Drupal 5.x. I assume that it's safe to assume that your module doesn't work with Drupal 5?
If not, are you planning a port back to 5.x?
If not I'm stuck with iframes I think? A friend suggested I look at sessions, I think this is what your module is using?
I'm pretty new to Drupal, very new to Moodle, and have basic knowledge of PHP coding. Are you able to point me at something that I can use to avoid the iframes?
Thanks for any help.
v6.x-0.6 (2009-03-11) + Since Miglius has committed the patch to fix http://drupal.org/node/380956, it no longer must be applied to the "LDAP integration" module. The ReadMe has been updated to reflect the new required version of ldap_integration. + Forums stuff that was introduced in v6.x-0.4 has been removed. The Forums link should better go to the Navigation menu block which may be configured to only be shown to the "authenticated user" role.
I've followed your instructions to install but it doesn't seem to be working. I do not see the status bar and it brings me to the login page as a non logged in user.
Instructions seemed pretty simple so not sure what I could have missed. Any ideas?
Thank you and the others who are contributing to this thread for their work! My site administrator asked me to do some research about using Drupal and Moodle. I am a real newbie in the area of SSO and not a developer!
Any chance you could add the current version up in the Modules and Plugin database? I will try to update the MoodleDocs Integrations page as part of my contribution as I try to blindly test things by rote. I do have editing rights in M&P but limit myself to cross linking and minor verbage tweaks.
FYI: yesterday I created an 1.7.1 XAMPP site on my desktop for testing with Drupal 6 and Moodle 1.9.5 (May). Never used Drupal before, so there is another learning curve. So I think I am sort of ready to try some focused projects like SSO.
Best to all Chris
I've used all you instructions with switch_to_moodle-6.x-0.6 but Drupal doesn't pass the password to Moodle. Which may be the problem?
In ReadMe.txt there is this sentence: 'sharing the same user login data (via LDAP server recommended)'.What should I do?Do I only follow the instruction below this sentence?
Thank you Robert
I have successfully implemented your Drupal-Moodle single sign-on using LDAP and now wonder if your solution will work if and when I switch to Moodle 2.0 when it becomes available? I do think that the code for the Drupal side probably won't change but will there be any changes on the Moodle side?
As I haven't seen Moodle 2.0 I am somewhat worried that simply updating to the new version might break what I already have working.
I've not played with Drupal's LDAP module at all. Does this mean my server needs to be running an LDAP server?
Also, this is currently an SSO process. I want to implement having users pay for a course in Drupal, and they are automatically enrolled in the appropriate Moodle course.
I see a version for 6.x:
I'm about to start installing it now.
Looks like there is a newer module for the integration as posted, the package is much newer than the one attached in this forum.
The problem I am having with the module from drupal (here), when I put that module in /drupal/sites/all/modules and go to enable it on the GUI I get to a blank page and nothing happens.
I am using drupal 6.16, any ideas in why the module won't install?
That seems more like a Drupal related problem. See Blank pages and missing content for a solution.
The first thing I would try is uploading the module again to make sure all files are there and intact.
Have you installed the Moodle Quick API plugin for Moodle?
"Note 2: The integration features included in this module require the Moodle Quick API plugin and Moodle version 1.9.x to function. Drupal policy does not allow it to be stored in Drupal.org's CVS."
I installed the Quick API on Moodle which is 1.9.x. I entered the Moodle address in the module configuration as https://moogle.example.com/ but when I click on the Moodle link I am not getting authenticated. It takes me to the login page of moodle.
Drupal is configured to authenticate to an the same OU Moodle is in active directory, I can login to both system with my ldap account.
I added my computer's IP to the Quick API report in Moodle but It doesn't make a difference.
Could it be a cookie issue?
I have set up this integration with a few modifications.
The script is being loaded in the background (ajax) and is executed the first time the user lands on the Drupal site. All links from Drupal to my Moodle course content are direct since the user is already logged in.
It works perfect when both Drupal and Moodle are inside the same path i.e. mydrupal.com and mydrupal.com/moodle.
The integration has since stopped working after switching to a subdomain setup i.e. my.drupal.com and moodle.drupal.com.
Has anyone got this to work across sub domains?
At some point I will be contributing my Moodle Integration effort which includes an exposed view of the drupal gradebook with custom filters, email notifications, and the minor jquery changes for this auto login block.
My testing server has both Moodle and Drupal in /var/www/. I don't think I have tried just using server's IP since I always install using the FQDN because the sites need to on the web. I also have them setup as virtual sites so that I don't have to do site.com/moddle, site.com/drupal and so on....I rather do site-moodle.com and site-drupal.com.
What modifications have you done to the plugin...can you post them?
I have resolved the subdomain issue, inside of moodle you can specify a domain so that any cookie generated from drupal's subdomain can be referenced.
The modifications use the login script to generate a cookie on the fly using an iframe and AJAX requests.
I nice more specific HOWTO would be nice. If I get it working I will create one.
What if I dont have an LDAP server?
I installed the open-id plugin for moodle, and the drupal 6 compatible openid provider module.
Is it possbile to use the "Moodle Block for Drupal 6.x" addon without LDAP server? Only with an SSO connection by the help of openid? (the openid provider module help to the moodle to see the user table of the drupal as openid server).
But I have no idea how to use this SSO-openid combo as a "seamless" change between drupal and moodle interface.
Any idea, suggestion?
I'm not quite sure if I understand the "cookie issue" you cite, if that is the fact that the initial cookie that is set is not released when you exit Moodle then I might have a solution. At my current location I don't have access to my code but I was able to kill the cookie by making a modification of the code that runs when the loggout is made from Moodle. When I get the chance I will provide details in a later post.
I set up both moodle and drupal setup ...but i m not able to configure ldap server in moodle...how should i comfigure ldap on drupal & what wud be the user type while configuring ldap in moodle...& when i m trying to login on drupal it is giving me error
do you think other modules of moodle will work in this setup of integration with drupal