Subversion Repositories wimsdev

Rev

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


listfile=wimshome/public_html/scripts/model/$lang/list
!reset list_exists
!read $listfile
!if $list_exists=yes
 !exit
!endif

src=!sh cd $wims_home/public_html/scripts/model/$lang/src; ls *.oef | sed 's/.oef$$//'
src=!words2items $src

!writefile $listfile
!set types=first,datalist,question,select,order,gapfill,classify,game,image
!for f in $src
 def=!record 0 of model/$lang/src/$f.oef
 type=!getopt type in $def
 !if $type!=$empty and text/css notin $type
  !if $type notitemof $types
   types=!append item $type to $types
   type_$type=
  !endif
  type_$type=!append item $f to $(type_$type)
  desc=!record 1 of model/$lang/src/$f.oef
  desc=!line 1 of $desc
  tit=
  !for i=2 to 8
   r=!record $i of model/$lang/src/$f.oef
   r=!trim $r
   c=!char 1 of $r
   !if \ = $c and +++\title isin +++$r
    tit=!embraced extract $r
    !break
   !endif
  !next i
  !appendfile $listfile tit_$f=$tit\
desc_$f=$desc
 !endif
!next f

!appendfile $listfile list_exists=yes\
types=$types

!for t in $types
 !appendfile $listfile type_$t=$(type_$t)
!next t

!read $listfile