User Tools

Site Tools


stats:proc:addstudentid

This is an old revision of the document!


Set Student ID

# pretty much the canonical addStudent procedure
setStudentId(ident username, string id) {
  assume exists //accounts/account[username]; # implicitly true in OO implementations
  assume not exists //accounts/account[username]/student;
  assume count(id, //accounts/account/student/id) = 0;
 
  insert //accounts/account[username] <student id=[id] />;
}
stats/proc/addstudentid.1317149739.txt.gz · Last modified: 2011/09/27 20:55 by Patrick Michel