Rev 9938 | Rev 10019 | 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 |
||
9719 | bpr | 14 | !for jj=1 to 64 |
15 | !! jj correspond to maximum of number sessions |
||
9878 | bpr | 16 | !if $(duree$(jj)_$(i))!=$empty |
17 | !reset duree$(jj)_$(i) |
||
18 | !endif |
||
9719 | bpr | 19 | !! jj correspond to exos in an exam |
10016 | bpr | 20 | !if $(exam$(i)_$jj)!=$empty |
9878 | bpr | 21 | !reset exam$(i)_$jj |
22 | !endif |
||
9719 | bpr | 23 | !next |
24 | !next |
||
25 | |||
26 | sc=!record 0 of wimshome/log/classes/$wims_class/score/$uu.exam |
||
27 | nsc=!linecnt $sc |
||
28 | !for i=1 to $nsc |
||
29 | l=!line $i of $sc |
||
30 | !distribute words $l into e_,s_,t__,T_,i_,S_,t_ |
||
31 | !set jj=!positionof item $S_ in $checksessions |
||
32 | !set score$(jj)_$e_=$s_ |
||
9938 | bpr | 33 | !set exam_$jj=!append item $e_ to $(exam_$jj) |
34 | !set exam_$jj=!listuniq $(exam_$jj) |
||
9719 | bpr | 35 | !if $s_ issametext 00 |
36 | start$(jj)_$e_=$t_ |
||
37 | dur$(jj)_$e_=$T_ |
||
38 | !endif |
||
39 | !if $t__ issametext -1 |
||
40 | duree$(jj)_$(e_)=$[$T_ - $(dur$(jj)_$e_)] |
||
41 | !endif |
||
42 | !next |
||
43 | !for i in $activexams |
||
9878 | bpr | 44 | !if $(Dureeexam_$i)!=$empty |
45 | !reset Dureeexam_$i |
||
46 | !endif |
||
9719 | bpr | 47 | !for e=1 to 64 |
9878 | bpr | 48 | !if $(Exam_$(i)_$(e))!=$empty |
49 | !reset Exam_$(i)_$(e) |
||
50 | !endif |
||
51 | !if $(exam$(i)_$e)!=$empty |
||
52 | !reset exam$(i)_$e |
||
53 | !endif |
||
9719 | bpr | 54 | !next |
55 | !for ses_ in $checksessions |
||
56 | !set jj=!positionof item $ses_ in $checksessions |
||
57 | !if $(duree$(jj)_$i)!=$empty |
||
58 | Dureeexam_$i=!append item $(duree$(jj)_$i) to $(Dureeexam_$i) |
||
59 | !endif |
||
60 | !next |
||
61 | !next |
||
62 | |||
63 | !!details des notes examens par session |
||
64 | !for ses_ in $checksessions |
||
65 | !set jj=!positionof item $ses_ in $checksessions |
||
66 | !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}' |
||
67 | !set ss=!lines2rows $ss |
||
68 | !set ss=!words2items $ss |
||
9938 | bpr | 69 | !!perhaps several different exams in one session. |
70 | !for i in $(exam_$(jj)) |
||
9719 | bpr | 71 | !set s_=!select $ss where column 1=$i |
72 | !set nbx=!recordcnt wimshome/log/classes/$wims_class/exams/.exam$i |
||
73 | !for k_=1 to $nbx |
||
74 | !reset s |
||
75 | !set s=!select $s_ where column 2=$k_ |
||
76 | !set s=$(s[3]) |
||
77 | !if $s!=$empty |
||
78 | !set s=$[rint($s*$scoremax)/10] |
||
79 | !endif |
||
80 | !set Exam_$(i)_$(jj)=$(Exam_$(i)_$(jj)) $s, |
||
9938 | bpr | 81 | !next |
9719 | bpr | 82 | !next |
83 | !next |