Subversion Repositories wimsdev

Rev

Rev 13567 | Rev 16466 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

!! add help to a series of exercise of a sheet
!!

!default step=0
!default picksheet=1
!bound note between 0 and 10 default 10
!bound note2 between 0 and $[max($note-1,0)] default 0

sheets=
!for i=1 to $sheettot
  sh=!record $i of wimshome/log/classes/$wims_class/sheets/.sheets
  !distribute lines $sh into a_,t_,title
  nb=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheet$i
  sheets=!append line $i,$nb,$title to $sheets
!next i
sheetcnt=!linecnt $sheets
lnumsheet=!column 1 of $sheets

!if $step=0
  !ifval $sheetcnt=0
    error=no_sheet
    !exit
  !endif
  !bound picksheet within $lnumsheet default $(lnumsheet[1])
  !exit
!endif

!if $step=1
  !bound picksheet within $lnumsheet default 0
  !set nbexo=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheet$picksheet
  !bound exo between 1 and $nbexo default 0
  !ifval $exo*$picksheet=0
    error=bad_exo
    !exit
  !endif
  update_field=9
  t=cmd=new
  !if $t notin $iniparm
    update_content=module=$dir&$iniparm&cmd=new,$note,$note2
  !else
    update_content=module=$dir&$iniparm,$note,$note2
  !endif
  !if $feedinsert=1
    old_content=!record $exo of wimshome/log/classes/$wims_class/sheets/.sheet$picksheet
    old_content=!line 9 of $old_content
    !if $old_content!=$empty
      update_content=$old_content;$update_content
    !endif
  !endif
  sheet=$picksheet
  !read adm/class/update.exo
  !if $dir!=adm/tool/glossary
    title=!module title $dir
    desc=!module description $dir
  !else
    !set gl=!getopt gl in $iniparm
    title=!record $gl of wimshome/log/classes/$wims_class/tool/.glossaryindex
    title=!line 2 of $title
  !endif
!endif