Rev 15916 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
15763 | guerimand | 1 | !! job to make/save individualisation of sheet with a technical variable. |
2 | |||
15916 | guerimand | 3 | !if $activetest=0 |
15910 | guerimand | 4 | nb=!positionof item $indivtechvar in $tv_listcode |
5 | don=!line $nb of $tv_listtechvar |
||
6 | !distribute item $don into name,classid,number |
||
7 | don=!record $number of wimshome/log/classes/$classid/.techvar |
||
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 |
||
15763 | guerimand | 14 | nb_val=!itemcnt $listval |
15910 | guerimand | 15 | list_require=!values 10*v for v=0 to $require_limit |
15763 | guerimand | 16 | |
15917 | guerimand | 17 | !if $save_indiv!=$empty and $activetest=0 |
15763 | guerimand | 18 | !! save data in .sheet$sheet |
19 | recdata=!record 0 of wimshome/log/classes/$wims_class/sheets/.sheet$sheet |
||
20 | !writefile wimshome/sessions/$wims_session/.sheettmp $recdata |
||
15910 | guerimand | 21 | num=0 |
15763 | guerimand | 22 | !for i=1 to $exocnt |
23 | recdata=!record $i of wimshome/log/classes/$wims_class/sheets/.sheet$sheet |
||
24 | indiv$i=!listintersect $(indiv$i) and $listval |
||
15910 | guerimand | 25 | recdata=!replace line number 11 by $(indiv$i) in $recdata\ |
15763 | guerimand | 26 | $empty\ |
27 | $empty\ |
||
28 | $empty\ |
||
29 | $empty\ |
||
30 | $empty\ |
||
31 | $empty\ |
||
32 | $empty\ |
||
33 | $empty\ |
||
34 | $empty\ |
||
35 | $empty |
||
15910 | guerimand | 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 |
||
15789 | guerimand | 56 | recdata=!line 1 to 11 of $recdata |
15763 | guerimand | 57 | !appendfile wimshome/sessions/$wims_session/.sheettmp :$recdata |
58 | !next i |
||
59 | !reset save_indiv |
||
60 | !sh rm -f $wims_home/log/classes/$wims_class/sheets/.sheet$sheet;\ |
||
61 | mv $wims_home/sessions/$wims_session/.sheettmp $wims_home/log/classes/$wims_class/sheets/.sheet$sheet; |
||
62 | !endif |