Rev 9629 | Rev 9644 | 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 |
||
5 | |||
6 | docu=!record $sdoc of wimshome/log/classes/$wims_class/doc/.docindex |
||
9633 | guerimand | 7 | autosheet=!line 7 of $docu |
8 | !if $autosheet!=$empty |
||
9 | !exit |
||
10 | !endif |
||
9629 | guerimand | 11 | dir=!line 1 of $docu |
12 | donnees=!sh grep -a primitives.phtml $wims_home/public_html/modules/$dir/doc/1/*.def | grep -a exercise |
||
13 | nbexo=!linecnt $donnees |
||
14 | donsh=$empty |
||
15 | !for k=1 to $nbexo |
||
16 | exodon=!line $k of $donnees |
||
17 | iniparm=!item -2 of $exodon |
||
18 | title=!item -1 of $exodon |
||
19 | !read getparm $iniparm module,worksheet,cmd |
||
20 | !for name in cmd,worksheet,module |
||
21 | iniparm=!replace internal $name=$(get_$name) by $empty in $iniparm |
||
22 | !next name |
||
23 | iniparm=!singlespace $iniparm |
||
24 | iniparm=!replace internal & by , in $iniparm |
||
25 | iniparm=!nonempty item $iniparm |
||
26 | iniparm=!replace internal , by & in $iniparm |
||
27 | !if $iniparm!=$empty |
||
28 | tmp=:$get_module\ |
||
29 | $iniparm\ |
||
30 | 10\ |
||
31 | 1\ |
||
32 | $title\ |
||
33 | \ |
||
34 | |||
35 | donsh=!append line $tmp to $donsh |
||
36 | !endif |
||
37 | !next k |
||
38 | |||
39 | autosheet=$[$nbsheet+1] |
||
40 | !writefile wimshome/log/classes/$wims_class/sheets/.sheet$autosheet $donsh |
||
41 | title=!line 4 of $docu |
||
42 | date=!defof class_expiration in wimshome/log/classes/$wims_class/.def |
||
43 | !appendfile wimshome/log/classes/$wims_class/sheets/.sheets :0\ |
||
44 | $date\ |
||
45 | $title |
||
46 | |||
47 | message=$name_confirmmksheet |
||
48 | n=!linecnt $docu |
||
49 | !if $n<=6 |
||
50 | docu=!append line $autosheet to $docu |
||
51 | !else |
||
52 | docu=!replace line number 7 by $autosheet in $docu |
||
53 | !endif |
||
54 | !read proc/updatefield.proc wimshome/log/classes/$wims_class/doc/.docindex\ |
||
55 | $sdoc\ |
||
56 | \ |
||
57 | $docu |
||
58 | !distribute lines $docu into dir,param,title,desc,status,wksheet,autosheet |
||
59 | nbsheet=$[$nbsheet+1] |
||
60 | job=prop |