Rev 11296 | Go to most recent revision | 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 |
7638 | bpr | 4 | |
20 | reyssat | 5 | percnt=!linecnt $percents |
9719 | bpr | 6 | !distribute items 0,0 into per,av |
20 | reyssat | 7 | |
7612 | bpr | 8 | !! w_$i etc are defined in sheetweights |
9719 | bpr | 9 | !! give an average for all sheets and for the user $uu - even not seen in sequences ?? |
7664 | bpr | 10 | |
20 | reyssat | 11 | !for i=1 to $percnt |
12555 | bpr | 12 | !if $(f_$i)=$empty or $(w_$i)=$empty |
13 | !read adm/class/sheetweights |
||
14 | !endif |
||
15 | perc=!line $i of $percents |
||
16 | !distribute words $perc into p1,p2,p3,p4 |
||
17 | !if $p2!=$empty and $(w_$i)!=$empty |
||
18 | !distribute item $[$p1/100],$[$p2/10],$[$p3/100],$[$p4/100] into x0_,y_,x1_,x2_ |
||
19 | !set ff_$i=!mathsubst Q=$y_ in $(f_$i) |
||
20 | !for sev=0 to 2 |
||
21 | !set ff_$i=!mathsubst I$sev=$(x$(sev)_) in $(ff_$i) |
||
22 | !next |
||
23 | per=$[$per+($(w_$i))*$(ff_$i)] |
||
24 | !endif |
||
20 | reyssat | 25 | !next i |
26 | |||
27 | examout=!examscore user=$uu |
||
2733 | guerimand | 28 | |
20 | reyssat | 29 | !for i in $activexams |
11281 | bpr | 30 | es_$i=!line 1 of $examout |
31 | es__$i=!word $i of $(es_$i) |
||
11296 | bpr | 32 | !!it happens that es__$i is empty, so we calculate per with 0 instead |
11281 | bpr | 33 | es_$i=$(es__$i) |
34 | !default es_$i=0 |
||
12555 | bpr | 35 | per=$[$per+$(ew_$i)*$(es_$i)/10] |
36 | es_$i=$(es__$i) |
||
20 | reyssat | 37 | !next i |
38 | |||
39 | !if $totweight>0 |
||
12555 | bpr | 40 | per=$[rint($scoremax*100*$per/$totweight)/100] |
20 | reyssat | 41 | !else |
12555 | bpr | 42 | per=0 |
20 | reyssat | 43 | !endif |