This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
stats:proc:deletetask [2011/09/27 20:52] Patrick Michel created |
stats:proc:deletetask [2013/07/10 12:34] (current) |
||
---|---|---|---|
Line 2: | Line 2: | ||
<code xcend> | <code xcend> | ||
- | deleteTask(ident id, ident taskId) { | + | deleteTask(ident uid, ident id, ident taskId) { |
- | assume exists //exams/exam[id]/tasks/task[taskId]; # implies the exam exists, which is implicitly true anyway | + | assume exists /account[uid]/examiner[id]; |
- | assume size(//exams/exam[id]/results/participant/result[taskId]) = 0; | + | assume exists /exam[id]/task[taskId]; # implies the exam exists, which is implicitly true anyway |
- | remove //exams/exam[id]/tasks/task[taskId]; | + | assume size(/exam[id]/participant/result[taskId]) = 0; |
+ | |||
+ | remove /exam[id]/task[taskId]; | ||
} | } | ||
</code> | </code> | ||