This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| stats:proc:deletesheet [2011/09/28 19:59] Patrick Michel created | stats:proc:deletesheet [2013/07/10 12:34] (current) | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| <code xcend> | <code xcend> | ||
| - | deleteSheet(ident id, ident sheetId) { | + | deleteSheet(ident uid, ident id, ident sheetId) { | 
| - | assume exists //exercises/exercise[id]/sheets/sheet[sheetId]; # implies existence of the exercise | + | assume exists /account[uid]/assistant[id]; | 
|  |  | ||
| - | assume size(//exercises/exercise[id]/students/student/result[sheetId]) = 0; | + | assume exists /exercise[id]/sheet[sheetId]; # implies existence of the exercise | 
|  |  | ||
| - | remove //exercises/exercise[id]/sheets/sheet[sheetId]; | + | assume size(/exercise[id]/student/result[sheetId]) = 0; | 
| + | |||
| + | remove /exercise[id]/sheet[sheetId]; | ||
| } | } | ||
| </code> | </code> | ||