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 revisionPrevious revision
Next revision
Previous revision
stats:proc:removeparticipant [2011/09/29 19:25] – Patrick Michelstats:proc:removeparticipant [2013/07/10 12:34] (current) – external edit 127.0.0.1
Line 3: Line 3:
 <code xcend> <code xcend>
 removeParticipant(ident uid, ident id, ident studentId) { removeParticipant(ident uid, ident id, ident studentId) {
-  assume exists //accounts/account[uid]/examiner[id];+  assume exists /account[uid]/student && /account[uid]/student/id = studentId && /exam[id]/free 
 +      || exists /account[uid]/examiner[id];
  
-  assume exists //exams/exam[id]/results/participant[studentId]; # implies the exam exists, which is implicitly true anyway+  assume exists /exam[id]/participant[studentId]; # implies the exam exists, which is implicitly true anyway
  
-  remove //exams/exam[id]/results/participant[studentId];+  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.1317317107.txt.gz · Last modified: by Patrick Michel

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki