Rev 11959 | Rev 16378 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 11959 | Rev 15494 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | scoremax=!record 0 of wimshome/log/classes/$wims_class/sheets/.severity |
1 | scoremax=!record 0 of wimshome/log/classes/$wims_class/sheets/.severity |
2 | scoremax=!line 1 of $scoremax |
2 | scoremax=!line 1 of $scoremax |
3 | !default scoremax=10 |
3 | !default scoremax=10 |
4 | 4 | ||
5 | !for e=1 to $exocnt |
5 | !for e=1 to $exocnt |
6 | got$e=0 |
6 | got$e=0 |
7 | replied$e=0 |
7 | replied$e=0 |
8 | !next e |
8 | !next e |
9 | 9 | ||
10 | p=!recordcnt wimshome/$wims_sesdir/examscore.$exam |
10 | p=!recordcnt wimshome/$wims_sesdir/examscore.$exam |
11 | reg=!record 0 of wimshome/$wims_sesdir/examreg.$exam |
11 | reg=!record 0 of wimshome/$wims_sesdir/examreg.$exam |
12 | 12 | ||
13 | replycnt=0 |
13 | replycnt=0 |
14 | !for i=1 to $p |
14 | !for i=1 to $p |
15 | l=!record $i of wimshome/$wims_sesdir/examscore.$exam |
15 | l=!record $i of wimshome/$wims_sesdir/examscore.$exam |
16 | !distribute words $l into a_,b_,c_,d_,e_,f_,g_,i_ |
16 | !distribute words $l into a_,b_,c_,d_,e_,f_,g_,i_ |
17 | !if $c_=score and $(replied$b_)=0 |
17 | !if $c_=score and $(replied$b_)=0 |
18 | got$b_=$d_ |
18 | got$b_=$d_ |
19 | replied$b_=1 |
19 | replied$b_=1 |
20 | !advance replycnt |
20 | !advance replycnt |
21 | !endif |
21 | !endif |
22 | !next i |
22 | !next i |
23 | 23 | ||
24 | totgot=0 |
24 | totgot=0 |
25 | totweight=0 |
25 | totweight=0 |
26 | !for e=1 to $exocnt |
26 | !for e=1 to $exocnt |
27 | l=!record $e of wimshome/log/classes/$wims_class/exams/.exam$exam |
27 | l=!record $e of wimshome/log/classes/$wims_class/exams/.exam$exam |
28 | w=!word 1 of $l |
28 | w=!word 1 of $l |
29 | weight$e=$w |
29 | weight$e=$w |
30 | totweight=$[$totweight+$w] |
30 | totweight=$[$totweight+$w] |
31 | totgot=$[$totgot+$w*$(got$e)] |
31 | totgot=$[$totgot+$w*$(got$e)] |
32 | dd=!append line $w $totgot to $dd |
32 | dd=!append line $w $totgot to $dd |
33 | !next e |
33 | !next e |
34 | 34 | ||
35 | !if $totweight>0 |
35 | !if $totweight>0 |
36 | score=$[rint((100-10*$sprime)*$totgot/$totweight+100*$sprime)/100] |
36 | score=$[rint((100-10*$sprime)*$totgot/$totweight+100*$sprime)/100] |
37 | !else |
37 | !else |
38 | score=$sprime |
38 | score=$sprime |
39 | !endif |
39 | !endif |
40 | 40 | ||
41 | !writefile wimshome/$wims_sesdir/examdata.$exam $sdure $sprime |
41 | !writefile wimshome/$wims_sesdir/examdata.$exam $sdure $sprime |
42 | registered=!record 0 of wimshome/$wims_sesdir/examreg.$exam |
42 | registered=!record 0 of wimshome/$wims_sesdir/examreg.$exam |
43 | now=$wims_nowseconds |
43 | now=$wims_nowseconds |
44 | 44 | ||
45 | !if $registered>0 |
45 | !if $registered>0 |
46 |
|
46 | timeleft=$[60*$sdure-($now-$registered)] |
47 | !endif |
47 | !endif |
48 | 48 | ||
49 | !if $registered>-1 |
49 | !if $registered>-1 |
50 | !! le temps restant affiche ne peut pas aller au dela de la limitation fixee par la limitation de feuille. |
50 | !! le temps restant affiche ne peut pas aller au dela de la limitation fixee par la limitation de feuille. |
51 | !set expir_user=!record 0 of wimshome/log/classes/$wims_class/.E$exam |
51 | !set expir_user=!record 0 of wimshome/log/classes/$wims_class/.E$exam |
52 | !set cle=!word 1 of $expir_user |
52 | !set cle=!word 1 of $expir_user |
53 | !! process for technical variable definition (replace expir_user by value given by the technical variable) |
53 | !! process for technical variable definition (replace expir_user by value given by the technical variable) |
54 | !if \ isin $cle |
54 | !if \ isin $cle |
55 | !set idtechvar=!line 1 of $expir_user |
55 | !set idtechvar=!line 1 of $expir_user |
56 | !set idtechvar=!char 2 to -1 of $idtechvar |
56 | !set idtechvar=!char 2 to -1 of $idtechvar |
57 | !readproc adm/class/userdef ,$wims_class,$wims_user |
57 | !readproc adm/class/userdef ,$wims_class,$wims_user |
58 | !set val=!defof user_techvar_$(idtechvar) in $userdef |
58 | !set val=!defof user_techvar_$(idtechvar) in $userdef |
59 | !default val=EMPTY |
59 | !default val=EMPTY |
60 | !reset expir_user |
60 | !reset expir_user |
61 | !set expir_user=!defof techvar_$val in wimshome/log/classes/$wims_class/.E$exam |
61 | !set expir_user=!defof techvar_$val in wimshome/log/classes/$wims_class/.E$exam |
62 | !default expir_user=none |
62 | !default expir_user=none |
63 | !endif |
63 | !endif |
64 | !! end process technical variable |
64 | !! end process technical variable |
65 | !if $expir_user!=none |
65 | !if $expir_user!=none |
66 | expir_user=!words2items $expir_user |
66 | expir_user=!words2items $expir_user |
67 | nb=!itemcnt $expir_user |
67 | nb=!itemcnt $expir_user |
68 | fin=$empty |
68 | fin=$empty |
69 | c=< |
69 | c=< |
70 | !for k=1 to $nb |
70 | !for k=1 to $nb |
71 | !if $c isin $(expir_user[$k]) |
71 | !if $c isin $(expir_user[$k]) |
72 | fin=!char 2 to -1 of $(expir_user[$k]) |
72 | fin=!char 2 to -1 of $(expir_user[$k]) |
73 | fin=!text select 0123456789.: in $fin |
73 | fin=!text select 0123456789.: in $fin |
74 | !endif |
74 | !endif |
75 | !next k |
75 | !next k |
76 | !if $fin!=$empty |
76 | !if $fin!=$empty |
77 | date=!char 1 to 8 of $fin |
77 | date=!char 1 to 8 of $fin |
78 | time=!char 10 to 14 of $fin |
78 | time=!char 10 to 14 of $fin |
79 | dt=!sh date -d"$date $time" +%s |
79 | dt=!sh date -d"$date $time" +%s |
80 | left=$[$dt-$now] |
80 | left=$[$dt-$now] |
81 | !if $registered>0 |
81 | !if $registered>0 |
82 |
|
82 | timeleft=$[min($timeleft,$left)] |
83 | !endif |
83 | !endif |
- | 84 | !endif |
|
84 | !endif |
85 | !endif |
85 | !endif |
- | |
86 | !! fin des modifications qui decoule de la limitation fixee par la feuille |
86 | !! fin des modifications qui decoule de la limitation fixee par la feuille |
87 | 87 | ||
88 | !endif |
88 | !endif |
89 | !if $timeleft<0 |
89 | !if $timeleft<0 |
90 | timeleft=0 |
90 | timeleft=0 |
91 | !endif |
91 | !endif |
Line 98... | Line 98... | ||
98 | lastscore=!word $exam of $l |
98 | lastscore=!word $exam of $l |
99 | !default lastscore=0 |
99 | !default lastscore=0 |
100 | tr=!line $exam+1 of $l |
100 | tr=!line $exam+1 of $l |
101 | !distribute words $tr into tr1, tried, trcut |
101 | !distribute words $tr into tr1, tried, trcut |
102 | !if $tried=0 |
102 | !if $tried=0 |
103 | trcut=1 |
103 | trcut=1 |
104 | !endif |
104 | !endif |
105 | tryremain=$[$stries-$tried] |
105 | tryremain=$[$stries-$tried] |
106 | !if $trcut=0 |
106 | !if $trcut=0 |
107 | tryremain=0 |
107 | tryremain=0 |
108 | !endif |
108 | !endif |
109 | !ifval $left!=$empty and $left <= $[min($timeleft+60*$sdure*($tryremain),$left)] |
109 | !ifval $left!=$empty and $left <= $[min($timeleft+60*$sdure*($tryremain),$left)] |
110 |
|
110 | time_end=!exec get_end_date.pl $left,%T |
111 |
|
111 | warning=yes |
112 | !endif |
112 | !endif |
113 | 113 | ||
114 | t_=!getscorestatus sheet=$exam exam=yes |
114 | t_=!getscorestatus sheet=$exam exam=yes |