Thursday 31 August 06

After having a chat to Chris & Marc now they’re both back from holiday, we decided to take a little step back and so now we’ll just develop the Moodle block so that it reflects the users current status, rather than allowing them to also set their status. This means that we avoid the thorny problem of maintaining the jsessionid for the users and knowing when they ahve gone on/offline etc.

I’ve also been working on getting some stats displayed within the block to show how many users are on and offline. We’ll have something along these lines:

My Contacts: (A) / (B) online

All users: (C) / (D) online

Where the figures are calculated as follows

(A) = number of current users contacts currently online – this has to currently be worked out in a slightly obscure and inefficient way… it thakes the ids of all the users currently online and feeds these as a where clause to the same query used to calculate (B) – this then gives total no of users contacts online. This works ok for low numbers of contacts and people online, but will start to get slow once the nubmer increase. A better way to do this would be to have this figure provided directly as a service from BuddyXML server – same goes for all the other figures too.

(B) = total number of users contacts – taken from Moodle database of the number of people who share a course with the current user.

(C) = total users currently online – calculated from the presences feed for the global user – again would be better if this was a feed/service direct from the BuddyXML server

(D) = total no users in system – taken from number of users on Moodle database

Leave a Reply

*