Subversion Repositories wimsdev

Rev

Rev 10243 | Rev 10305 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 10243 Rev 10273
Line 8... Line 8...
8
!if $class_expiration=$empty
8
!if $class_expiration=$empty
9
 error=bad_class
9
 error=bad_class
10
 !exit
10
 !exit
11
!endif
11
!endif
12
 
12
 
13
!readdef $votedir/$vote.data
13
data=!record 1 of $votedir/$vote.data
-
 
14
namevar=!line 1 of $data
14
!default testointro=!record 1 of $votedir/$vote.data
15
!default up_defconnip=!line 2 of $data
-
 
16
po=!positionof item $namevar in $tv_listname
-
 
17
!bound up_namevar within $listlocalname default $namevar
-
 
18
 
-
 
19
listvar=bday,bmonth,byear,bhour,bmin,ehour,emin,nstud,testoextra,exconnip
-
 
20
!if $po isitemof $tv_listlocal and $namevar=$up_namevar
-
 
21
 data=!line 3 to -1 of $data
-
 
22
 listcle=!column 1 of $data
-
 
23
 tmp=!line $po of $tv_listtechvar
-
 
24
 tmp=!record $(tmp[3]) of wimshome/log/classes/$wims_class/.techvar
-
 
25
 listval=!line 2 of $tmp
-
 
26
 numsess=!itemcnt $listval
15
!default mod_numsess=$numsess
27
 !default mod_numsess=$numsess
16
numsess=$mod_numsess
28
 !for i=1 to $numsess
-
 
29
   p=!positionof item $(listval[$i]) in $listcle
-
 
30
   !if $p!=$empty
-
 
31
    tdon=!line $p of $data
17
!for i=1 to $numsess
32
    !for v=1 to 10
18
   !for var in bday, bmonth, byear, bhour, bmin, ehour, emin, nstud, testoextra,exconnip
33
     !default up_$(listvar[$v])$i=$(tdon[$v+1])
-
 
34
    !next v
-
 
35
   !endif
19
    !default up_$var$i=$($var$i)
36
   !for var in $listvar
20
    !set $var$i=$(up_$var$i)
37
    $(var)$i=$(up_$(var)$i)
21
   !next var
38
   !next var
22
 !next i
39
 !next i
-
 
40
!else
-
 
41
 data=$empty
-
 
42
!endif
-
 
43
!default up_testointro=!record 2 of $votedir/$vote.data
-
 
44
testointro=$up_testointro
23
!for var in testointro, namevar, defconnip
45
!for var in testointro,defconnip
24
    !default up_$var=$($var)
46
    !default up_$var=$($var)
25
    !set $var=$(up_$var)
47
    !set $var=$(up_$var)
26
!next var
48
!next var
27
 
49
 
28
!if $gstep=2
50
!if $gstep=2
29
!! need to check carefully namexevar vs. up_namevar (at some step we seem to
51
!! need to check carefully namexevar vs. up_namevar (at some step we seem to
30
!! be loosing the correction)(?? should this go outside the if $gstep=2)
52
!! be loosing the correction)(?? should this go outside the if $gstep=2)
31
 !bound up_namevar within $listlocalname
53
 !bound up_namevar within $listlocalname
32
 !if $up_namevar=$empty and $namevar=$empty
54
 !if $up_namevar=$empty and $namevar=$empty
Line 38... Line 60...
38
 !if $namevar=$empty
60
 !if $namevar=$empty
39
  error=no_variable
61
  error=no_variable
40
  gstep=1
62
  gstep=1
41
  !exit
63
  !exit
42
 !endif
64
 !endif
43
 
-
 
44
!! !read adm/class/authchars
65
 !writefile $votedir/$vote.data :$namevar\
45
 !for dato in namevar,defconnip
66
$defconnip\
46
  !setdef $dato=$($dato) in  $votedir/$vote.data
67
$data\
47
 !next dato
68
:$testointro
48
!endif
69
!endif
49
 
70
 
50
!if $gstep>=2
71
!if $gstep>=2
51
!! get list of value for the technical variable :
72
!! get list of value for the technical variable :
52
 tmp=!positionof item $namevar in $tv_listname
73
 tmp=!positionof item $namevar in $tv_listname
Line 57... Line 78...
57
 numsess=!itemcnt $listval
78
 numsess=!itemcnt $listval
58
!endif
79
!endif
59
 
80
 
60
!if $gstep=3
81
!if $gstep=3
61
!!## need to check $testointro contains no vote primitives
82
!!## need to check $testointro contains no vote primitives
62
!for i in uservar,menu,list,radio,checkbox,textarea
83
 !for i in uservar,menu,list,radio,checkbox,textarea
63
  testointro=!replace internal \$i by INVALID in $testointro
84
   testointro=!replace internal \$i by INVALID in $testointro
64
!next i
85
 !next i
65
!writefile $votedir/$vote.data
86
 donfile=$namevar\
66
 
-
 
67
!!## with writefile we are loosing these variables at gstep=3
-
 
68
!for dato in numsess,namevar,defconnip
-
 
69
  !appendfile $votedir/$vote.data $dato=$($dato)
-
 
70
!next dato
87
$defconnip
71
 
88
 
72
techvartable=techvar $namevar $(classid)_$num\
89
 techvartable=techvar $namevar $(classid)_$num\
73
,>$class_expiration
90
,>$class_expiration
74
!for i=1 to $numsess
91
 !for i=1 to $numsess
75
!!## need to check no "," in exconnip/testoextra
92
  !!## need to check no "," in exconnip/testoextra and numerical for date variable.
76
  !set exconnip$i=!replace internal , by . in $(exconnip$i)
93
  exconnip$i=!replace internal , by . in $(exconnip$i)
77
  !set testoextra$i=!replace internal , by . in $(testoextra$i)
94
  testoextra$i=!replace internal , by . in $(testoextra$i)
78
  !for dato in nstud$i,bday$i,mese$i,byear$i,bhour$i,bmin$i,testoextra$i,bmonth$i,ehour$i,emin$i,exconnip$i
95
  !for v in bday,bmonth,byear,bhour,bmin,ehour,emin
79
    !appendfile $votedir/$vote.data $dato=$($dato)
96
   !if NaN isin $[$($v$i)*1]
-
 
97
	$v$i=$empty
80
  !next dato
98
   !endif
81
!next i
99
  !next v
82
 
100
 
-
 
101
  ligne=$(listval[$i])
-
 
102
  !for var in $listvar
-
 
103
   ligne=!append item $($var$i) to $ligne
-
 
104
  !next var
-
 
105
  donfile=!append line $ligne to $donfile
-
 
106
 !next i
83
!appendfile $votedir/$vote.data \
107
 !writefile $votedir/$vote.data :$donfile\
84
:$testointro
108
:$testointro
-
 
109
 
85
!set reg_src=<div>\
110
!set reg_src=<div>\
86
$testointro\
111
$testointro\
87
</div>\
112
</div>\
88
\list{
113
\list{
89
 
114