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