We are often asked by clients if it would be possible to create a Single Sign-on between their CMS and Moodle or Totara. Since this question has come up a few times for us, I decided to build us a custom adaptor to solve the problem.
I started off by building my own authentication method for Moodle/Totara that would allow pretty much any CMS to connect to it. I also build a small test template that allows me to simulate a CMS passing values to my authentication block. This allows me to test the authentication block on a new installation without needing a CMS present.
Once I had the auth block build, I defined the basic information I would need from a CMS, as well as the route the data would take during the SSO. If you understand this, SSO is not to tricky.
Below are a few steps showing how this was done from Drupal 7.2.x to Moodle 2.6
Steps taken:
- Install the ssso auth method to Moodle.
- Log into Moodle and make sure this auth method is enabled.
- Create a block in Drupal containing the necessary fields and URL to the Moodle site.
- Make sure the block is only available to authenticated users.
- I did not make it available to Administrators since I wanted the two sites to have unique administration access rights.
- Add custom fields to Drupal for – firstname, lastname, city and country.
Below are some screen shots showing the process in action.
Hi,
Thanks for providing information about Moodle. And Moodle is a flexible and application which makes development easy. I think Moodle Experts can learn lots more things through this information.
It’s my pleasure. I believe there is a big opportunity to extend Moodles functionality through integration with other systems or extending the existing functionality.
Thanks for the information.
I want to follow your instruction.
Where can I find “the ssso auth method” you describe?
Hi
Sadly the client permitted us to share the screens but not the plugin. We hope they will allow us to make it public and then I’ll send you a complete guide on how to use it. Apologies for that.
Pingback: Drupal to Moodle SSO | iLite's Weblog | Web 3.0...
Pingback: Drupal to Moodle SSO | drupal nikki | Scoop.it
Hi Sean, Really a great job. Struggling to have SSO feature from Drupal 7 to Moodle 2.8. Didn’t find any proper documentation. Everything done as per this blog. But ‘auth block build’ missed. Can you please help me. Thanks
Hi Sean, Done a great job. Since last week struggling with Moodle SSO feature with Drupal 7. Install lot of Drupal contributed modules but no luck. Gone through this blog and followed the same. But stuck in button creation in block called ‘auth block’. Can you please guide me. Thanks a lot in advance.
Hi Lalitha
I have not looked at the Drupal to Moodle SSO in a long time. I have a custom auth method in Moodle that I point to from Drupal. I have build this auth method in such a way that I can pretty much connect anything to Moodle using it. I am not sure if that’s what you are referring to above.
Thanks for the information Can I get the Moodle plugin?
Hi
It’s been a while. I’ll see if I can find the Drupal component and mail it off to you.