This project has got a bit more serious - one of my headteachers is VERY keen to come up with a DIY solution that doesn't loads of money
Just your luck - you've attracted a fussy customer. You're about to find out how Liz feels sometimes on this forum
Be warned I think this, as I see it, is an advanced DIY project:
The version I described needs two cameras hooked up at once - a normal raspi camera or something, and a low-res webcam or similar with a filter that blocks everything but infra red. Maybe the Wii-style sensor can be used for that (I did notice a few DIYers on the net had used it, though no idea how they bought the sensors). If not it'd be a project in itself to find out how to improvise a suitable tracking camera.
The system needs to be filming with the main camera, while reading frames from the infra red a few times per second to decide if it needs to pan.
The alternative, using Motion, might be tricky... because when the camera pans, everything else in the frame is moving too
can it be adjusted to handle that? (I have no idea.)
By the way using infra red in say a Chemistry class when there are naked flames (bunsen burners!) might not be possible. Unless the commercial one is a lot more sophisticated than I thought...
A single-camera version would need to be completely different, no tags have to be worn but another way to recognise the target is needed. There have been amateur bits of gear that can do colour tracking for many years - remember the Sony Aibo that used to come with a coloured ball it would "play" with? Or the cmucam. Though making all the teachers wear pink or orange shirts is probably not humane, to them or the kids...
Also bear in mind (especially the infra red approach) it needs to be self calibrating to adjust to room lighting and distance, when switched on, in a way that doesn't stretch the minds of your colleagues. (I said that in the kindest way I could
I think it will just be cheaper to use two raspi cam setups covering different parts of the class and find a way to record both...