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