Rev 16148 | Rev 16618 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 16148 | Rev 16378 | ||
---|---|---|---|
Line 35... | Line 35... | ||
35 | !! -------- reduce file length with only concerned session before wims action |
35 | !! -------- reduce file length with only concerned session before wims action |
36 | tmp_=$empty |
36 | tmp_=$empty |
37 | checksessions=!text select char 0123456789AZERTYUIOPMLKJHGFDSQWXCVBN,azertyuiopmlkjhgfdsqwxcvbn in $checksessions |
37 | checksessions=!text select char 0123456789AZERTYUIOPMLKJHGFDSQWXCVBN,azertyuiopmlkjhgfdsqwxcvbn in $checksessions |
38 | !for k_ in $checksessions |
38 | !for k_ in $checksessions |
39 | tmp_=!append word a["$k_"]=0; to $tmp_ |
39 | tmp_=!append word a["$k_"]=0; to $tmp_ |
- | 40 | !reset ip_$(k_) |
|
40 | !next k_ |
41 | !next k_ |
41 | !sh awk 'BEGIN{$tmp_} {if ($$6 in a || ($$6=="0" && flag==1)){print $$0; flag=1;} else {flag=0};}' $wims_home/log/classes/$wims_class/score/$uu.exam > $wims_home/sessions/$wims_session/tmpuser.exam; |
42 | !sh awk 'BEGIN{$tmp_} {if ($$6 in a || ($$6=="0" && flag==1)){print $$0; flag=1;} else {flag=0};}' $wims_home/log/classes/$wims_class/score/$uu.exam > $wims_home/sessions/$wims_session/tmpuser.exam; |
42 | !! --------------------- |
43 | !! --------------------- |
43 | sc=!record 0 of wimshome/sessions/$wims_session/tmpuser.exam |
44 | sc=!record 0 of wimshome/sessions/$wims_session/tmpuser.exam |
44 | !!sc=!record 0 of wimshome/log/classes/$wims_class/score/$uu.exam |
45 | !!sc=!record 0 of wimshome/log/classes/$wims_class/score/$uu.exam |
45 | !if $sc=$empty |
46 | !if $sc=$empty |
46 | !exit |
47 | !exit |
47 | !endif |
48 | !endif |
48 | nsc=!linecnt $sc |
- | |
49 | 49 | ||
- | 50 | nsc=!linecnt $sc |
|
- | 51 | !reset scorereducedbyip |
|
50 | !for i=1 to $nsc |
52 | !for i=1 to $nsc |
51 | l=!line $i of $sc |
53 | l=!line $i of $sc |
52 | !distribute words $l into e_,s_,t__,T_,i_,S_,t_ |
54 | !distribute words $l into e_,s_,t__,T_,i_,S_,t_ |
53 | !if $S_=0 |
55 | !if $S_=0 |
54 | !reset jj |
56 | !reset jj |
55 | !else |
57 | !else |
56 | !set jj=!positionof item $S_ in $checksessions |
58 | !set jj=!positionof item $S_ in $checksessions |
- | 59 | !if $(ip_$jj)=$i_ |
|
- | 60 | scoreip$(jj)_$e_=$s_ |
|
- | 61 | !endif |
|
57 | !set score$(jj)_$e_=$s_ |
62 | !set score$(jj)_$e_=$s_ |
58 | !set exam_$jj=!append item $e_ to $(exam_$jj) |
63 | !set exam_$jj=!append item $e_ to $(exam_$jj) |
59 | !set sess_$e_=!append item $jj to $(sess_$e_) |
64 | !set sess_$e_=!append item $jj to $(sess_$e_) |
60 | !set exam_$jj=!listuniq $(exam_$jj) |
65 | !set exam_$jj=!listuniq $(exam_$jj) |
61 | !if $s_ issametext 00 |
66 | !if $s_ issametext 00 |
62 | start$(jj)_$e_=$t_ |
67 | start$(jj)_$e_=$t_ |
63 | dur$(jj)_$e_=$T_ |
68 | dur$(jj)_$e_=$T_ |
- | 69 | ip_$jj=$i_ |
|
64 | !endif |
70 | !endif |
65 | !if $t__ issametext -1 |
71 | !if $t__ issametext -1 |
66 | duree$(jj)_$(e_)=$[$T_ - $(dur$(jj)_$e_)] |
72 | duree$(jj)_$(e_)=$[$T_ - $(dur$(jj)_$e_)] |
- | 73 | !if $(score$(jj)_$e_)!=$(scoreip$(jj)_$e_) |
|
- | 74 | scorereducedbyip=1 |
|
- | 75 | !endif |
|
67 | !endif |
76 | !endif |
68 | !endif |
77 | !endif |
69 | !next i |
78 | !next i |
70 | !for i in $activexams |
79 | !for i in $activexams |
71 | !if $(Dureeexam_$i)!=$empty |
80 | !if $(Dureeexam_$i)!=$empty |