User Tools

Site Tools


stats:proc:registerstudent

Differences

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

Link to this comparison view

stats:proc:registerstudent [2011/10/15 19:46]
Patrick Michel
stats:proc:registerstudent [2013/07/10 12:44]
Line 1: Line 1:
-====== Register Student ====== 
  
-<code xcend> 
-registerStudent(ident uid, ident id, ident studentId) { 
-  assume exists //​accounts/​account/​student[studentId];​ 
-  assume exists //​exercises/​exercise[id];​ 
- 
-  assume //​exercises/​exercise[id]/​open && exists //​accounts/​account[uid]/​student && //​accounts/​account[uid]/​student/​id = studentId || 
-         ​exists //​accounts/​account[uid]/​assistant[id];​ # the right management can't come first here 
- 
-  assume not exists //​exercises/​exercise[id]/​students/​student[studentId];​ 
-  ​ 
-  insert //​exercises/​exercise[id]/​students <student id=[studentId] />; 
-} 
-</​code>​ 
stats/proc/registerstudent.txt ยท Last modified: 2013/07/10 12:44 (external edit)