User Tools

Site Tools


stats:proc:grantexaminerrights

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:grantexaminerrights [2011/09/29 19:31]
Patrick Michel
stats:proc:grantexaminerrights [2013/07/10 12:32] (current)
Line 3: Line 3:
 <code xcend> <code xcend>
 grantExaminerRights(ident uid, ident username, ident examId) { grantExaminerRights(ident uid, ident username, ident examId) {
-  assume exists ​//accounts/​account[uid]/​admin;​+  assume exists /​account[uid]/​admin;​
  
-  assume exists ​//accounts/​account[username];​ # implicitly true in OO implementations +  assume exists /​account[username];​ # implicitly true in OO implementations 
-  assume exists ​//exams/​exam[examId];​+  assume exists /​exam[examId];​
  
-  assume not exists ​//accounts/​account[username]/​examiner[exam]); +  assume not exists /​account[username]/​examiner[examId]); 
-  assume not exists ​//exams/​exam[examId]/​examiner[account]); # implied by integrity and the assumption before+  assume not exists /​exam[examId]/​examiner[username]); # implied by integrity and the assumption before
  
-  insert ​//accounts/​account[username] <​examiner exam=[examId] />; +  insert /​account[username] <​examiner exam=[examId] />; 
-  insert ​//exams/​exam[examId] <​examiner account=[username] />;+  insert /​exam[examId] <​examiner account=[username] />;
 } }
 </​code>​ </​code>​
stats/proc/grantexaminerrights.1317317501.txt.gz · Last modified: 2011/09/29 19:31 by Patrick Michel