This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
stats:proc:addresult_sheet [2011/09/28 20:53] Patrick Michel created |
stats:proc:addresult_sheet [2013/07/10 12:34] (current) |
||
---|---|---|---|
Line 2: | Line 2: | ||
<code xcend> | <code xcend> | ||
- | addResult(ident id, ident studentId, ident sheetId, double points) { | + | addResult(ident uid, ident id, ident studentId, ident sheetId, double points) { |
- | assume exists //exercises/exercise[id]/students/student[studentId]; # implies the existence of the exercise | + | assume exists /account[uid]/assistant[id] |
- | assume exists //exercises/exercise[id]/sheets/sheet[sheetId]; # dito | + | || exists /account[uid]/tutor[id]/group[/exercise[id]/student[studentId]/group]; |
+ | |||
+ | assume exists /exercise[id]/student[studentId]; # implies the existence of the exercise | ||
+ | assume exists /exercise[id]/sheet[sheetId]; # dito | ||
| | ||
- | assume not exists //exercises/exercise[id]/students/student[studentId]/result[sheetId]; | + | assume not exists /exercise[id]/student[studentId]/result[sheetId]; |
| | ||
- | assume points >= 0 && points <= //exercises/exercise[id]/sheets/sheet[sheetId]/maxPoints; | + | assume points >= 0 && points <= /exercise[id]/sheet[sheetId]/maxPoints; |
| | ||
- | insert //exercises/exercise[id]/students/student[studentId] <result sheet=[sheetId] points=[points] />; | + | insert /exercise[id]/student[studentId] <result sheet=[sheetId] points=[points] />; |
} | } | ||
</code> | </code> |