User Tools

Site Tools


stats:proc:removestudentid

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
stats:proc:removestudentid [2012/05/15 14:36] – Patrick Michelstats:proc:removestudentid [2013/07/10 12:34] (current) – external edit 127.0.0.1
Line 3: Line 3:
 <code xcend> <code xcend>
 removeStudentId(ident uid, ident username) { removeStudentId(ident uid, ident username) {
-  assume exists //accounts/account[uid]/admin;+  assume exists /account[uid]/admin;
  
-  assume exists //accounts/account[username]/student; # implies the account exists, which is implicitly true anyway+  assume exists /account[username]/student; # implies the account exists, which is implicitly true anyway
  
-  assume size(//exercises/exercise/students/student[//accounts/account[username]/student/id]) = 0; +  assume size(/exercise/student[/account[username]/student/id]) = 0; 
-  assume size(//exams/exam/results/participant[//accounts/account[username]/student/id]) = 0;+  assume size(/exam/participant[/account[username]/student/id]) = 0;
  
-  remove //accounts/account[username]/student;+  remove /account[username]/student;
 } }
 </code> </code>
  
stats/proc/removestudentid.1337085362.txt.gz · Last modified: by Patrick Michel

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki