This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
stats:proc:assignteam [2011/10/24 15:50] Patrick Michel created |
stats:proc:assignteam [2012/05/22 09:56] Patrick Michel |
||
---|---|---|---|
Line 2: | Line 2: | ||
<code xcend> | <code xcend> | ||
- | assignTeam(string uid, string id, string studentId, string teamId) { | + | assignTeam(ident uid, ident id, ident studentId, ident teamId) { |
assume exists //accounts/account[uid]/tutor[id]/group[//exercises/exercise[id]/student[studentId]/group]; | assume exists //accounts/account[uid]/tutor[id]/group[//exercises/exercise[id]/student[studentId]/group]; | ||
# implies the existence of the student, the exercise, the group and enough rights by a tutor account | # implies the existence of the student, the exercise, the group and enough rights by a tutor account | ||
| | ||
- | assume not exists //exercises/exercise[id]/student[studentId]/team; | + | assume not exists //exercises/exercise[id]/students/student[studentId]/team; |
| | ||
- | update //exercises/exercise[id]/student[studentId]/team teamId; | + | insert //exercises/exercise[id]/students/student[studentId]/team teamId; |
} | } | ||
</code> | </code> | ||