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 revisionPrevious revision
stats:proc:deleteexam [2011/10/07 14:32] – Patrick Michelstats:proc:deleteexam [2013/07/10 12:34] (current) – external edit 127.0.0.1
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(//exams/exam[id]/examiner) = 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.1317990728.txt.gz · Last modified: by Patrick Michel

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki