Rev 4176 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5665 | obado | 1 | !!!!!!!!!!!!!!!!!!!!!!!!!!! |
2 | !! DEPRECATED : now use adm/class/update.exo |
||
3 | !!!!!!!!!!!!!!!!!!!!!!!!!!! |
||
4 | error= scripts/update.exo is deprecated. use adm/class/update.exo instead. |
||
5 | !exit |
||
6 | |||
7 | !! |
||
8 | !! update a field of an exo of a sheet |
||
4176 | obado | 9 | !! |
5665 | obado | 10 | !! needed information : |
11 | !! sheet : sheet to modify |
||
12 | !! exo : id of exo to be modified in the sheet |
||
13 | !! update_field : is the numbrer of the field to be modified. |
||
14 | !! update_content : new content |
||
15 | number_field=9 |
||
4176 | obado | 16 | ecnt=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheet$qsheet |
17 | !for e=1 to $ecnt |
||
18 | exo_$e=!record $e of wimshome/log/classes/$wims_class/sheets/.sheet$qsheet |
||
5665 | obado | 19 | exo_$e=!line 1 to $number_field of $(exo_$e)\ |
4176 | obado | 20 | \ |
21 | \ |
||
22 | \ |
||
23 | \ |
||
24 | \ |
||
25 | \ |
||
26 | \ |
||
27 | \ |
||
5665 | obado | 28 | \ |
4176 | obado | 29 | |
30 | !next e |
||
31 | !if $update_field>=0 |
||
32 | !if $update_field>0 |
||
5665 | obado | 33 | tmp=!linecnt $(exo_$exo) |
34 | !if $update_field > $tmp |
||
35 | !for tmp2 = 1 to $[$update_field-$tmp] |
||
36 | exo_$exo=!append line $ $ to $(exo_$exo) |
||
37 | !next |
||
38 | !endif |
||
4176 | obado | 39 | exo_$exo=!replace line number $update_field by $update_content in $(exo_$exo) |
40 | !else |
||
41 | exo_$exo=$update_content |
||
42 | !endif |
||
43 | !endif |
||
44 | !writefile wimshome/log/classes/$wims_class/sheets/.sheet$qsheet |
||
45 | !for e=1 to $ecnt |
||
46 | !if $e!=$exo or $update_field>=0 |
||
5665 | obado | 47 | ef=!line 1 to $number_field of $(exo_$e) |
4176 | obado | 48 | !appendfile wimshome/log/classes/$wims_class/sheets/.sheet$qsheet :$ef |
49 | !endif |
||
50 | !next e |
||
51 |