User Tools

Site Tools


stats:proc:addresult_task

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
stats:proc:addresult_task [2011/09/29 19:24]
Patrick Michel
stats:proc:addresult_task [2013/07/10 12:34] (current)
Line 3: Line 3:
 <code xcend> <code xcend>
 addResult(ident uid, ident id, ident studentId, ident taskId, double points) { addResult(ident uid, ident id, ident studentId, ident taskId, double points) {
-  assume exists ​//accounts/​account[uid]/​examiner[id];​+  assume exists /​account[uid]/​examiner[id];​
  
-  assume exists ​//exams/exam[id]/results/​participant[studentId];​ # can also be implicitly true in an OO language +  assume exists /​exam[id]/​participant[studentId];​ # can also be implicitly true in an OO language 
-  assume exists ​//exams/exam[id]/tasks/​task[taskId];​+  assume exists /​exam[id]/​task[taskId];​
   ​   ​
-  assume not exists ​//exams/exam[id]/results/​participant[studentId]/​result[taskId];​+  assume not exists /​exam[id]/​participant[studentId]/​result[taskId];​
  
-  assume points >= 0 && points <= //exams/exam[id]/tasks/​task[taskId]/​maxPoints;​+  assume points >= 0 && points <= /​exam[id]/​task[taskId]/​maxPoints;​
  
-  insert ​//exams/exam[id]/results/​participant[studentId] <result task=[taskId] points=[points] />;+  insert /​exam[id]/​participant[studentId] <result task=[taskId] points=[points] />;
 } }
 </​code>​ </​code>​
  
stats/proc/addresult_task.1317317081.txt.gz · Last modified: 2011/09/29 19:24 by Patrick Michel