Rev 17149 | Rev 17151 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 17149 | Rev 17150 | ||
---|---|---|---|
Line 34... | Line 34... | ||
34 | dtsh=!record $sh of wimshome/log/classes/$wims_class/sheets/.sheets |
34 | dtsh=!record $sh of wimshome/log/classes/$wims_class/sheets/.sheets |
35 | stat=!line 1 of $dtsh |
35 | stat=!line 1 of $dtsh |
36 | !if $stat!=0 |
36 | !if $stat!=0 |
37 | nbexo=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheet$sh |
37 | nbexo=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheet$sh |
38 | average=!values 0 for v=1 to $nbexo |
38 | average=!values 0 for v=1 to $nbexo |
- | 39 | count=$average |
|
39 | max=$average |
40 | max=$average |
- | 41 | average2=$average |
|
40 | lsev=!line $[$sh+1] of $severity |
42 | lsev=!line $[$sh+1] of $severity |
41 | !distribute word $lsev into swei,rule,indic |
43 | !distribute word $lsev into swei,rule,indic |
42 | formula=!item $rule of $formulas |
44 | formula=!item $rule of $formulas |
43 | wei=!getscoreweight user=$user sheet=$sh |
45 | wei=!getscoreweight user=$user sheet=$sh |
44 | wei=!words2items $wei |
46 | wei=!words2items $wei |
Line 55... | Line 57... | ||
55 | !else |
57 | !else |
56 | li=!getscorelevel user=$dtu sheet=$sh |
58 | li=!getscorelevel user=$dtu sheet=$sh |
57 | !endif |
59 | !endif |
58 | !endif |
60 | !endif |
59 | !!calcul du score pour chaque exo |
61 | !!calcul du score pour chaque exo |
60 | !reset lave lmax |
62 | !reset lave lmax lcount lave2 |
61 | !for k=1 to $nbexo |
63 | !for k=1 to $nbexo |
62 | ewei=!word $k of $wei |
64 | ewei=!word $k of $wei |
63 | elq=!word $k of $lq |
65 | elq=!word $k of $lq |
64 | eli=!word $k of $li |
66 | eli=!word $k of $li |
65 | ave=!replace internal I by $[$eli/10] in $formula |
67 | ave=!replace internal I by $[$eli/10] in $formula |
66 | ave=!replace internal Q by $[$elq/10] in $ave |
68 | ave=!replace internal Q by $[$elq/10] in $ave |
67 | ave=$[rint($ave*1000)] |
69 | ave=$[rint($ave*1000)] |
68 | !if $dtu=$user |
70 | !if $dtu=$user |
69 | useraverage=!append item $ave to $useraverage |
71 | useraverage=!append item $ave to $useraverage |
- | 72 | !endif |
|
- | 73 | try=!getscorealltries user=$dtu sheet=$sh work=$k |
|
- | 74 | !if $try>0 |
|
- | 75 | ave2=$[$(ave)+$(average2[$k])] |
|
- | 76 | lave2=!append item $ave2 to $lave2 |
|
- | 77 | cnt=$[$(count[$k])+1] |
|
- | 78 | lcount=!append item $cnt to $lcount |
|
- | 79 | !else |
|
- | 80 | lave2=!append item $(average2[$k]) to $lave2 |
|
- | 81 | lcount=!append item $(count[$k]) to $lcount |
|
70 | !endif |
82 | !endif |
71 | lmax=!append item $[max($ave,$(max[$k]))] to $lmax |
83 | lmax=!append item $[max($ave,$(max[$k]))] to $lmax |
72 | ave=$[$(ave)+$(average[$k])] |
84 | ave=$[$(ave)+$(average[$k])] |
73 | lave=!append item $ave to $lave |
85 | lave=!append item $ave to $lave |
- | 86 | lave=!append item $(average[$k]) to $lave |
|
- | 87 | lcount=!append item $(count[$k]) to $lcount |
|
74 | !next k |
88 | !next k |
- | 89 | count=$lcount |
|
75 | average=$lave |
90 | average=$lave |
- | 91 | average2=$lave2 |
|
76 | max=$lmax |
92 | max=$lmax |
77 | !next dtu |
93 | !next dtu |
78 | !reset tmp tmp2 |
94 | !reset tmp tmp2 |
79 | !if $time2!=yes |
95 | !if $time2!=yes |
80 | tmp=!record $sh of $clsfile |
96 | tmp=!record $sh of $clsfile |
81 | !endif |
97 | !endif |
82 | !for k=1 to $nbexo |
98 | !for k=1 to $nbexo |
83 | !if $time2=yes |
99 | !if $time2=yes |
84 | ave=$[rint($(average[$k])/$nbuser)] |
100 | ave=$[rint($(average[$k])/$nbuser)] |
- | 101 | ave2=$[rint($(average[$k])/$(count[$k]))] |
|
85 | m=$[rint($(max[$k]))] |
102 | m=$[rint($(max[$k]))] |
86 | tmp=!append line $sh $k $ave $m to $tmp |
103 | tmp=!append line $sh $k $ave $m $ave2 to $tmp |
87 | !else |
104 | !else |
88 | ave=!line $k of $tmp |
105 | ave=!line $k of $tmp |
89 | m=!word 4 of $ave |
106 | m=!word 4 of $ave |
- | 107 | ave2=!word 5 of $ave |
|
90 | ave=!word 3 of $ave |
108 | ave=!word 3 of $ave |
91 | !endif |
109 | !endif |
92 | !if $(wei[$k])!=0 and $swei!=0 |
110 | !if $(wei[$k])!=0 and $swei!=0 |
93 | val=$[rint($ave - $(useraverage[$k]))] |
111 | val=$[rint($ave - $(useraverage[$k]))] |
94 | val=$[rint($val * |
112 | val=$[rint($val *$swei * $(wei[$k])/($totwei))] |
95 | !if $val<=0 |
113 | !if $val<=0 |
96 | val=-1000 |
114 | val=-1000 |
97 | !endif |
115 | !endif |
98 | !else |
116 | !else |
99 | !if $swei!=0 |
117 | !if $swei!=0 |
Line 101... | Line 119... | ||
101 | !else |
119 | !else |
102 | val=-10000 |
120 | val=-10000 |
103 | !endif |
121 | !endif |
104 | !endif |
122 | !endif |
105 | m2=$[rint($m-$(useraverage[$k]))] |
123 | m2=$[rint($m-$(useraverage[$k]))] |
106 | !appendfile $ufile :$sh $k $val $m2 $ave $m |
124 | !appendfile $ufile :$sh $k $val $m2 $ave $m $ave2 |
107 | !next k |
125 | !next k |
108 | !if $time2=yes |
126 | !if $time2=yes |
109 | !appendfile $clsfile :$tmp |
127 | !appendfile $clsfile :$tmp |
110 | !endif |
128 | !endif |
111 | !else |
129 | !else |