
:-recorda(classapproengaged,[false,r,c,[[[beganteaching,false]],[[classengaged,false]]]],REF).

:-recorda(classapproengaged,[true,r,c,[[[classgivenwork,true]],[[classengaged,true]]]],REF).

:-recorda(classapproengaged,[false,r,c,[[[classgivenwork,false]],[[classengaged,false]]]],REF).


:-recorda(managepupilarrival,[false,r,c,[[[beganteaching,true]],[[pupilarrival,false]]]],REF).

:-recorda(managepupilarrival,[true,r,c,[[[occupyclass,true]],[[pupilarrival,true]]]],REF).

:-recorda(managepupilarrival,[false,r,c,[[[occupyclass,false]],[[pupilarrival,false]]]],REF).


:-recorda(managepupilarrival,[true,r,c,[[[fitworktosit,true]],[[pupilarrival,true]]]],REF).

:-recorda(managepupilarrival,[false,r,c,[[[fitworktosit,false]],[[pupilarrival,false]]]],REF).


:-recorda(beganteaching,[true,r,c,[[[triedstartlesson,true]],[[beganteaching,true]]]],REF).

:-recorda(beganteaching,[false,r,c,[[[triedstartlesson,false]],[[beganteaching,false]]]],REF).

:-recorda(occupyclass,[true,r,c,[[[fillintime,true]],[[occupyclass,true]]]],REF).

:-recorda(occupyclass,[false,r,c,[[[fillintime,false]],[[occupyclass,false]]]],REF).


:-recorda(classarrived,[true,r,c,[[[phypresent,true]],[[classarrived,true]]]],REF).

:-recorda(classarrived,[false,r,c,[[[phypresent,false]],[[classarrived,false]]]],REF).

:-recorda(contcs,[unknown,mr,a,[[[startoflesson,true]],[[beganteaching,false],[beganteaching,true],[occupyclass,false],[occupyclass,true],[classpresent,false],[classpresent,true]]]],REF).

:-recorda(contcs,[unknown,mr,a,[[startoflesson,false]],[[fitworktosit,false],[fitworktosit,true]]]],REF).


:-recorda(contcs,[unknown,mr,a,[[[classarrived,true]],[[classapproengaged,false],[classapproengaged,true]]]],REF).

:-recorda(contcs,[unknown,mr,a,[[[classarrived,false]],[[managepupilarrival,false],[managepupilarrival,true]]]],REF).

fillintime:-
    menu(['How do you fill in time whilst waiting for the class to arrive?',
          [a,'I sit and wait',1],
          [b,'I try to look busy',2],
          [c,'I finish getting things ready for the lesson',2],
          [d,'I talk to the pupils as they arrive',3],
          [e,'I get pupils involved in handing out books and homework',3],
          [e,'I get those who have arrived into thinking about the work we will be covering that lesson',3]
         ],VALUE),
    (VALUE = 1,
     recorda(data,[fillintime,false],REF1);
     VALUE = 2,
     recorda(data,[fillintime,false],REF1);
     VALUE = 3,
     recorda(data,[fillintime,true],REF1)).

fitworktosit:-
    menu(['Do you make special arrangements for changing class population?',
            [a,'Yes',1],
            [b,'No',2]
         ],VALUE),
    (VALUE = 1,
     recorda(data,[fitworktosit,true],REF1);
     VALUE = 2,
     recorda(data,[fitworktosit,false],REF1)).

classgivenwork:-
    menu(['What work had the class been given to do?',
          [a,'They had not been given any work as yet',1],
          [b,'You were waiting for them to settle down before carrying on',2],
          [c,'You were waiting for silence',2],
          [d,'They had been given some work to get on with',3],
          [e,'They were meant to be listening to you',3]
         ],VALUE),
    (VALUE = 1,
     recorda(data,[classgivenwork,false],REF1);
     VALUE = 2,
     recorda(data,[classgivenwork,false],REF1);
     VALUE = 3,
     recorda(data,[classgivenwork,true],REF1)).
