Rev 4849 | Rev 11171 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
20 | reyssat | 1 | |
2 | good=!singlespace $(replygood$i) |
||
3 | good=!trim $good |
||
4 | good=!rows2lines $good |
||
5 | good=!line 1 of $good |
||
6 | good=!translate | to $\ |
||
7 | $ in $good |
||
8 | good=!nonempty lines $good |
||
9 | replyGood$i=!line 1 of $good |
||
10 | replyGood$i=!items2words $(replyGood$i) |
||
11 | dd=$(reply$i) |
||
12 | |||
13 | !if r$i notitemof $thisstep |
||
14 | !goto nocheck |
||
15 | !endif |
||
16 | |||
17 | !if $i notitemof $fill_checked |
||
18 | fill_checked=!append item $i to $fill_checked |
||
19 | dd2= |
||
20 | !for d_ in $dd |
||
21 | !if $d_ isitemof $fill_check |
||
22 | dd2=!append item $d_ to $dd2 |
||
23 | !if $(replytype$i)=dragfill |
||
24 | pos=!positionof item $d_ in $fill_check |
||
25 | pos=!item 1 of $pos |
||
26 | !if $pos!=$empty |
||
27 | fill_check=!replace item number $pos by $ in $fill_check |
||
28 | !endif |
||
29 | !endif |
||
30 | !else |
||
7139 | bpr | 31 | !set default_$i= !replace internal   by in $(default_$i) |
32 | dd2=!append item $(default_$i) to $dd2 |
||
20 | reyssat | 33 | !endif |
34 | !next d_ |
||
35 | dd=$dd2 |
||
36 | !if $(replytype$i)=dragfill |
||
37 | fill_check=!nonempty items $fill_check |
||
38 | !endif |
||
39 | !endif |
||
40 | |||
41 | :nocheck |
||
42 | reply$i=$dd |
||
43 | m_reply$i=$dd |
||
44 | reply_$i=!items2words $dd |
||
45 | |||
46 | !if $wims_read_parm=nocompare |
||
47 | !exit |
||
48 | !endif |
||
49 | |||
50 | !if $good=$empty |
||
51 | Test=bad $i |
||
52 | !exit |
||
53 | !endif |
||
54 | |||
55 | diag= |
||
4849 | bpr | 56 | diaratio=-1 |
20 | reyssat | 57 | t_=!linecnt $good |
58 | good=!replace internal , $ by , in $good |
||
59 | dd=!replace internal , $ by , in $dd |
||
1802 | bpr | 60 | ddo=!sort items $dd |
20 | reyssat | 61 | !for n=1 to $t_ |
62 | g=!line $n of $good |
||
63 | g=!trim $g |
||
64 | !if $dd issametext $g |
||
65 | diag=yes |
||
66 | !endif |
||
1802 | bpr | 67 | !if noorder iswordof $(replyoption$i) |
68 | go=!sort items $g |
||
69 | !if $ddo issametext $go |
||
70 | diag=yes |
||
71 | !endif |
||
4849 | bpr | 72 | !if $diag notwordof yes and (split iswordof $(replyoption$i) or partialscore iswordof $(replyoption$i)) |
73 | !! nombre de reponses |
||
74 | poscnt1=!itemcnt $ddo |
||
75 | lint=!listintersect $ddo and $go |
||
76 | !! nombre de bonnes reponses |
||
77 | poscnt2=!itemcnt $lint |
||
78 | !! nombre demandé de bonnes réponses |
||
79 | poscnt3=!itemcnt $go |
||
80 | !if eqweight iswordof $(replyoption$i) |
||
81 | diaratio_=$[2*$poscnt2 - $poscnt1] |
||
82 | !else |
||
83 | diaratio_=$[3*$poscnt2 - 2*$poscnt1] |
||
84 | !endif |
||
85 | !if $diaratio_ > 0 |
||
86 | diaratio=$[max($diaratio,$[$diaratio_/max($poscnt3,1)])] |
||
7139 | bpr | 87 | !endif |
4849 | bpr | 88 | !endif split |
89 | !endif noorder |
||
20 | reyssat | 90 | !next n |
7139 | bpr | 91 | |
20 | reyssat | 92 | !if $diag=yes |
93 | diareply$i=good |
||
94 | !advance freegot |
||
95 | !else |
||
4849 | bpr | 96 | !if $diaratio > 0 and (split iswordof $(replyoption$i) or partialscore iswordof $(replyoption$i)) |
97 | diareply$i=good |
||
98 | partialgood$i=yes |
||
99 | freegot=$[$freegot+ max(0,$diaratio)] |
||
100 | !else |
||
101 | diareply$i=bad |
||
102 | !endif |
||
7139 | bpr | 103 | !endif |