User Tools

Site Tools


stats:proc:grantexaminerrights

Differences

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

Link to this comparison view

stats:proc:grantexaminerrights [2011/09/29 19:31]
Patrick Michel
stats:proc:grantexaminerrights [2013/07/10 12:32]
Line 1: Line 1:
-====== Grant Examiner Rights ====== 
- 
-<code xcend> 
-grantExaminerRights(ident uid, ident username, ident examId) { 
-  assume exists //​accounts/​account[uid]/​admin;​ 
- 
-  assume exists //​accounts/​account[username];​ # implicitly true in OO implementations 
-  assume exists //​exams/​exam[examId];​ 
- 
-  assume not exists //​accounts/​account[username]/​examiner[exam]);​ 
-  assume not exists //​exams/​exam[examId]/​examiner[account]);​ # implied by integrity and the assumption before 
- 
-  insert //​accounts/​account[username] <​examiner exam=[examId] />; 
-  insert //​exams/​exam[examId] <​examiner account=[username] />; 
-} 
-</​code>​ 
- 
- 
  
stats/proc/grantexaminerrights.txt ยท Last modified: 2013/07/10 12:32 (external edit)