This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
stats:proc:createtask [2011/09/29 00:19] Patrick Michel |
stats:proc:createtask [2011/09/29 19:22] Patrick Michel |
||
---|---|---|---|
Line 2: | Line 2: | ||
<code xcend> | <code xcend> | ||
- | createTask(ident id, ident taskId, double maxPoints) { | + | createTask(ident uid, ident id, ident taskId, double maxPoints) { |
+ | assume exists //accounts/account[uid]/examiner[id]; | ||
assume exists //exams/exam[id]; # implicitly true in OO implementations | assume exists //exams/exam[id]; # implicitly true in OO implementations | ||
assume not exists //exams/exam[id]/tasks/task[taskId]; | assume not exists //exams/exam[id]/tasks/task[taskId]; | ||
Line 9: | Line 11: | ||
| | ||
insert //exams/exam[id]/tasks <task id=[taskId] maxPoints=[maxPoints] />; | insert //exams/exam[id]/tasks <task id=[taskId] maxPoints=[maxPoints] />; | ||
- | } # roles: examiner[id] | + | } |
</code> | </code> | ||