This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
stats:proc:changeattributes_sheet [2011/09/29 00:01] Patrick Michel |
stats:proc:changeattributes_sheet [2011/09/29 19:34] Patrick Michel |
||
---|---|---|---|
Line 2: | Line 2: | ||
<code xcend> | <code xcend> | ||
- | changeAttributes(ident id, ident sheetId, double maxPoints) { | + | changeAttributes(ident uid, ident id, ident sheetId, double maxPoints) { |
+ | assume exists //accounts/account[uid]/assistant[id]; | ||
+ | | ||
assume exists //exercises/exercise[id]/sheets/sheet[sheetId]; # implies the existence of the exercise | assume exists //exercises/exercise[id]/sheets/sheet[sheetId]; # implies the existence of the exercise | ||
| | ||
assume maxPoints >= 0; | assume maxPoints >= 0; | ||
- | assume //exercises/exercise[id]/students/student[x]/result[sheetId]/points < maxPoints; | + | assume //exercises/exercise[id]/students/student[x]/result[sheetId]/points <= maxPoints; |
| | ||
update //exercises/exercise[id]/sheets/sheet[sheetId]/maxPoints maxPoints; | update //exercises/exercise[id]/sheets/sheet[sheetId]/maxPoints maxPoints; | ||
- | } # roles: assistant[id] | + | } |
</code> | </code> | ||