This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
stats:proc:createexam [2011/09/29 11:49] Patrick Michel |
stats:proc:createexam [2013/07/10 12:42] (current) |
||
---|---|---|---|
Line 2: | Line 2: | ||
<code xcend> | <code xcend> | ||
- | createExam(ident id, string title, string date, string time, string location) { | + | createExam(ident uid, ident id, ident eid, string title, string date, string time, string location) { |
- | assume not exists //exams/exam[id]; | + | assume exists /account[uid]/admin; |
+ | |||
+ | assume not exists /exam[id]; | ||
+ | assume exists /exercise[eid]; | ||
| | ||
- | insert //exams | + | insert / |
- | <exam id=[id] title=[title] date=[date] time=[time] location=[location] > | + | <exam id=[id] title=[title] date=[date] time=[time] location=[location] free=[false] published=[false] exercise=[eid] /> |
- | <tasks /> | + | } |
- | <grades /> | + | |
- | <results /> | + | |
- | </exam>; | + | |
- | } # roles: admin | + | |
</code> | </code> | ||