This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
stats:proc:removestudentid [2011/09/27 20:12] Patrick Michel created |
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; |
| + | assume size(/exam/participant[/account[username]/student/id]) = 0; | ||
| + | |||
| + | remove /account[username]/student; | ||
| } | } | ||
| </code> | </code> | ||