This shows you the differences between two versions of the page.
stats:proc:revokeassistantrights [2012/05/29 16:38] Patrick Michel |
stats:proc:revokeassistantrights [2013/07/10 12:32] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Revoke Assistant Rights ====== | ||
- | |||
- | <code xcend> | ||
- | revokeAssistantRights(ident uid, ident username, ident exerciseId) { | ||
- | assume exists //accounts/account[uid]/admin; | ||
- | |||
- | assume exists //accounts/account[username]/exercise[exerciseId]; # implies the account exists, which is implicitly true anyway | ||
- | assume exists //exercises/exercise[exerciseId]/assistant[username]; # implied by integrity and the assumption before | ||
- | |||
- | remove //accounts/account[username]/exercise[exerciseId]; | ||
- | remove //exercises/exercise[exerciseId]/assistant[username]; | ||
- | } | ||
- | </code> | ||