This shows you the differences between two versions of the page.
stats:proc:createtask [2011/09/27 20:51] Patrick Michel created |
stats:proc:createtask [2013/07/10 12:42] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Create Task ====== | ||
- | |||
- | <code xcend> | ||
- | createTask(ident id, ident taskId, double maxPoints) { | ||
- | assume exists //exams/exam[id]; # implicitly true in OO implementations | ||
- | assume not exists //exams/exam[id]/tasks/task[taskId]; | ||
- | |||
- | assume maxPoints >= 0; | ||
- | | ||
- | insert //exams/exam[id]/tasks <task id=[taskId] maxPoints=[maxPoints] />; | ||
- | } | ||
- | </code> | ||