Rev 12551 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
9206 | bpr | 1 | # Variables used: defaultformula in adm/class/userscore/var.proc |
8674 | bpr | 2 | !! defaultformula in wimshome/log/classes/$wims_class/sheets/.severity |
7612 | bpr | 3 | |
8528 | bpr | 4 | !! Output variables: |
5 | !! |
||
6 | !! f_$i: formula of sheet $i. |
||
7 | !! w_$i: weight of sheet $i. |
||
8 | !! totweight: total sum of weights. |
||
20 | reyssat | 9 | |
8528 | bpr | 10 | !set totweight=0 |
11 | !set totsheets=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheets |
||
12 | !set totexams=!recordcnt wimshome/log/classes/$wims_class/exams/.exams |
||
13 | !set examweights=!record 0 of wimshome/log/classes/$wims_class/exams/.eseverity |
||
14 | !set formula_list=!record 0 of adm/class/sheetformula |
||
10922 | bpr | 15 | !set tmp=!defof DF_SEVERITY in wimshome/public_html/bases/sys/define.conf |
11105 | bpr | 16 | !distribute words $tmp into tmp_w,tmp_s,tmp_ss |
8674 | bpr | 17 | !for i_=1 to $totsheets |
12551 | bpr | 18 | !set f_=!line $i_ of $defaultformula |
19 | !distribute word $f_ into w_$i_,s,ss |
||
20 | !bound w_$i_ between integer 0 and 100000 default $tmp_w |
||
21 | !bound s between integer 0 and 6 default $tmp_s |
||
22 | !bound ss between integer 0 and 2 default $tmp_ss |
||
23 | !! f_$i_=!line $s+1 of max($$x$(ss)_,$$y_)\ |
||
24 | $$x$(ss)_\ |
||
25 | $$x$(ss)_*$$y_^0.3\ |
||
26 | $$x$(ss)_*$$y_^0.5\ |
||
27 | $$x$(ss)_*$$y_\ |
||
28 | $$x$(ss)_^2*$$y_\ |
||
29 | ($$x$(ss)_*$$y_)^2 |
||
7664 | bpr | 30 | |
12551 | bpr | 31 | !set f_$i_=!record 0 of adm/class/sheetformula |
32 | !set f_$i_=!item $s+1 of $(f_$i_) |
||
33 | !set f_$i_=!replace internal I by I$ss in $(f_$i_) |
||
13709 | bpr | 34 | !if $i_ isitemof $activesh |
35 | !set totweight=$[$totweight+$(w_$i_)] |
||
36 | !endif |
||
12551 | bpr | 37 | !set s_$i_=$s |
38 | !set ss_$i_=$ss |
||
8674 | bpr | 39 | !next i_ |
20 | reyssat | 40 | |
8674 | bpr | 41 | !for i_=1 to $totexams |
12551 | bpr | 42 | !set ew_$i_=!line $i_ of $examweights |
43 | !default ew_$i_=1 |
||
44 | !if $i_ isitemof $activexams |
||
45 | !set totweight=$[$totweight+$(ew_$i_)] |
||
46 | !endif |
||
8674 | bpr | 47 | !next i_ |
11105 | bpr | 48 | |
49 | !reset tmp tmp_s tmp_ss tmp_w |