User Tools

Site Tools


stats:proc:removeparticipant

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
stats:proc:removeparticipant [2011/09/29 00:26]
Patrick Michel
stats:proc:removeparticipant [2013/07/10 12:34] (current)
Line 2: Line 2:
  
 <code xcend> <code xcend>
-removeParticipant(ident id, ident studentId) { +removeParticipant(ident uid, ident id, ident studentId) { 
-  assume exists //exams/exam[id]/results/participant[studentId]; # implies the exam exists, which is implicitly true anyway+  assume exists /account[uid]/student && /​account[uid]/​student/​id = studentId && ​/exam[id]/free 
 +      || exists ​/account[uid]/​examiner[id];
  
-  ​remove ​//exams/exam[id]/results/​participant[studentId];​ +  ​assume exists ​/exam[id]/participant[studentId];​ # implies the exam exists, which is implicitly true anyway 
-roles: examiner[id]+ 
 +  assume size(/​exam[id]/​participant[studentId]/result) = 0; # don't allow to remove if results are there 
 + 
 +  remove /exam[id]/​participant[studentId];​ 
 +}
 </​code>​ </​code>​
  
stats/proc/removeparticipant.1317248798.txt.gz · Last modified: 2011/09/29 00:26 by Patrick Michel