Recent blog posts
- DrupalCamp CA / Guatemala 2010
- Content Profile Form inside User Edit for Drupal 6
- How use views arguments in PHP Code for Drupal 6
- Drupal Contribution: Generate vancode using mysql alone
- Drupal Module Patch: Belated PNG
- Drupal Patch to Notify Module to process only new content
- Notify module: Handle both published and unpublished entries
- osCommerse Authentication | New Drupal Module
- Single Sign On between Drupal and Moodle
- Share SSH Public Key Authentication
Reply to comment
Submitted by enzo on Wed, 02/17/2010 - 01:37
This module was sponsored by eLearning Solutions
I got the mission from eLearning Solutions to implement the drupal module Single Sign On moodlesso for Drupal 6
This is the version use a share cookie for SSO between Drupal and Moodle.
This module was tested between Drupal 6.15 and Moodle 1.9.6
OVERVIEW
This SSO Method assume you are using drupal and moodle in the same domain or subdomain
i.e yourdomain.com and yourdomain.com/moodle in order to enable share cookie between applications
Share cookies MOODLEUSERNAME and MOODLESSOTOKEN in yourdomain.com
INSTALLATION
1. Copy the file moodle.patch to the root of your Moodle installation. (tested against moodle 1.9.7)
2. Patch Moodle's lib/setup.php and lib/moodlelib.php file by running the "patch" command from the root of your Moodle installation. As example:
%> patch < moodle.patch
This will add 3 lines (one of which is a blank line) near the end of the setup.php file. and include a extra password validation in moodlelib.php
3. Copy the file drupallib.php to the lib subdirectory in the root of your Moodle install. That is, it should be in the same directory as the setup.php file which was patched in the previous step.
4. Copy the rest of the files into the usual Drupal contributed module installation location. This is usually the sites/all/modules/moodlesso directory beneath the root of your Drupal install. That is:
%> cp -r moodlesoo <drupal-root>/sites/all/modules
5. Enable the Drupal moodlesso module in the usual way.
Usage
1. Edit the user(s) information to link drupal account with one moodle account (username/password)
2. After update moodle information or login drupal will create a couple cookie used to login in moodle
Other modules recommended
1. http://drupal.org/project/moodle module used to display content from moodle to drupal.
If you want test this contribution check the file attached in this post.
If you had issues implementing this contribution send me an email to enzo at anexusit dot com.
Enjoy it.
enzo
| Attachment | (click to download) | |
|---|---|---|
| moodlesso.tar.gz | 10.53 KB |

