Rev 9719 | Rev 9938 | 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 |
9878 | bpr | 20 | !if $( exam$(i)_$jj)!=$empty |
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_ |
||
33 | !set exam_$jj=$e_ |
||
34 | !if $s_ issametext 00 |
||
35 | start$(jj)_$e_=$t_ |
||
36 | dur$(jj)_$e_=$T_ |
||
37 | !endif |
||
38 | !if $t__ issametext -1 |
||
39 | duree$(jj)_$(e_)=$[$T_ - $(dur$(jj)_$e_)] |
||
40 | !endif |
||
41 | !next |
||
42 | !for i in $activexams |
||
9878 | bpr | 43 | !if $(Dureeexam_$i)!=$empty |
44 | !reset Dureeexam_$i |
||
45 | !endif |
||
9719 | bpr | 46 | !for e=1 to 64 |
9878 | bpr | 47 | !if $(Exam_$(i)_$(e))!=$empty |
48 | !reset Exam_$(i)_$(e) |
||
49 | !endif |
||
50 | !if $(exam$(i)_$e)!=$empty |
||
51 | !reset exam$(i)_$e |
||
52 | !endif |
||
9719 | bpr | 53 | !next |
54 | !for ses_ in $checksessions |
||
55 | !set jj=!positionof item $ses_ in $checksessions |
||
56 | !if $(duree$(jj)_$i)!=$empty |
||
57 | Dureeexam_$i=!append item $(duree$(jj)_$i) to $(Dureeexam_$i) |
||
58 | !endif |
||
59 | !next |
||
60 | !next |
||
61 | |||
62 | !!details des notes examens par session |
||
63 | !for ses_ in $checksessions |
||
64 | !set jj=!positionof item $ses_ in $checksessions |
||
65 | !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}' |
||
66 | !set ss=!lines2rows $ss |
||
67 | !set ss=!words2items $ss |
||
68 | !set i = $(exam_$(jj)) |
||
69 | !set s_=!select $ss where column 1=$i |
||
70 | !set nbx=!recordcnt wimshome/log/classes/$wims_class/exams/.exam$i |
||
71 | !for k_=1 to $nbx |
||
72 | !reset s |
||
73 | !set s=!select $s_ where column 2=$k_ |
||
74 | !set s=$(s[3]) |
||
75 | !if $s!=$empty |
||
76 | !set s=$[rint($s*$scoremax)/10] |
||
77 | !endif |
||
78 | !set Exam_$(i)_$(jj)=$(Exam_$(i)_$(jj)) $s, |
||
79 | !next |
||
80 | !next |