Rev 12555 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
20 | reyssat | 1 | !default uu=$wims_read_parm |
9900 | bpr | 2 | !!one line by sheet : points quality best level |
20 | reyssat | 3 | percents=!getscorepercent user=$uu |
13711 | bpr | 4 | !if $showsheet=$empty |
5 | shlist=$activesh |
||
6 | exlist=$activexams |
||
7 | !else |
||
8 | shlist=$showsheet |
||
9 | shlist=!listintersect $activesh and $shlist |
||
10 | exlist=!items2lines $showsheet |
||
11 | exlist=!replace internal E by E, in $exlist |
||
12 | exlist=!select $exlist where column 1=E |
||
13 | exlist=$(exlist[;2]) |
||
14 | exlist=!listintersect $activexams and $exlist |
||
15 | !endif |
||
7638 | bpr | 16 | |
9719 | bpr | 17 | !distribute items 0,0 into per,av |
20 | reyssat | 18 | |
7612 | bpr | 19 | !! w_$i etc are defined in sheetweights |
13711 | bpr | 20 | !! give an average for all active sheets (or in showsheet) and for the user $uu |
21 | !! - even not seen in sequences ?? |
||
7664 | bpr | 22 | |
13711 | bpr | 23 | !for i in $shlist |
24 | !if $(f_$i)=$empty or $(w_$i)=$empty |
||
12555 | bpr | 25 | !read adm/class/sheetweights |
26 | !endif |
||
27 | perc=!line $i of $percents |
||
28 | !distribute words $perc into p1,p2,p3,p4 |
||
29 | !if $p2!=$empty and $(w_$i)!=$empty |
||
30 | !distribute item $[$p1/100],$[$p2/10],$[$p3/100],$[$p4/100] into x0_,y_,x1_,x2_ |
||
31 | !set ff_$i=!mathsubst Q=$y_ in $(f_$i) |
||
32 | !for sev=0 to 2 |
||
33 | !set ff_$i=!mathsubst I$sev=$(x$(sev)_) in $(ff_$i) |
||
34 | !next |
||
35 | per=$[$per+($(w_$i))*$(ff_$i)] |
||
36 | !endif |
||
20 | reyssat | 37 | !next i |
13711 | bpr | 38 | !if $showsheet!=$empty |
39 | totweight=0 |
||
40 | !for i in $shlist |
||
41 | !set totweight=$[$totweight+$(w_$i)] |
||
42 | !next i |
||
43 | !endif |
||
20 | reyssat | 44 | |
45 | examout=!examscore user=$uu |
||
2733 | guerimand | 46 | |
13711 | bpr | 47 | !for i in $exlist |
11281 | bpr | 48 | es_$i=!line 1 of $examout |
49 | es__$i=!word $i of $(es_$i) |
||
11296 | bpr | 50 | !!it happens that es__$i is empty, so we calculate per with 0 instead |
11281 | bpr | 51 | es_$i=$(es__$i) |
52 | !default es_$i=0 |
||
12555 | bpr | 53 | per=$[$per+$(ew_$i)*$(es_$i)/10] |
54 | es_$i=$(es__$i) |
||
13711 | bpr | 55 | !if $showsheet!=$empty |
56 | !set totweight=$[$totweight+$(ew_$i)] |
||
57 | !endif |
||
20 | reyssat | 58 | !next i |
59 | |||
60 | !if $totweight>0 |
||
12555 | bpr | 61 | per=$[rint($scoremax*100*$per/$totweight)/100] |
20 | reyssat | 62 | !else |
12555 | bpr | 63 | per=0 |
20 | reyssat | 64 | !endif |