User Tools

Site Tools


stats:proc:removestudentid

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
Previous revision
stats:proc:removestudentid [2011/09/29 00:57]
Patrick Michel
stats:proc:removestudentid [2013/07/10 12:34] (current)
Line 2: Line 2:
  
 <code xcend> <code xcend>
-# correspondingly,​ this is the removeStudent procedure +removeStudentId(ident uid, ident username) { 
-removeStudentId(ident username) { +  assume exists /account[uid]/admin;
-  assume exists ​//accounts/account[username]/student# implies the account exists, which is implicitly true anyway+
  
-  assume ​size(//​exercises/​exercise/​students/​student[//​accounts/​account[username]/​student/id]) = 0; +  assume ​exists ​/​account[username]/​student; ​# implies the account ​exists, which is implicitly true anyway
-  assume size(//​exams/​exam/​results/​participant[//​accounts/​account[username]/​student/​id]) = 0;+
  
-  ​remove ​//​account/​account[username]/​student;​ +  ​assume size(/exercise/​student[/account[username]/​student/​id]) = 0; 
-# roles: admin+  assume size(/​exam/​participant[/​account[username]/​student/​id]) = 0; 
 + 
 +  remove ​/​account[username]/​student;​ 
 +}
 </​code>​ </​code>​
  
stats/proc/removestudentid.1317250678.txt.gz · Last modified: 2011/09/29 00:57 by Patrick Michel