Freelesson module

From: Nicholas Robinson <nprREMOVE@THISbottlehall.co.uk>
Date: Sun Jun 05 2005 - 17:04:17 CEST

Hi

I'm trying to put a module together to block scheduling of lessons on
particular lessons - i.e. replacing some of the modules like teacher-dayoff
from V0.1, etc.

I thought I'd try creating a resource restriction for "time" as follows:

                <resourcetype type="time">
                        <matrix width="5" height="9"/>
                        <restriction type="free-lesson">4 1</restriction>
                </resourcetype>

The parser isn't being called - if I don't load the module then the parser
doesn't complain about the restriction being unknown. If I change the line:

        handler_res_new("time", "free-lesson", getlesson);

to be:

        handler_res_new("teacher", "free-lesson", getlesson);

then the handler gets called if I move the restriction to a teacher.

My intention with this restriction is to create an irregularly-shaped
timetable. We have a whole school assembly first lesson on Friday and a
variable timetable on Wednesday afternoons, again for the whole school. I've
tried using preferred.c to schedule lessons at these times to block ordinary
lessons from being scheduled but it then causes other problems. So, the
restriction above should stop any lessons from being scheduled at this time.

I plan to implement the same restriction (with a further restriction such as
'free-day' or 'day-off') to handle our part-time teachers.

Best Wishes

Nick
Received on Sun Jun 05 17:04:13 2005

This archive was generated by hypermail 2.1.8 : Tue Aug 16 2005 - 20:43:48 CEST