Update

This has been a big month for Total ReCal. We’ve now perfected our event importers for Blackboard assignments and academic timetables, and we’ve started working on the main web application (screenshots too). We’ve also launched a beta registration page for interested staff and students to sign up for early access. Finally, our Talis Keystone service that the University has recently purchased will be in place very soon meaning we can also start importing book return dates for staff and students.

After numerous code re-writes we’ve got a rock solid API for adding, updating and deleting events in our Nucleus data store. Our import code has also had many updates to support logging of changes to events which will be invaluable to students to keep them up to date. Once the main Total ReCal application has been developed we’re going to sit down and work out how we’re going to best make use of these logs.

When a lecturer calls in sick the central timetabling department isn’t informed (unless it will affect lecturers for a long period of time). Therefore based on our current nightly timetable imports we won’t find out about any changes. We’re going to develop a tool for faculty administration staff to make changes to events as they’re going to be more aware of what the situation is day to day. This means that we can then inform students of changes that day as soon as someone changes it.

In terms of the front end, I’ve forked our common web design, called it ‘common web design x’, made it fluid to adapt to browser size, made it completely semantic HTML5 based, and taken the concept of progressive enhancement to new levels. It will also make use of our new OAuth 2.0 based single sign on service that I’ve written and it will automatically adapt to mobile layouts.

Some geo love

Mashing up single sign on and the CWD wasn’t enough. I’ve added to our Nucleus ‘location’ service some new geo APIs that will allow us to make location aware websites and applications.

There is both a server side version which can be called via cURL/file_get_contents/etc:

http://nucleus.online.lincoln.ac.uk/locations/geo/format/xml (your IP address)
http://nucleus.online.lincoln.ac.uk/locations/geo/format/xml?ip=86.6.170.144 (my current IP address)

(if you want JSON/JSONP/CSV then replace the format/xml with format/your choice)

and a JavaScript client side version:

http://nucleus.online.lincoln.ac.uk/locations/geojs (your IP address)
http://nucleus.online.lincoln.ac.uk/locations/geojs?ip=86.6.170.144 (my current IP address)

Both services return the following information:

  • which campus network the IP address is associated with (or ‘non’ if they aren’t using a campus network)
  • which campus they’re on (e.g. Brayford or Hull or ‘non’ if they aren’t on a campus)
  • the building (we can only do this currently for wired networks and some wireless networks)
  • the postcode of the building (where possible)
  • latitude and longitude (if the IP address isn’t on a University network then it uses the Maxmind GeoCity database)
  • the closest library to the library (GCW, Holbeach, Hull, or if they’re on a campus network, the Theology Reading Room)

So how does it work?

I’ve collected a huge list of IP ranges for the wired and wireless networks at the University and then I use the this function to loop over these ranges until it returns TRUE that an IP is in a range, or that it isn’t (i.e. they aren’t on a University network).

The ranges look like this:

$zones = array(
    'HBW'    => array(
        'network'=>'Holbeach wireless',
        'campus'=>'Holbeach',
        'postcode'=>'PE12 7PT',
        'building'=>'Minerva House',
        'latitude'=>'52.810004',
        'longitude'=>'0.01696'
    ),

If it results that an IP address is from a network then I’ve a simple multidimensional array for each network that contains the meta:

$zones = array(
'HBW'	=> array(
	'network'=>'Holbeach wireless',
	'campus'=>'Holbeach',
	'postcode'=>'PE12 7PT',
	'building'=>'Minerva House',
	'latitude'=>'52.810004',
	'longitude'=>'0.01696'
),
...

Finally it outputs in the required format (i.e. json/xml (server) or JavaScript (client)).

When mashed up with another Nucleus location API we could easily make a FourSquare like app that finds buildings around a location:

http://nucleus.online.lincoln.ac.uk/locations/buildings_near/format/xml?lat=53.228482&long=-0.547847&distance=0.5&limit=10

I’ll make sure that all of these location APIs are properly documented soon so people can go have fun with them. Also, none of these location APIs require any sort of authentication (though we are rate limiting so don’t try and kill our servers please!).