Subversion Repositories wimsdev

Rev

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