This shows you the differences between two versions of the page.
stats:proc:signoutgroup [2011/10/15 20:19] Patrick Michel |
stats:proc:signoutgroup [2013/07/10 12:34] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Sign-Out Group ====== | ||
- | <code xcend> | ||
- | signOutGroup(ident uid, ident id, ident studentId) { | ||
- | assume exists //exercises/exercise[id] && //exercises/exercise[id]/open && | ||
- | exists //accounts/account[uid]/student && //accounts/account[uid]/student/id = studentId | ||
- | || exists //accounts/account[uid]/assistant[id]; | ||
- | |||
- | assume exists //exercises/exercise[id]/students/student[studentId]/group; # implies existence of the exercise and student, even the group | ||
- | | ||
- | remove //exercises/exercise[id]/students/student[studentId]/group; | ||
- | update //exercises/exercise[id]/groups/group[//exercises/exercise[id]/students/student[studentId]/group]/curSize | ||
- | (//exercises/exercise[id]/groups/group[//exercises/exercise[id]/students/student[studentId]/group]/curSize - 1) | ||
- | } | ||
- | </code> |