This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
stats:proc:revoketutorrights [2011/09/27 20:48] Patrick Michel created |
stats:proc:revoketutorrights [2012/05/29 16:41] Patrick Michel |
||
---|---|---|---|
Line 2: | Line 2: | ||
<code xcend> | <code xcend> | ||
- | revokeTutorRights(ident username, ident exerciseId, ident groupId) { | + | revokeTutorRights(ident uid, ident username, ident exerciseId, ident groupId) { |
- | assume exists //accounts/account[username]/tutor[exerciseId]/group[groupId]; # implies the account exists, which is implicitly true anyway | + | assume exists //accounts/account[uid]/assistant[exerciseId]; |
- | assume exists //exercises/exercise[exerciseId]/groups/group[groupId]/tutor[account]; # implied by integrity and the assumption before | + | |
+ | assume exists //accounts/account[username]/tutor[exerciseId]/group[groupId]; | ||
+ | assume exists //exercises/exercise[exerciseId]/groups/group[groupId]/tutor[username]; | ||
+ | # implied by integrity and the assumption before | ||
remove //accounts/account[username]/tutor[exerciseId]/group[groupId]; | remove //accounts/account[username]/tutor[exerciseId]/group[groupId]; | ||
Line 10: | Line 13: | ||
remove //accounts/account[username]/tutor[exerciseId]; | remove //accounts/account[username]/tutor[exerciseId]; | ||
fi | fi | ||
- | remove //exercises/exercise[exerciseId]/groups/group[groupId]/tutor[account]; | + | remove //exercises/exercise[exerciseId]/groups/group[groupId]/tutor[username]; |
} | } | ||
</code> | </code> |