Rev 11377 | 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
!! allow to order types. The types not written here are automatically added at the end
!set types=first,datalist,question,select,gapfill,classify,order,game,imaudio,chemistry
!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