(photo by oooh.oooh)

A few weeks ago, I posted how Solution Grove implemented Moodle to ELGG Single Sign-On.  That was only the first phase.  The client also needed it to seamlessly auto-create users on ELGG using credentials from the user's Moodle account.  We searched for a solution for this and found his ELGG-WebCT integration solution from Aperto Elearning Solutions.  Even though the other component was WebCT, it was still interesting to us as the concept is similar - the user is automatically created on the ELGG side.  Solution Grove emailed Aperto and their contact person was kind enough to point to us the Aperto download server, where the code can be downloaded, and added a few tips in the email as well.

From there, I went on to download and study the code.  It did what we needed but I saw some limitations with the code as compared to how I envisioned our Moodle-ELGG implementation.  Specifically, the ELGG-WebCT implementation strictly limits a matching user name between ELGG and the connecting component on the actual users table in ELGG.  I found this as a limitation because ELGG separates users and user aliases into different tables and I did not want to change any ELGG  functionality.  In addition, making use of user aliases will give us the capability to allow different LMS to integrate with ELGG in the future.  

In the end, I wrote my own code using the ELGG-WebCT integration as inspiration and the original e-portfolio block and then, patched ELGG LMS integration files mentioned in my previous post as my base code.

Based on the following assumptions:

  1. Passwords are auto-generated in the ELGG accounts and there is no need to notify the users as all logins happen on the Moodle server.
  2. Pre-existing users in the ELGG server were created with matching user names as those in their Moodle account.
  3. For pre-existing users in ELGG, the email address defined may differ from the one in Moodle.

Here are the things I did:

  1. I created a file createorlogin.php whose main function is to find a matching user name in ELGG from the one passed in by the Moodle e-portfolio block.  If it finds one, it creates a user alias identified by the LMS installid setting.  If none was found, then it creates the user first before creating the alias.
  2. I changed the file signupredirect.php in the Moodle e-portfolio block to redirect to createorlogin.php instead of the original setting of redirecting to join.php in ELGG.
  3. I tested different scenarios and deployed the changes.

Feel free to use the code if it will help you in any way.  It may not be an exact match to your needs but the code should be a good starting point. Just do the following to install on your server:

  1. Download the createorlogin.php file and copy this to the LMS directory of your ELGG installation.
  2. Modify the file signupredirect.php file in your Moodle e-portfolio block and replace the string "/lms/join.php" with "/lms/createorlogin.php".  If you don't want to do this yourself, here's a tarball of the e-portfolio block.
posted in

How about redirecting users to setup password for elgg

I tried to integrate Moodle 1.9 with Elgg 0.91. Even though user accounts were created in Elgg, they could not login.
They have to retrieve their password from Elgg.
It is safe to know the elgg password in case they logoffed from the elgg or they want to login directly.

Thus it will be good if users are redirected to the password retrieval page for elgg.

Thanks in advance.

Jong-Dae Park

by Jong-Dae Park on 03/22/08

Add comment
Recent Entries
Categories

AJAX (13)
CCK08 (1)
MEL (16)
LAMS (4)
Tech (13)



Authors




Archive




Notifications
Icon of envelope You may request notification for Solution Grove Blog.


Syndication Feed
XML


Recent Comments
  1. Eamon Costello: thanks
  2. Dave Bauer: Using clickpass
  3. Caroline Meeks: Should we put this on Solutiongrove.com, .net, .info??
  4. Jong-Dae Park: How about redirecting users to setup password for elgg
  5. Caroline Meeks: Great job!
  6. Mark Tomizawa: Bandwidth (the human kind)
  7. Hamilton Chua: ns_zlib on OpenACS
  8. Hamilton Chua: Thanks Mark
  9. Mark Aufflick: svnmerge.py saves you the pain
  10. Hamilton Chua: Mosio, Yahoo Answers on Mobile ?



Technorati Blogs