This shows you the differences between two versions of the page.
stats:proc:registerstudent [2011/10/15 20:17] Patrick Michel |
stats:proc:registerstudent [2013/07/10 12:44] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Register Student ====== | ||
- | <code xcend> | ||
- | registerStudent(ident uid, ident id, ident studentId) { | ||
- | assume exists //exercises/exercise[id]; | ||
- | |||
- | assume //exercises/exercise[id]/open && exists //accounts/account[uid]/student && //accounts/account[uid]/student/id = studentId || | ||
- | exists //accounts/account[uid]/assistant[id]; # the right management can't come first here | ||
- | |||
- | assume not exists //exercises/exercise[id]/students/student[studentId]; | ||
- | | ||
- | insert //exercises/exercise[id]/students <student id=[studentId] />; | ||
- | } | ||
- | </code> |