Subversion Repositories wimsdev

Rev

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