Reply to comment

Single Sign On between Drupal and Moodle

Moodle SSO Cookies

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

AttachmentSize
moodlesso.tar.gz10.53 KB

Reply

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <b> <address> <blockquote> <br> <caption> <center> <code> <dd> <del> <div> <dl> <dt> <em> <font> <h2> <h3> <h4> <h5> <h6> <hr> <i> <img> <li> <ol> <p> <pre> <span> <strong> <sub> <sup> <table> <tbody> <td> <tfoot> <th> <thead> <tr> <u> <ul> <tr>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
6 + 7 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.