Rev 10242 | Rev 10273 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5235 | czzmrn | 1 | |
5369 | bpr | 2 | |
5235 | czzmrn | 3 | today=!char 1 to 8 of $wims_now |
4 | thisyear=!char 1 to 4 of $today |
||
7198 | bpr | 5 | !if $class_expiration=$empty |
5235 | czzmrn | 6 | !defread wimshome/log/classes/$wims_class/.def |
7 | !endif |
||
8 | !if $class_expiration=$empty |
||
9 | error=bad_class |
||
10 | !exit |
||
11 | !endif |
||
12 | |||
13 | !readdef $votedir/$vote.data |
||
5369 | bpr | 14 | !default testointro=!record 1 of $votedir/$vote.data |
5297 | czzmrn | 15 | !default mod_numsess=$numsess |
16 | numsess=$mod_numsess |
||
5369 | bpr | 17 | !for i=1 to $numsess |
18 | !for var in bday, bmonth, byear, bhour, bmin, ehour, emin, nstud, testoextra,exconnip |
||
19 | !default up_$var$i=$($var$i) |
||
20 | !set $var$i=$(up_$var$i) |
||
10241 | guerimand | 21 | !next var |
22 | !next i |
||
5369 | bpr | 23 | !for var in testointro, namevar, defconnip |
24 | !default up_$var=$($var) |
||
25 | !set $var=$(up_$var) |
||
10233 | guerimand | 26 | !next var |
5297 | czzmrn | 27 | |
5369 | bpr | 28 | !if $gstep=2 |
7198 | bpr | 29 | !! need to check carefully namexevar vs. up_namevar (at some step we seem to |
5369 | bpr | 30 | !! be loosing the correction)(?? should this go outside the if $gstep=2) |
10241 | guerimand | 31 | !bound up_namevar within $listlocalname |
32 | !if $up_namevar=$empty and $namevar=$empty |
||
5369 | bpr | 33 | error=bad_variable |
10241 | guerimand | 34 | gstep=1 |
35 | !exit |
||
5369 | bpr | 36 | !endif |
10241 | guerimand | 37 | !default namevar=$up_namevar |
38 | !if $namevar=$empty |
||
5369 | bpr | 39 | error=no_variable |
10241 | guerimand | 40 | gstep=1 |
41 | !exit |
||
5369 | bpr | 42 | !endif |
10241 | guerimand | 43 | |
44 | !! !read adm/class/authchars |
||
45 | !for dato in namevar,defconnip |
||
46 | !setdef $dato=$($dato) in $votedir/$vote.data |
||
47 | !next dato |
||
48 | !endif |
||
49 | |||
50 | !if $gstep>=2 |
||
51 | !! get list of value for the technical variable : |
||
52 | tmp=!positionof item $namevar in $tv_listname |
||
53 | tmp=!line $tmp of $tv_listtechvar |
||
54 | !distribute item $tmp into bb,classid,num |
||
55 | don=!record $num of wimshome/log/classes/$wims_class/.techvar |
||
56 | listval=!line 2 of $don |
||
57 | numsess=!itemcnt $listval |
||
58 | !endif |
||
59 | |||
60 | !if $gstep=3 |
||
61 | !!## need to check $testointro contains no vote primitives |
||
62 | !for i in uservar,menu,list,radio,checkbox,textarea |
||
63 | testointro=!replace internal \$i by INVALID in $testointro |
||
64 | !next i |
||
65 | !writefile $votedir/$vote.data |
||
66 | |||
67 | !!## with writefile we are loosing these variables at gstep=3 |
||
5369 | bpr | 68 | !for dato in numsess,namevar,defconnip |
10241 | guerimand | 69 | !appendfile $votedir/$vote.data $dato=$($dato) |
70 | !next dato |
||
71 | |||
10243 | guerimand | 72 | techvartable=techvar $namevar $(classid)_$num\ |
10241 | guerimand | 73 | ,>$class_expiration |
74 | !for i=1 to $numsess |
||
75 | !!## need to check no "," in exconnip/testoextra |
||
76 | !set exconnip$i=!replace internal , by . in $(exconnip$i) |
||
77 | !set 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 |
||
79 | !appendfile $votedir/$vote.data $dato=$($dato) |
||
80 | !next dato |
||
81 | !next i |
||
82 | |||
83 | !appendfile $votedir/$vote.data \ |
||
84 | :$testointro |
||
85 | !set reg_src=<div>\ |
||
86 | $testointro\ |
||
87 | </div>\ |
||
88 | \list{ |
||
89 | |||
90 | reg_src1=$reg_src |
||
91 | reg_src2=\uservar{$namevar,$empty, |
||
92 | !for i=1 to $numsess |
||
93 | mese$i=!item $(bmonth$i) of $months |
||
94 | bmonth$i=!char 2,3 of $[abs(floor($(bmonth$i)))+100] |
||
95 | byear$i=!char -4 to -1 of $[abs(floor($(byear$i)))+100000] |
||
96 | bmin$i=!char 2,3 of $[abs(floor($(bmin$i)))+100] |
||
97 | emin$i=!char 2,3 of $[abs(floor($(emin$i)))+100] |
||
98 | bday$i=!char 2,3 of $[abs(floor($(bday$i)))+100] |
||
99 | bhour$i=!char 2,3 of $[abs(floor($(bhour$i)))+100] |
||
100 | ehour$i=!char 2,3 of $[abs(floor($(ehour$i)))+100] |
||
101 | reg_src1=$reg_src1\ |
||
102 | $(nstud$i): $(bday$i) $(mese$i) $(byear$i) - $(bhour$i).$(bmin$i) / $(ehour$i).$(emin$i)$ $(testoextra$i), |
||
103 | techvartable=$techvartable\ |
||
104 | $(listval[$i]),>$(byear$i)$(bmonth$i)$(bday$i).$(bhour$i):$(bmin$i) <$(byear$i)$(bmonth$i)$(bday$i).$(ehour$i):$(emin$i) $(exconnip$i), |
||
105 | reg_src2=$reg_src2\ |
||
106 | $(listval[$i]), |
||
107 | !next i |
||
108 | |||
109 | reg_src=$reg_src1\ |
||
110 | $name_cancellation\ |
||
111 | }\ |
||
112 | $reg_src2\ |
||
113 | $empty\ |
||
114 | } |
||
115 | !sh mkdir $wims_home/log/classes/$wims_class/techvar |
||
116 | !writefile wimshome/log/classes/$wims_class/techvar/$(classid2)_$num $techvartable |
||
5369 | bpr | 117 | !endif |