User Tools

Site Tools


stats:proc:removeparticipant

Remove Participant

removeParticipant(ident uid, ident id, ident studentId) {
  assume exists /account[uid]/student && /account[uid]/student/id = studentId && /exam[id]/free
      || exists /account[uid]/examiner[id];
 
  assume exists /exam[id]/participant[studentId]; # implies the exam exists, which is implicitly true anyway
 
  assume size(/exam[id]/participant[studentId]/result) = 0; # don't allow to remove if results are there
 
  remove /exam[id]/participant[studentId];
}
stats/proc/removeparticipant.txt · Last modified: 2013/07/10 12:34 (external edit)