Rev 15789 | Rev 15916 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 15789 | Rev 15910 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | !! job to make/save individualisation of sheet with a technical variable. |
1 | !! job to make/save individualisation of sheet with a technical variable. |
2 | 2 | ||
- | 3 | !if $activesheet=0 |
|
3 | nb=!positionof item $indivtechvar in $tv_listcode |
4 | nb=!positionof item $indivtechvar in $tv_listcode |
4 | don=!line $nb of $tv_listtechvar |
5 | don=!line $nb of $tv_listtechvar |
5 | !distribute item $don into name,classid,number |
6 | !distribute item $don into name,classid,number |
6 | don=!record $number of wimshome/log/classes/$classid/.techvar |
7 | don=!record $number of wimshome/log/classes/$classid/.techvar |
7 | listval=!line 2 of $don |
8 | listval=!line 2 of $don |
- | 9 | !else |
|
- | 10 | listval=!record $sheet of wimshome/log/classes/$wims_class/sheets/.vars |
|
- | 11 | listval=!word 3 to -1 of $listval |
|
- | 12 | listval=!words2items $listval |
|
- | 13 | !endif |
|
8 | nb_val=!itemcnt $listval |
14 | nb_val=!itemcnt $listval |
- | 15 | list_require=!values 10*v for v=0 to $require_limit |
|
9 | 16 | ||
10 | !if $save_indiv!=$empty |
17 | !if $save_indiv!=$empty and $activesheet=0 |
11 | !! save data in .sheet$sheet |
18 | !! save data in .sheet$sheet |
12 | recdata=!record 0 of wimshome/log/classes/$wims_class/sheets/.sheet$sheet |
19 | recdata=!record 0 of wimshome/log/classes/$wims_class/sheets/.sheet$sheet |
13 | !writefile wimshome/sessions/$wims_session/.sheettmp $recdata |
20 | !writefile wimshome/sessions/$wims_session/.sheettmp $recdata |
- | 21 | num=0 |
|
14 | !for i=1 to $exocnt |
22 | !for i=1 to $exocnt |
15 | recdata=!record $i of wimshome/log/classes/$wims_class/sheets/.sheet$sheet |
23 | recdata=!record $i of wimshome/log/classes/$wims_class/sheets/.sheet$sheet |
16 | indiv$i=!listintersect $(indiv$i) and $listval |
24 | indiv$i=!listintersect $(indiv$i) and $listval |
17 | recdata=!replace |
25 | recdata=!replace line number 11 by $(indiv$i) in $recdata\ |
18 | $empty\ |
26 | $empty\ |
19 | $empty\ |
27 | $empty\ |
20 | $empty\ |
28 | $empty\ |
21 | $empty\ |
29 | $empty\ |
22 | $empty\ |
30 | $empty\ |
23 | $empty\ |
31 | $empty\ |
24 | $empty\ |
32 | $empty\ |
25 | $empty\ |
33 | $empty\ |
26 | $empty\ |
34 | $empty\ |
27 | $empty |
35 | $empty |
- | 36 | !! save require and weight in fonction of techvar values |
|
- | 37 | oldrequire=!line 3 of $recdata |
|
- | 38 | oldweight=!line 4 of $recdata |
|
- | 39 | defaultr=!row 1 of $oldrequire |
|
- | 40 | defaultw=!row 1 of $oldrequire |
|
- | 41 | req=$defaultr |
|
- | 42 | wei=$defaultw |
|
- | 43 | !for k=1 to $nb_val |
|
- | 44 | !increase num |
|
- | 45 | !bound require$num within $list_require default $defaultr |
|
- | 46 | !if $(require$num)!=$defaultr |
|
- | 47 | req=$req;$(listval[$k]),$(require$num) |
|
- | 48 | !endif |
|
- | 49 | !bound weight$num between $min_weight and $max_weight default $defaultw |
|
- | 50 | !if $(weight$num)!=$defaultw |
|
- | 51 | wei=$wei;$(listval[$k]),$(weight$num) |
|
- | 52 | !endif |
|
- | 53 | !next k |
|
- | 54 | recdata=!replace line number 3 by $req in $recdata |
|
- | 55 | recdata=!replace line number 4 by $wei in $recdata |
|
28 | recdata=!line 1 to 11 of $recdata |
56 | recdata=!line 1 to 11 of $recdata |
29 | !appendfile wimshome/sessions/$wims_session/.sheettmp :$recdata |
57 | !appendfile wimshome/sessions/$wims_session/.sheettmp :$recdata |
30 | !next i |
58 | !next i |
31 | !reset save_indiv |
59 | !reset save_indiv |
32 | !sh rm -f $wims_home/log/classes/$wims_class/sheets/.sheet$sheet;\ |
60 | !sh rm -f $wims_home/log/classes/$wims_class/sheets/.sheet$sheet;\ |