Subversion Repositories wimsdev

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
23 reyssat 1
!if $wims_user!=supervisor
2
 error=not_supervisor
3
 !exit
4
!endif
5
 
6
ucnt=!recordcnt wimshome/log/classes/$wims_class/.userlist
7
!reset ulist,flist,llist,uulist
8
!for i=1 to $ucnt
9
 u_=!record $i of wimshome/log/classes/$wims_class/.userlist
10
 !distribute item $u_ into l_,f_,n_
11
 ulist=!append item $n_ to $ulist
12
 flist=!append item $f_ to $flist
13
 llist=!append item $l_ to $llist
14
!next i
15
 
16
uucnt=!recordcnt wimshome/log/classes/$wims_class/.grades
17
!if $uucnt>0
18
 uucnt=$[$uucnt-1]
19
!endif
20
!for i=1 to $uucnt
21
 u_=!record $i+1 of wimshome/log/classes/$wims_class/.grades
22
 n_=!item 1 of $u_
23
 uulist=!append item $n_ to $uulist
24
!next i
25
 
26
gr=!record 1 of wimshome/log/classes/$wims_class/.grades
27
gr=!trim $gr
28
!distribute lines $gr into percent,titles,weights
29
titles=!item 3 to -1 of $titles
30
weights=!item 3 to -1 of $weights
31
gcnt=!itemcnt $titles
32
!default percent=0
33
 
34
wtot=0
35
!for i=1 to $gcnt
36
 w_=!item $i of $weights
37
 !bound w_ between 0 and 1000 default 1
38
 wtot=$[$wtot+$w_]
39
!next i
40
 
41
m=!record 0 of wimshome/log/classes/$wims_class/sheets/.severity
42
maxscore=!word 1 of $m
43
!bound maxscore between 0 and 100000 default 10
44