Friday 18 August 06
All has been goinng well so far with the integration of MSG into Moodle, I’ve got the forum listings update so they show whether the forum poster is currently online or not. Yesterday I started working on the block which will show the current users presence state and allow them to alter it, or log out/in from MSG. This is where things have started to get a lot more complicated! The main reason for this complication is that fact that I’ve got to use a proxy for the AJAX in my block to connect to which will then forward the requests on the the MSG server. This would be ok if it wasn’t for the fact that I need some way of maintaining the sessions, if the user is solely logging in to MSG through our Moodle block then that’s fine – I can hang on to the JSessionID required by the MSG server, but users could have logged in to MSG via another method, eg, though another browser window, or via the MSG Desktop Alert and this is quite likely, esp if they are using the desktop alerter.
If the user has already looged in I don’t want to be creating another session for them (as it could confuse things), but as Moodle will be on a different domain, I don’t have access to the JSessionID cookie – so I’m unable to maintian the same session for the user.
There are a couple of options of how to get around this (I think) – firstly would be to pass the Moodle session cookie to the MSG server and then the MSG server can maintain conenctions based on the Moodle session too – I don’t know how complicated it would be to set this up on the MSG server yet. For info, we’ve got a validate script that the MSG server can use to call Moodle to check that the given Moodle session cookie is valid and belongs to the user it claims to be from. The second option would be to have another service on the MSG server which could be sent the Moodle cookie (MSG checks it’s a valid one) and then provides back the users JSessionID.
Until Chris is back next week and he can let me know which of the 2 options is viable (or not, or give me another option!) I’m going to concentrate on requiring the user to log in using Moodle and maintaining the JSessionID within Moodle.










