Subversion Repositories wimsdev

Rev

Rev 8306 | Rev 12465 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
23 reyssat 1
!set ash=$activesh
2
!for i=1 to $eactivecnt
3
  tt=!item $i of $activexams
4
  ash=!append item E$tt to $ash
5
!next i
6
 
7
!for j in $ash
8
 !distribute item 0,0,0,100000 into cnt_$j,per_$j,max_$j,min_$j
9
!next j
10
 
11
!distribute item 0,0,0 into mean_tea,mean_auto,mean_glob
12
!distribute item 0,0,0 into tea_cnt,auto_cnt, glob_cnt
13
!distribute item 0,0,0 into max_tea,max_auto,max_glob
14
!distribute item 100000,100000,100000 into min_tea,min_auto,min_glob
15
!for i=1 to $usercnt
16
 uu=!record $i of wimshome/log/classes/$wims_class/.userlist
17
 uu=!item 3 of $uu
2936 guerimand 18
 !read adm/class/userscore
23 reyssat 19
 mean_auto=$[$mean_auto+$per]
20
 !if $per>0
21
  max_auto=$[max($max_auto,$per)]
22
  min_auto=$[min($min_auto,$per)]
23
  !advance auto_cnt
24
 !endif
25
 !if $manual>0
7664 bpr 26
  !default manual_$uu=0
23 reyssat 27
  glob=$[rint($manual*$(manual_$uu)+(100-$manual)*($per))/100]
28
  !distribute item $[$mean_glob+$glob],$[$mean_tea+$(manual_$uu)] into mean_glob,mean_tea
29
  !if $(manual_$uu)>0
30
   !distribute item $[max($max_tea,$(manual_$uu))],\
31
	$[min($min_tea,$(manual_$uu))] into max_tea,min_tea
32
   !advance tea_cnt
33
  !endif
34
  !if $glob>0
35
   !distribute item $[max($max_glob,$glob)],$[min($min_glob,$glob)] into\
36
	max_glob,min_glob
37
  !endif
38
 !endif
39
 !if $per>0 or ($manual>0 and $(manual_$uu)>0)
40
  !advance glob_cnt
41
 !endif
42
 !for j in $ash
43
   !if E isin $j
44
    k=!char 2 to -1 of $j
45
    p_=$[rint(10*$scoremax*$(es_$k))/100]
46
   !else
47
    p_=!line $j of $percents
7664 bpr 48
    !distribute words $p_ into p1,p2,p3,p4
23 reyssat 49
    !if $p2!=$empty
7664 bpr 50
     !distribute item $[$p1/100],$[$p2/10],$[$p3/100],$[$p4/100] into x0_,y_,x1_,x2_
51
     !set ff_$j=!mathsubst Q=$y_ in $(f_$j)
52
     !for sev=0 to 2
53
       !set ff_$j=!mathsubst I$sev=$(x$(sev)_) in $(ff_$j)
54
     !next
55
     p_=$[ceil(100*$scoremax*$(ff_$j))/100]
23 reyssat 56
    !else
57
     p_=0
58
    !endif
59
   !endif
60
   per_$j=$[$(per_$j)+$p_]
61
   !if $p_>0
62
    min_$j=$[min($(min_$j),$p_)]
63
    max_$j=$[max($(max_$j),$p_)]
64
    !advance cnt_$j
65
   !endif
66
 !next j
67
!next i
68
!if $manual<1
69
  !distribute item $mean_auto,$max_auto,$min_auto,$auto_cnt into\
70
	mean_glob,max_glob,min_glob,glob_cnt
71
!endif
72
 
73
!distribute item $[rint(100*$mean_auto/max(1,$auto_cnt))/100],\
74
	$[rint(100*$mean_tea/max(1,$tea_cnt))/100],\
75
	$[rint(100*$mean_glob/max(1,$glob_cnt))/100]\
76
	into mean_auto,mean_tea,mean_glob
77
 
78
t=!translate = to , in $wims_req_time
79
t=!item -1 of $t
80
means=$t\
81
$min_auto $mean_auto $max_auto $min_tea $mean_tea $max_tea $min_glob $mean_glob $max_glob
82
 
83
!for j in $ash
84
 pp=$[rint(100*$(per_$j)/max(1,$(cnt_$j)))/100]
85
 means=!append line $j $(min_$j) $pp $(max_$j) to $means
86
!next j
87
 
88
!writefile wimshome/log/classes/$wims_class/scoreavg $means
89