Subversion Repositories wimsdev

Rev

Rev 13307 | Rev 18010 | 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
13363 guerimand 18
already=$empty
9629 guerimand 19
!for k=1 to $nbexo
12330 bpr 20
  exodon=!line $k of $donnees
21
  test=!item 2 of $exodon
22
  !if exercise iswordof $test
23
    liniparm=!item -2 of $exodon
24
    title=!item -1 of $exodon
25
    !read getparm $liniparm module,worksheet,cmd
26
    test=!getdef category in wimshome/public_html/modules/$get_module/INDEX
27
    !if exercise isin $test or oef isin $test
28
      !for name in cmd,worksheet,module
29
        liniparm=!replace internal $name=$(get_$name) by $empty in $liniparm
30
      !next name
31
      liniparm=!singlespace $liniparm
32
      liniparm=!replace internal & by , in $liniparm
33
      liniparm=!nonempty item $liniparm
34
      liniparm=!replace internal , by & in $liniparm
13363 guerimand 35
      !if $(liniparm),$get_module notlineof $already
36
        already=!append line $(liniparm),$get_module to $already
37
        helpcmd=!item 1 of $exodon
38
        helpcmd=!replace internal : by , in $helpcmd
39
        helpcmd=!replace internal / by , in $(helpcmd[1])
40
        helpcmd=!replace internal . by , in $(helpcmd[-1])
41
        tmp=:$get_module\
9644 guerimand 42
$liniparm\
9629 guerimand 43
10\
44
1\
45
$title\
46
\
9674 guerimand 47
\
48
\
49
module=$dir&block=$(helpcmd[1])&cmd=new,10
9629 guerimand 50
 
13363 guerimand 51
        donsh=!append line $tmp to $donsh
52
      !endif
12330 bpr 53
    !endif
9644 guerimand 54
  !endif
9629 guerimand 55
!next k
56
 
9644 guerimand 57
!if $donsh=$empty
12338 bpr 58
  error=noexo
59
  wims_menu_items=!append line back2,1,cmd=reply&job=prop to $wims_menu_items
60
  !exit
9644 guerimand 61
!endif
62
 
9629 guerimand 63
autosheet=$[$nbsheet+1]
9644 guerimand 64
 
9629 guerimand 65
!writefile wimshome/log/classes/$wims_class/sheets/.sheet$autosheet $donsh
9672 guerimand 66
 
67
title=!line 3 of $docu
68
desc=!line 4 of $docu
9629 guerimand 69
date=!defof class_expiration in wimshome/log/classes/$wims_class/.def
9644 guerimand 70
 
9629 guerimand 71
!appendfile wimshome/log/classes/$wims_class/sheets/.sheets :0\
72
$date\
9672 guerimand 73
$title\
74
$desc\
75
\
76
autogenerate for document
77
 
9629 guerimand 78
message=$name_confirmmksheet
9644 guerimand 79
docu=!nonempty line $docu
9629 guerimand 80
n=!linecnt $docu
81
!if $n<=6
13307 bpr 82
  docu=!append line $autosheet to $docu
9629 guerimand 83
!else
13307 bpr 84
  docu=!replace line number 7 by $autosheet in $docu
9629 guerimand 85
!endif
9665 guerimand 86
docu=!replace line number 6 by $autosheet in $docu
9629 guerimand 87
!read proc/updatefield.proc wimshome/log/classes/$wims_class/doc/.docindex\
88
$sdoc\
89
\
90
$docu
91
!distribute lines $docu into dir,param,title,desc,status,wksheet,autosheet
92
nbsheet=$[$nbsheet+1]
93
job=prop