User Tools

Site Tools


stats:proc:deleteexam

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:deleteexam [2011/10/02 10:37]
Patrick Michel
stats:proc:deleteexam [2013/07/10 12:34] (current)
Line 3: Line 3:
 <code xcend> <code xcend>
 deleteExam(ident uid, ident id) { deleteExam(ident uid, ident id) {
-  assume exists ​//accounts/​account[uid]/​admin;​+  assume exists /​account[uid]/​admin;​
  
-  assume exists ​//exams/exam[id];+  assume exists /exam[id];
   ​   ​
-  assume size(//​acounts/​account/​examiner[id]) = 0;+  assume size(/exam[id]/examiner) = 0;
  
-  assume size(//exams/exam[id]/results/​participant) = 0; # don't allow to delete if participants are there+  assume size(/​exam[id]/​participant) = 0; # don't allow to delete if participants are there
    
-  remove ​//exams/exam[id];+  remove /exam[id];
 } }
 </​code>​ </​code>​
  
stats/proc/deleteexam.1317544661.txt.gz ยท Last modified: 2011/10/02 10:37 by Patrick Michel