Subversion Repositories wimsdev

Rev

Rev 14646 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5205 guerimand 1
!! add help to a series of exercise of a sheet
2
!!
3
 
4
!default step=0
5
!default picksheet=1
6
!bound note between 0 and 10 default 10
14646 bpr 7
!bound note2 between 0 and $[max($note-1,0)] default 0
5205 guerimand 8
 
9
sheets=
10
!for i=1 to $sheettot
12489 bpr 11
  sh=!record $i of wimshome/log/classes/$wims_class/sheets/.sheets
12
  !distribute lines $sh into a_,t_,title
13
  nb=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheet$i
14
  sheets=!append line $i,$nb,$title to $sheets
5205 guerimand 15
!next i
16
sheetcnt=!linecnt $sheets
5215 guerimand 17
lnumsheet=!column 1 of $sheets
5205 guerimand 18
 
16466 guerimand 19
tmptest=print=yes
20
!if $tmptest isin $iniparm
21
  error=printversion
22
  !exit
23
!endif
24
 
5205 guerimand 25
!if $step=0
12489 bpr 26
  !ifval $sheetcnt=0
27
    error=no_sheet
28
    !exit
29
  !endif
30
  !bound picksheet within $lnumsheet default $(lnumsheet[1])
5205 guerimand 31
  !exit
32
!endif
33
 
34
!if $step=1
12489 bpr 35
  !bound picksheet within $lnumsheet default 0
13567 bpr 36
  !set nbexo=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheet$picksheet
37
  !bound exo between 1 and $nbexo default 0
12489 bpr 38
  !ifval $exo*$picksheet=0
39
    error=bad_exo
40
    !exit
41
  !endif
42
  update_field=9
43
  t=cmd=new
44
  !if $t notin $iniparm
14646 bpr 45
    update_content=module=$dir&$iniparm&cmd=new,$note,$note2
12489 bpr 46
  !else
14646 bpr 47
    update_content=module=$dir&$iniparm,$note,$note2
12489 bpr 48
  !endif
14646 bpr 49
  !if $feedinsert=1
50
    old_content=!record $exo of wimshome/log/classes/$wims_class/sheets/.sheet$picksheet
51
    old_content=!line 9 of $old_content
52
    !if $old_content!=$empty
53
      update_content=$old_content;$update_content
54
    !endif
55
  !endif
12489 bpr 56
  sheet=$picksheet
57
  !read adm/class/update.exo
12595 bpr 58
  !if $dir!=adm/tool/glossary
59
    title=!module title $dir
60
    desc=!module description $dir
61
  !else
62
    !set gl=!getopt gl in $iniparm
63
    title=!record $gl of wimshome/log/classes/$wims_class/tool/.glossaryindex
64
    title=!line 2 of $title
65
  !endif
5205 guerimand 66
!endif