Subversion Repositories wimsdev

Rev

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

Rev 10721 Rev 10736
Line 8... Line 8...
8
 !exit
8
 !exit
9
!endif
9
!endif
10
 
10
 
11
!! ------------------ keep save data
11
!! ------------------ keep save data
12
data=!record 1 of $votedir/$vote.data
12
data=!record 1 of $votedir/$vote.data
13
namevar=!line 1 of $data
13
codevar=!line 1 of $data
14
po=!positionof item $namevar in $tv_listname
14
po=!positionof item $codevar in $tv_listcode
-
 
15
namevar=!item $po of $tv_listname
15
!bound up_namevar within $tv_listlocalname default $namevar
16
!bound up_codevar within $tv_listlocalcode default $codevar
16
 
17
 
17
!if $po isitemof $tv_listlocal and $namevar=$up_namevar
18
!if $po isitemof $tv_listlocal and $codevar=$up_codevar
18
 data=!line 2 to -1 of $data
19
 data=!line 2 to -1 of $data
19
 listcle=!column 1 of $data
20
 listcle=!column 1 of $data
20
 tmp=!line $po of $tv_listtechvar
21
 tmp=!line $po of $tv_listtechvar
21
 tmp=!record $(tmp[3]) of wimshome/log/classes/$wims_class/.techvar
22
 tmp=!record $(tmp[3]) of wimshome/log/classes/$wims_class/.techvar
22
 listval=!line 2 of $tmp
23
 listval=!line 2 of $tmp
Line 39... Line 40...
39
testointro=$up_testointro
40
testointro=$up_testointro
40
 
41
 
41
!if $gstep=2
42
!if $gstep=2
42
!! need to check carefully namexevar vs. up_namevar (at some step we seem to
43
!! need to check carefully namexevar vs. up_namevar (at some step we seem to
43
!! be loosing the correction)(?? should this go outside the if $gstep=2)
44
!! be loosing the correction)(?? should this go outside the if $gstep=2)
44
 !if $up_namevar=$empty and $namevar=$empty
45
 !if $up_codevar=$empty and $codevar=$empty
45
   error=bad_variable
46
   error=bad_variable
46
   gstep=1
47
   gstep=1
47
   !exit
48
   !exit
48
 !endif
49
 !endif
49
 !default namevar=$up_namevar
50
 !default codevar=$up_codevar
50
 !if $namevar=$empty
51
 !if $codevar=$empty
51
  error=no_variable
52
  error=no_variable
52
  gstep=1
53
  gstep=1
53
  !exit
54
  !exit
54
 !endif
55
 !endif
55
 !writefile $votedir/$vote.data :$namevar\
56
 !writefile $votedir/$vote.data :$codevar\
56
$data\
57
$data\
57
:$testointro
58
:$testointro
58
!endif
59
!endif
59
 
60
 
60
!if $gstep>=2
61
!if $gstep>=2
61
!! get list of value for the technical variable :
62
!! get list of value for the technical variable :
62
 numvar=!positionof item $namevar in $tv_listname
63
 numvar=!positionof item $codevar in $tv_listcode
63
 tmp=!line $numvar of $tv_listtechvar
64
 tmp=!line $numvar of $tv_listtechvar
64
 tmp=!record $(tmp[3]) of wimshome/log/classes/$wims_class/.techvar
65
 tmp=!record $(tmp[3]) of wimshome/log/classes/$wims_class/.techvar
65
 listval=!line 2 of $tmp
66
 listval=!line 2 of $tmp
66
 numsess=!itemcnt $listval
67
 numsess=!itemcnt $listval
67
!endif
68
!endif
Line 69... Line 70...
69
!if $gstep=3
70
!if $gstep=3
70
!!## need to check $testointro contains no vote primitives
71
!!## need to check $testointro contains no vote primitives
71
 !for i in uservar,menu,list,radio,checkbox,textarea
72
 !for i in uservar,menu,list,radio,checkbox,textarea
72
  !set testointro=!replace internal \$i by INVALID in $testointro
73
  !set testointro=!replace internal \$i by INVALID in $testointro
73
 !next i
74
 !next i
74
 donfile=$namevar
75
 donfile=$codevar
75
 !for i=1 to $numsess
76
 !for i=1 to $numsess
76
!!## need to check no "," in testoextra
77
!!## need to check no "," in testoextra
77
  testoextra$i=!replace internal , by . in $(testoextra$i)
78
  testoextra$i=!replace internal , by . in $(testoextra$i)
78
  nstud$i=$[max(-1,$(nstud$i))]
79
  nstud$i=$[max(-1,$(nstud$i))]
79
  !if NaN isin $(nstud$i) or . isin $(nstud$i)
80
  !if NaN isin $(nstud$i) or . isin $(nstud$i)