Rev 17410 | Rev 17471 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 17410 | Rev 17468 | ||
---|---|---|---|
Line 65... | Line 65... | ||
65 | 65 | ||
66 | !writefile wimshome/$wims_sesdir/examdata.$exam $sdure $sprime |
66 | !writefile wimshome/$wims_sesdir/examdata.$exam $sdure $sprime |
67 | registered=!record 0 of wimshome/$wims_sesdir/examreg.$exam |
67 | registered=!record 0 of wimshome/$wims_sesdir/examreg.$exam |
68 | now=$wims_nowseconds |
68 | now=$wims_nowseconds |
69 | 69 | ||
70 | !if |
70 | !if $registered=$empty |
71 |
|
71 | !! calcul uniquement lorsque l'examen n'est pas lancé (sinon c'est le c qui détermine la fin de la session) |
72 | !endif |
- | |
73 | - | ||
74 |
|
72 | !! TODO il faudrait une commande c qui calcule tout seul cette date.... |
75 | !! le temps restant affiche ne peut pas aller au dela de la limitation fixee par la limitation de feuille. |
73 | !! le temps restant affiche ne peut pas aller au dela de la limitation fixee par la limitation de feuille. |
76 | !set expir_user=!record 0 of wimshome/log/classes/$wims_class/.E$exam |
74 | !set expir_user=!record 0 of wimshome/log/classes/$wims_class/.E$exam |
77 | !set cle=!word 1 of $expir_user |
75 | !set cle=!word 1 of $expir_user |
78 | !! process for technical variable definition (replace expir_user by value given by the technical variable) |
76 | !! process for technical variable definition (replace expir_user by value given by the technical variable) |
79 | !if \ isin $cle |
77 | !if \ isin $cle |
Line 97... | Line 95... | ||
97 | fin=!char 2 to -1 of $(expir_user[$k]) |
95 | fin=!char 2 to -1 of $(expir_user[$k]) |
98 | fin=!text select 0123456789.: in $fin |
96 | fin=!text select 0123456789.: in $fin |
99 | !endif |
97 | !endif |
100 | !next k |
98 | !next k |
101 | !if $fin!=$empty |
99 | !if $fin!=$empty |
102 | date=!char 1 to 8 of $fin |
100 | !! date=!char 1 to 8 of $fin |
103 |
|
101 | time_end=!char 10 to 14 of $fin |
104 | dt=!sh date -d"$date $time" +%s |
- | |
105 | left=$[$dt-$now] |
- | |
106 | !if $registered>0 |
- | |
107 | timeleft=$[min($timeleft,$left)] |
- | |
108 | !endif |
- | |
109 | !endif |
102 | !endif |
110 | !endif |
103 | !endif |
111 | !! fin des modifications qui decoule de la limitation fixee par la feuille |
104 | !! fin des modifications qui decoule de la limitation fixee par la feuille |
112 | - | ||
113 |
|
105 | !else |
- | 106 | tmp=!record 0 of wimshome/$wims_sesdir/examdepend.$exam |
|
114 | !if |
107 | !if $tmp!=$empty |
- | 108 | wims_exam_remain=$[$tmp-$wims_nowseconds] |
|
- | 109 | time_end=!sh date -d "@$tmp" +%H:%M; |
|
115 |
|
110 | !else |
- | 111 | wims_exam_remain=$[60*$sdure-($now-$registered)] |
|
- | 112 | !endif |
|
116 | !endif |
113 | !endif |
117 | wims_exam_remain=$timeleft |
- | |
118 | rm=$[floor($timeleft/60)] |
- | |
119 | rs=!char 2,3 of $[$timeleft%60+100] |
- | |
120 | remaintext=$rm:$rs |
- | |
121 | 114 | ||
122 | l=!examscore |
115 | l=!examscore |
123 | lastscore=!word $exam of $l |
116 | lastscore=!word $exam of $l |
124 | !default lastscore=0 |
117 | !default lastscore=0 |
125 | tr=!line $exam+1 of $l |
118 | tr=!line $exam+1 of $l |
Line 128... | Line 121... | ||
128 | trcut=1 |
121 | trcut=1 |
129 | !endif |
122 | !endif |
130 | tryremain=$[$stries-$tried] |
123 | tryremain=$[$stries-$tried] |
131 | !if $trcut=0 |
124 | !if $trcut=0 |
132 | tryremain=0 |
125 | tryremain=0 |
133 | !endif |
- | |
134 | !ifval $left!=$empty and $left <= $[min($timeleft+60*$sdure*($tryremain),$left)] |
- | |
135 | time_end=!exec get_end_date.pl $left,%T |
- | |
136 | warning=yes |
- | |
137 | !endif |
126 | !endif |
138 | 127 | ||
139 | t_=!getscorestatus sheet=$exam exam=yes |
128 | t_=!getscorestatus sheet=$exam exam=yes |