User Tools

Site Tools


stats:schema:group

This is an old revision of the document!


Exercise Groups

This page describes a minor part of the STAT System XCend Schema, namely the exercise groups.

Schema

      element groups {              
        element group * id {        [ count(./id, ..exercise/students/student/group) < ./maxSize ]
          attribute day             { "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday" }
          attribute time            { string }
          attribute location        { string }
          attribute maxSize         { integer [ . >= 0 ]}
 
          element tutor * account   {[ exists //accounts/account[./account] ]}
        }                           
      }                             

Procedures

Change Attributes

changeAttributes(ident uid, ident id, ident groupId, string day, string time, string location, integer maxSize) {
  assume exists /account[uid]/assistant[id];
 
  assume exists /exercise[id]/group[groupId]; # implicitly true in OO implementations
 
  assume maxSize >= 0;
  assume /exercise[id]/group[groupId]/curSize <= maxSize;
 
  update /exercise[id]/group[groupId]/day day;
  update /exercise[id]/group[groupId]/time time;
  update /exercise[id]/group[groupId]/location location;
  update /exercise[id]/group[groupId]/maxSize maxSize;
}
stats/schema/group.1317233641.txt.gz · Last modified: 2011/09/28 20:14 by Patrick Michel