Rev 12338 | Rev 13363 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
9629 | guerimand | 1 | !if $nbsheet>=$max_sheets |
2 | error=toomuchsheet |
||
3 | !exit |
||
4 | !endif |
||
12338 | bpr | 5 | !if $type=tool |
6 | !exit |
||
7 | !endif |
||
9629 | guerimand | 8 | docu=!record $sdoc of wimshome/log/classes/$wims_class/doc/.docindex |
9633 | guerimand | 9 | autosheet=!line 7 of $docu |
10 | !if $autosheet!=$empty |
||
12330 | bpr | 11 | !exit |
9633 | guerimand | 12 | !endif |
9629 | guerimand | 13 | dir=!line 1 of $docu |
9682 | bpr | 14 | |
15 | donnees=!sh grep -a primitives.phtml $wims_home/public_html/modules/$dir/doc/1/*.def | grep exercise |
||
9629 | guerimand | 16 | nbexo=!linecnt $donnees |
17 | donsh=$empty |
||
18 | !for k=1 to $nbexo |
||
12330 | bpr | 19 | exodon=!line $k of $donnees |
20 | test=!item 2 of $exodon |
||
21 | !if exercise iswordof $test |
||
22 | liniparm=!item -2 of $exodon |
||
23 | title=!item -1 of $exodon |
||
24 | !read getparm $liniparm module,worksheet,cmd |
||
25 | test=!getdef category in wimshome/public_html/modules/$get_module/INDEX |
||
26 | !if exercise isin $test or oef isin $test |
||
27 | !for name in cmd,worksheet,module |
||
28 | liniparm=!replace internal $name=$(get_$name) by $empty in $liniparm |
||
29 | !next name |
||
30 | liniparm=!singlespace $liniparm |
||
31 | liniparm=!replace internal & by , in $liniparm |
||
32 | liniparm=!nonempty item $liniparm |
||
33 | liniparm=!replace internal , by & in $liniparm |
||
34 | helpcmd=!item 1 of $exodon |
||
35 | helpcmd=!replace internal : by , in $helpcmd |
||
36 | helpcmd=!replace internal / by , in $(helpcmd[1]) |
||
37 | helpcmd=!replace internal . by , in $(helpcmd[-1]) |
||
38 | tmp=:$get_module\ |
||
9644 | guerimand | 39 | $liniparm\ |
9629 | guerimand | 40 | 10\ |
41 | 1\ |
||
42 | $title\ |
||
43 | \ |
||
9674 | guerimand | 44 | \ |
45 | \ |
||
46 | module=$dir&block=$(helpcmd[1])&cmd=new,10 |
||
9629 | guerimand | 47 | |
12330 | bpr | 48 | donsh=!append line $tmp to $donsh |
49 | !endif |
||
9644 | guerimand | 50 | !endif |
9629 | guerimand | 51 | !next k |
52 | |||
9644 | guerimand | 53 | !if $donsh=$empty |
12338 | bpr | 54 | error=noexo |
55 | wims_menu_items=!append line back2,1,cmd=reply&job=prop to $wims_menu_items |
||
56 | !exit |
||
9644 | guerimand | 57 | !endif |
58 | |||
9629 | guerimand | 59 | autosheet=$[$nbsheet+1] |
9644 | guerimand | 60 | |
9629 | guerimand | 61 | !writefile wimshome/log/classes/$wims_class/sheets/.sheet$autosheet $donsh |
9672 | guerimand | 62 | |
63 | title=!line 3 of $docu |
||
64 | desc=!line 4 of $docu |
||
9629 | guerimand | 65 | date=!defof class_expiration in wimshome/log/classes/$wims_class/.def |
9644 | guerimand | 66 | |
9629 | guerimand | 67 | !appendfile wimshome/log/classes/$wims_class/sheets/.sheets :0\ |
68 | $date\ |
||
9672 | guerimand | 69 | $title\ |
70 | $desc\ |
||
71 | \ |
||
72 | autogenerate for document |
||
73 | |||
9629 | guerimand | 74 | message=$name_confirmmksheet |
9644 | guerimand | 75 | docu=!nonempty line $docu |
9629 | guerimand | 76 | n=!linecnt $docu |
77 | !if $n<=6 |
||
13307 | bpr | 78 | docu=!append line $autosheet to $docu |
9629 | guerimand | 79 | !else |
13307 | bpr | 80 | docu=!replace line number 7 by $autosheet in $docu |
9629 | guerimand | 81 | !endif |
9665 | guerimand | 82 | docu=!replace line number 6 by $autosheet in $docu |
9629 | guerimand | 83 | !read proc/updatefield.proc wimshome/log/classes/$wims_class/doc/.docindex\ |
84 | $sdoc\ |
||
85 | \ |
||
86 | $docu |
||
87 | !distribute lines $docu into dir,param,title,desc,status,wksheet,autosheet |
||
88 | nbsheet=$[$nbsheet+1] |
||
89 | job=prop |