This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
stats:proc:changeresult_sheet [2011/10/12 14:42] Patrick Michel created |
stats:proc:changeresult_sheet [2012/05/22 09:54] Patrick Michel |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== changeResult (Sheet) ====== | + | ====== Change Result (Sheet) ====== |
<code xcend> | <code xcend> | ||
- | changeResult(string uid, string id, string studentId, string sheetId, double value) { | + | changeResult(ident uid, ident id, ident studentId, ident sheetId, double points) { |
- | tbd | + | assume exists //accounts/account[uid]/assistant[id] |
+ | || exists //accounts/account[uid]/tutor[id]/group[//exercises/exercise[id]/students/student[studentId]/group]; | ||
+ | |||
+ | assume exists //exercises/exercise[id]/students/student[studentId]; # implies the existence of the exercise | ||
+ | assume exists //exercises/exercise[id]/sheets/sheet[sheetId]; # dito | ||
+ | |||
+ | assume points >= 0 && points <= //exercises/exercise[id]/sheets/sheet[sheetId]/maxPoints; | ||
+ | |||
+ | assume exists //exercises/exercise[id]/students/student[studentId]/result[sheetId]; | ||
+ | |||
+ | update //exercises/exercise[id]/students/student[studentId]/result[sheetId]/points points; | ||
} | } | ||
</code> | </code> | ||