Subversion Repositories wimsdev

Rev

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


!bound seq between integer 1 and $seq_cnt+1 default $empty

!if $cf_abandon!=$empty or $seq=$empty
  !reset cf_abandon
  job=show
  !exit
!endif

!if $seq>$maxseq
  error=toomanyseq
  !exit
!endif

!if $cmd=reply
  seq_desc=!replace internal $\
$ by $ $ in $seq_desc
  seq_title=!char 1 to $title_limit of $seq_title
  seq_desc=!char 1 to $desc_limit of $seq_desc
  new_data=:$seq_title\
$seq_desc
  !! ---- check hidedate and showdate
  today=!char 1 to 8 of $wims_now
  thisyear=!char 1 to 4 of $today
  !for k in hide,show
    $(k)date=!text select char 0123456789 in $($(k)date)
    expmon=!char 5 to 6 of $($(k)date)
    expday=!char 7 to 8 of $($(k)date)
    expyear=!char 1 to 4 of $($(k)date)
    !if $expday<1 or $expday>31 or $expmon<1 or $expmon>12 \
      or $expyear<$thisyear or $expyear>$thisyear+1 \
      or $($(k)date)<$class_creation \
      or $($(k)date)>$class_expiration \
      or N isin $expmon$expday$expyear \
      or $($(k)date)<=$today
      !reset $(k)date
    !endif
  !next k
 

  !set listdoc=!makelist doc_ i for i=1 to $docpubliccnt
  !set listc=!filelist $wims_home/log/classes/$wims_class/doc
  !set listc=!lines2items $listc
  !set listc=!replace internal c by c_$ $ in $listc
  !set listexam=!makelist exam_ i for i=1 to $examcnt
  !set listsheet=!makelist sheet_ i for i=1 to $sheetcnt
  !set listvote=!makelist vote_ i for i=1 to $votecnt
  !set listtool=!makelist tool_ i for i=1 to $toolcnt
  !set listglossary=!makelist glossary_ i for i=1 to $glossarycnt
  !set listfreework=!makelist freework_ i for i=1 to $freeworkcnt
  list=!nospace $listc,$listdoc,$listsheet,$listexam,$listvote,$listtool,$listglossary,$listfreework
  list=!nonempty items $list
  list1=debut
  !for x in $list
    list1=!append item $($x) to $list1
  !next
  list1=$(list1[2..-1])
  listcnt=!replace internal ,0, by , in ,$list1,
  listcnt=!nonempty items $listcnt
  listcnt=!itemcnt $listcnt
  !for j = 1 to $listcnt
    jj=!positionof item $j in $list1
    !if $jj!=
      listfinal=!append item $(list[$jj]) to $listfinal
    !endif
  !next j
  list=!replace internal _ by $ $ in $(listfinal)
  new_data=!append line $list to $new_data
  !bound visible within 0,1 default 0
  !writefile wimshome/log/classes/$wims_class/seq/.sequence$seq $new_data\
$visible\
$hidedate\
$showdate

  s_ =!record 0 of .sequences
  s_=!line 2 to -1 of s_
  !if $seq= $[$seq_cnt+1]
    seq_cnt=$[$seq_cnt+1]
    !writefile wimshome/log/classes/$wims_class/seq/.sequences $seq_cnt\
    $s_
  !endif
!endif