How To / General

Joomla and Moodle sessions

  • Web Buster UK Ltd
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
6 years 7 months ago #1 by Web Buster UK Ltd
Joomla and Moodle sessions was created by Web Buster UK Ltd
This is an issue we can't seem to find a workaround for. The main point is that Joomla and Moodle keep track of separate sessions.

As a user logs into Joomla, they will also be logged into Moodle through Joomdle's SSO.

Unfortunately, even as they continue to work and remain signed in within Moodle, their Joomla session expires (when session lifetime is up) and they are logged out of Joomla. When they then return to Joomla, they find out that they are logged out.

Is there a way to keep Joomla and Moodle sessions synchronised? Or even just to prevent the user from being logged out of Joomla while they are working within Moodle?

Our websites currently uses Moodle in an iframe within Joomla. The snag is that when they are done with Moodle in the iframe and try clicking links outside of the iframe, it brings them to the login page (because Joomla session has expired).

Please Log in or Create an account to join the conversation.

More
6 years 7 months ago #2 by Antonio Durán
Replied by Antonio Durán on topic Joomla and Moodle sessions
In theory, Joomdle updates Joomla sessions via Moodle cron...now, I have not tested this in quite a while so I am not 100% sure it is working.
I will test myself as soon as I can (I am away this week) and get back to you.

Please Log in or Create an account to join the conversation.

More
6 years 6 months ago #3 by Antonio Durán
Replied by Antonio Durán on topic Joomla and Moodle sessions
Hi.

I took some time to check how this was working... and you are right: it is not working at all :(

I did some investigation, and it seems the old method we were using is not valid anymore, so I had to think of another way. Unfortunately, this new way is more complicated, but I have not been able to find a better solution.
You can check info on this new method here:
www.joomdle.com/wiki/Session_sync

Please test and let us know if you have any issues.

Please Log in or Create an account to join the conversation.

  • Web Buster UK Ltd
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
6 years 6 months ago - 6 years 6 months ago #4 by Web Buster UK Ltd
Replied by Web Buster UK Ltd on topic Joomla and Moodle sessions
Thanks for the quick response. We'll test it with our students and report back if there's any issue.

Edit: on brief testing it doesn't seem to work. We are using Adaptable theme. Our steps:
  1. Created new folder theme/adaptable/javascript/
  2. Created new file in above folder called updatesession.js with our joomla URL
  3. Added the line in config.php
  4. Purged cache
Last edit: 6 years 6 months ago by Web Buster UK Ltd.

Please Log in or Create an account to join the conversation.