This shows you the differences between two versions of the page.
stats:proc:registerstudent [2011/10/02 10:27] Patrick Michel stats:proc:addstudent renamed to stats:proc:registerstudent |
stats:proc:registerstudent [2013/07/10 12:44] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Register Student ====== | ||
- | <code xcend> | ||
- | registerStudent(ident uid, ident id, ident studentId) { | ||
- | assume //accounts/account[uid]/student/id = studentId; | ||
- | |||
- | assume exists //exercises/exercise[id]; | ||
- | assume exists //accounts/account/student[studentId]; | ||
- | | ||
- | assume not exists //exercises/exercise[id]/students/student[studentId]; | ||
- | | ||
- | insert //exercises/exercise[id]/students <student id=[studentId] />; | ||
- | } | ||
- | </code> |