Rev 7612 | Rev 8528 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7612 | Rev 7664 | ||
---|---|---|---|
Line 1... | Line -... | ||
1 | # Variables x_ y_ z_ are defined before |
- | |
- | 1 | ||
2 | # Variables used: defaultformula in adm/class/userlist/var.proc |
2 | # Variables used: defaultformula in adm/class/userlist/var.proc |
3 | # |
3 | # defaultformula in wimshome/log/classes/$wims_class/sheets/.severity |
4 | 4 | ||
5 | # Output variables: |
5 | # Output variables: |
6 | # |
6 | # |
7 | # f_$i: formula of sheet $i. |
7 | # f_$i: formula of sheet $i. |
8 | # w_$i: weight of sheet $i. |
8 | # w_$i: weight of sheet $i. |
9 | # s_$i: severity of $sheet $i. |
- | |
10 | # totweight: total sum of weights. |
9 | # totweight: total sum of weights. |
11 | # this formula must be calculated on some variables x_ and y_ or z_ |
- | |
12 | 10 | ||
13 | totweight=0 |
11 | totweight=0 |
14 | totsheets=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheets |
12 | totsheets=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheets |
15 | totexams=!recordcnt wimshome/log/classes/$wims_class/exams/.exams |
13 | totexams=!recordcnt wimshome/log/classes/$wims_class/exams/.exams |
16 | examweights=!record 0 of wimshome/log/classes/$wims_class/exams/.eseverity |
14 | examweights=!record 0 of wimshome/log/classes/$wims_class/exams/.eseverity |
- | 15 | formula_list=!record 0 of adm/class/sheetformula |
|
17 | !for i=1 to $totsheets |
16 | !for i=1 to $totsheets |
18 | f_=!line $i of $defaultformula |
17 | f_=!line $i of $defaultformula |
19 | !distribute word $f_ into |
18 | !distribute word $f_ into w_$i,s,ss |
20 | !default w_$i=1 |
19 | !default w_$i=1 |
21 | !bound s between integer 0 and |
20 | !bound s between integer 0 and 6 default 2 |
- | 21 | !bound ss between integer 0 and 2 default 0 |
|
22 |
|
22 | !! f_$i=!line $s+1 of max($$x$(ss)_,$$y_)\ |
23 |
|
23 | $$x$(ss)_\ |
24 |
|
24 | $$x$(ss)_*$$y_^0.3\ |
25 |
|
25 | $$x$(ss)_*$$y_^0.5\ |
26 |
|
26 | $$x$(ss)_*$$y_\ |
27 |
|
27 | $$x$(ss)_^2*$$y_\ |
28 | ( |
28 | ($$x$(ss)_*$$y_)^2 |
29 | max($$z_,$$y_)\ |
- | |
30 | $$z_\ |
29 | |
31 | $$z_*$$y_^0.3\ |
- | |
32 |
|
30 | f_$i=!record 0 of adm/class/sheetformula |
33 | $$z_*$$y_\ |
- | |
34 |
|
31 | f_$i=!item $s+1 of $(f_$i) |
35 | ( |
32 | f_$i=!replace internal I by I$ss in $(f_$i) |
36 | !if $i isitemof $activesh |
33 | !if $i isitemof $activesh |
37 | totweight=$[$totweight+$(w_$i)] |
34 | totweight=$[$totweight+$(w_$i)] |
38 | !endif |
35 | !endif |
39 | s_$i=$s |
36 | s_$i=$s |
- | 37 | ss_$i=$ss |
|
40 | !next i |
38 | !next i |
41 | 39 | ||
42 | !for i=1 to $totexams |
40 | !for i=1 to $totexams |
43 | ew_$i=!line $i of $examweights |
41 | ew_$i=!line $i of $examweights |
44 | !default ew_$i=1 |
42 | !default ew_$i=1 |