This shows you the differences between two versions of the page.
stats:proc:addparticipant [2011/09/29 18:55] Patrick Michel |
stats:proc:addparticipant [2013/07/10 12:34] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Add Participant ====== | ||
- | |||
- | <code xcend> | ||
- | addParticipant(ident uid, ident id, ident studentId) { | ||
- | assume exists //accounts/account[uid]/examiner[id]; | ||
- | |||
- | assume exists //exams/exam[id]; # implicitly true in OO implementations | ||
- | assume exists //accounts/account/student[studentId]; | ||
- | | ||
- | assume not exists //exams/exam[id]/results/participant[studentId]; | ||
- | | ||
- | insert //exams/exam[id]/results/participant[studentId]; | ||
- | } | ||
- | </code> | ||
- | |||