User Tools

Site Tools


stats:proc:addstudentid

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
stats:proc:addstudentid [2011/09/29 00:57]
Patrick Michel
stats:proc:addstudentid [2011/09/29 19:33]
Patrick Michel
Line 2: Line 2:
  
 <code xcend> <code xcend>
-# pretty much the canonical addStudent procedure +addStudentId(ident uid, ident username, string id) { 
-addStudentId(ident username, string id) {+  assume exists //​accounts/​account[uid]/​admin;​ 
   assume exists //​accounts/​account[username];​ # implicitly true in OO implementations   assume exists //​accounts/​account[username];​ # implicitly true in OO implementations
   assume not exists //​accounts/​account[username]/​student;​   assume not exists //​accounts/​account[username]/​student;​
Line 9: Line 10:
    
   insert //​accounts/​account[username] <student id=[id] />;   insert //​accounts/​account[username] <student id=[id] />;
-# roles: admin+}
 </​code>​ </​code>​
stats/proc/addstudentid.txt · Last modified: 2013/07/10 12:32 (external edit)