Rev 10016 | Rev 12555 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
9719 | bpr | 1 | !default uu=$wims_read_parm |
2 | |||
3 | !!! perhaps should be a command in wims.c ? |
||
4 | !!! variables which are necessary : wims_class, checksessions |
||
5 | !!! FIXME 64= max of exam number |
||
6 | !!! FIXME max of session number |
||
9878 | bpr | 7 | !!! do reset only if the variable is non empty, if not it creates a variable |
8 | !!! and gives some "variable_name_buffer_overflow" |
||
9 | |||
9719 | bpr | 10 | !for i in $activexams |
9878 | bpr | 11 | !if $(Dureeexam_$i)!=$empty |
12 | !reset Dureeexam_$i |
||
13 | !endif |
||
10019 | bpr | 14 | !if $(Dureeexam_$i)!=$empty |
15 | !reset Dureeexam_$i |
||
16 | !endif |
||
9719 | bpr | 17 | !for jj=1 to 64 |
18 | !! jj correspond to maximum of number sessions |
||
9878 | bpr | 19 | !if $(duree$(jj)_$(i))!=$empty |
20 | !reset duree$(jj)_$(i) |
||
21 | !endif |
||
10019 | bpr | 22 | !if $(exam_$jj)!=$empty |
23 | !reset exam_$jj |
||
24 | !endif |
||
9719 | bpr | 25 | !! jj correspond to exos in an exam |
10016 | bpr | 26 | !if $(exam$(i)_$jj)!=$empty |
9878 | bpr | 27 | !reset exam$(i)_$jj |
28 | !endif |
||
9719 | bpr | 29 | !next |
30 | !next |
||
31 | |||
32 | sc=!record 0 of wimshome/log/classes/$wims_class/score/$uu.exam |
||
10019 | bpr | 33 | !if $sc=$empty |
34 | !exit |
||
35 | !endif |
||
9719 | bpr | 36 | nsc=!linecnt $sc |
10019 | bpr | 37 | |
38 | |||
9719 | bpr | 39 | !for i=1 to $nsc |
40 | l=!line $i of $sc |
||
41 | !distribute words $l into e_,s_,t__,T_,i_,S_,t_ |
||
10019 | bpr | 42 | !if $S_=0 |
43 | !reset jj |
||
44 | !else |
||
45 | !set jj=!positionof item $S_ in $checksessions |
||
46 | !set score$(jj)_$e_=$s_ |
||
47 | !set exam_$jj=!append item $e_ to $(exam_$jj) |
||
48 | !set exam_$jj=!listuniq $(exam_$jj) |
||
49 | !if $s_ issametext 00 |
||
50 | start$(jj)_$e_=$t_ |
||
51 | dur$(jj)_$e_=$T_ |
||
52 | !endif |
||
53 | !if $t__ issametext -1 |
||
54 | duree$(jj)_$(e_)=$[$T_ - $(dur$(jj)_$e_)] |
||
55 | !endif |
||
9719 | bpr | 56 | !endif |
57 | !next |
||
58 | !for i in $activexams |
||
9878 | bpr | 59 | !if $(Dureeexam_$i)!=$empty |
60 | !reset Dureeexam_$i |
||
61 | !endif |
||
9719 | bpr | 62 | !for e=1 to 64 |
9878 | bpr | 63 | !if $(Exam_$(i)_$(e))!=$empty |
64 | !reset Exam_$(i)_$(e) |
||
65 | !endif |
||
66 | !if $(exam$(i)_$e)!=$empty |
||
67 | !reset exam$(i)_$e |
||
68 | !endif |
||
9719 | bpr | 69 | !next |
70 | !for ses_ in $checksessions |
||
71 | !set jj=!positionof item $ses_ in $checksessions |
||
72 | !if $(duree$(jj)_$i)!=$empty |
||
73 | Dureeexam_$i=!append item $(duree$(jj)_$i) to $(Dureeexam_$i) |
||
74 | !endif |
||
75 | !next |
||
76 | !next |
||
77 | |||
78 | !!details des notes examens par session |
||
79 | !for ses_ in $checksessions |
||
80 | !set jj=!positionof item $ses_ in $checksessions |
||
81 | !set ss=!sh grep "$ses_" $wims_home/log/classes/$wims_class/noscore/$uu | grep "score" | awk -F"\t" '{print $$1}' | awk -F" " '{print $$3,$$4,$$6}' |
||
82 | !set ss=!lines2rows $ss |
||
83 | !set ss=!words2items $ss |
||
9938 | bpr | 84 | !!perhaps several different exams in one session. |
85 | !for i in $(exam_$(jj)) |
||
9719 | bpr | 86 | !set s_=!select $ss where column 1=$i |
87 | !set nbx=!recordcnt wimshome/log/classes/$wims_class/exams/.exam$i |
||
88 | !for k_=1 to $nbx |
||
89 | !reset s |
||
90 | !set s=!select $s_ where column 2=$k_ |
||
91 | !set s=$(s[3]) |
||
92 | !if $s!=$empty |
||
93 | !set s=$[rint($s*$scoremax)/10] |
||
94 | !endif |
||
95 | !set Exam_$(i)_$(jj)=$(Exam_$(i)_$(jj)) $s, |
||
9938 | bpr | 96 | !next |
9719 | bpr | 97 | !next |
98 | !next |