Rev 7638 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7638 | Rev 12555 | ||
---|---|---|---|
Line 8... | Line 8... | ||
8 | !! should be the third word of the result of !getscorepercent |
8 | !! should be the third word of the result of !getscorepercent |
9 | 9 | ||
10 | !distribute items $wims_read_parm into sc_user,sc_class,sc_sheet,sc_exo |
10 | !distribute items $wims_read_parm into sc_user,sc_class,sc_sheet,sc_exo |
11 | !reset script_out script_best script_percent3 |
11 | !reset script_out script_best script_percent3 |
12 | !if $sc_exo!=$empty |
12 | !if $sc_exo!=$empty |
13 |
|
13 | !set script_out=!sh export exostat_dirbase exostat_types exostat_classes exostat_user exostat_sheet\ |
14 | exostat_dirbase=$wims_home/log/classes\ |
14 | exostat_dirbase=$wims_home/log/classes\ |
15 | exostat_types="score"\ |
15 | exostat_types="score"\ |
16 | exostat_classes="$sc_class"\ |
16 | exostat_classes="$sc_class"\ |
17 | exostat_user="$sc_user"\ |
17 | exostat_user="$sc_user"\ |
18 | exostat_sheet="$sc_sheet"\ |
18 | exostat_sheet="$sc_sheet"\ |
19 | $wims_home/bin/exostat |
19 | $wims_home/bin/exostat |
20 |
|
20 | !set sc_best_=!getopt $(sc_sheet)_$(sc_exo) in $script_out |
21 |
|
21 | !set sc_best_=!nonempty items $(sc_best_[2;]) |
22 |
|
22 | !set sc_best_=!sort reverse numeric items $sc_best_ |
23 |
|
23 | !if $sc_best_!=$empty |
24 |
|
24 | !set sc_req=!getscorerequire sheet=$sc_sheet exo=$(sc_exo) |
25 |
|
25 | !set sc_req=$[ceil(min(10,$sc_req/10))] |
26 |
|
26 | !set sc_best=!replace internal , by + in $(sc_best_[1..$sc_req]) |
27 |
|
27 | !set script_best=$[$sc_best] |
28 |
|
28 | !endif |
29 | !goto end |
29 | !goto end |
30 | !endif |
30 | !endif |
31 | 31 | ||
32 | !if $sc_sheet!=$empty |
32 | !if $sc_sheet!=$empty |
33 | 33 | ||
34 | !reset script_out |
34 | !reset script_out |
35 | !set sc_sheet=!words2items $sc_sheet |
35 | !set sc_sheet=!words2items $sc_sheet |
Line 44... | Line 44... | ||
44 | exostat_user="$sc_user"\ |
44 | exostat_user="$sc_user"\ |
45 | exostat_sheet="$sc_sh"\ |
45 | exostat_sheet="$sc_sh"\ |
46 | $wims_home/bin/exostat |
46 | $wims_home/bin/exostat |
47 | 47 | ||
48 | !if $script_out!=$empty |
48 | !if $script_out!=$empty |
49 | !set script_p3=0 |
49 | !set script_p3=0 |
50 | !set sc_wg=0 |
50 | !set sc_wg=0 |
51 | !set sc_require=!getscorerequire sheet=$sc_sh |
51 | !set sc_require=!getscorerequire sheet=$sc_sh |
52 | !set sc_weight=!getscoreweight sheet=$sc_sh |
52 | !set sc_weight=!getscoreweight sheet=$sc_sh |
53 | !set sc_d=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheet$sc_sh |
53 | !set sc_d=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheet$sc_sh |
54 | !reset script_best |
54 | !reset script_best |
55 | !for sc_ex=1 to $sc_d |
55 | !for sc_ex=1 to $sc_d |
56 | !set sc_best_=!getopt $(sc_sh)_$(sc_ex) in $script_out |
56 | !set sc_best_=!getopt $(sc_sh)_$(sc_ex) in $script_out |
57 | !set sc_best_=!nonempty items $(sc_best_[2;]) |
57 | !set sc_best_=!nonempty items $(sc_best_[2;]) |
58 | !set sc_best_=!sort reverse numeric items $sc_best_ |
58 | !set sc_best_=!sort reverse numeric items $sc_best_ |
59 | !if $sc_best_!=$empty |
59 | !if $sc_best_!=$empty |
60 | !set sc_req=!word $(sc_ex) of $sc_require |
60 | !set sc_req=!word $(sc_ex) of $sc_require |
61 | !set sc_req=$[ceil(min(10,$sc_req/10))] |
61 | !set sc_req=$[ceil(min(10,$sc_req/10))] |
62 | !set sc_best_=!replace internal , by + in $(sc_best_[1..$sc_req]) |
62 | !set sc_best_=!replace internal , by + in $(sc_best_[1..$sc_req]) |
63 | !set sc_best_=$[round(10*($sc_best_)/$sc_req)/10] |
63 | !set sc_best_=$[round(10*($sc_best_)/$sc_req)/10] |
64 | !set sc_w=!word $(sc_ex) of $sc_weight |
64 | !set sc_w=!word $(sc_ex) of $sc_weight |
65 | !set sc_wg=$[$sc_wg + $sc_w] |
65 | !set sc_wg=$[$sc_wg + $sc_w] |
66 | !set script_p3=$script_p3 + $sc_w*$sc_best_ |
66 | !set script_p3=$script_p3 + $sc_w*$sc_best_ |
67 | !endif |
67 | !endif |
68 | !!leave the empty items |
68 | !!leave the empty items |
69 | !set sc_best=$sc_best$sc_best_, |
69 | !set sc_best=$sc_best$sc_best_, |
70 | !next exo |
70 | !next exo |
71 | 71 | ||
72 | !set script_best=!append line $sc_best to $script_best |
72 | !set script_best=!append line $sc_best to $script_best |
73 | !set script_percent3=!append line $[ceil(100*($script_p3)/$sc_wg)/1000] to $script_percent3\ |
73 | !set script_percent3=!append line $[ceil(100*($script_p3)/$sc_wg)/1000] to $script_percent3\ |
74 | !set script_out=!append line $script_out_ to $script_out |
74 | !set script_out=!append line $script_out_ to $script_out |
75 |
|
75 | !else |
76 |
|
76 | !set script_best=!append line 0 to $script_best |
77 | !set script_percent3=!append line 0 to $script_percent3 |
77 | !set script_percent3=!append line 0 to $script_percent3 |
78 | !endif |
78 | !endif |
79 | !next sheet |
79 | !next sheet |
80 | !endif |
80 | !endif |
81 | :end |
81 | :end |
82 | - |