Subversion Repositories wimsdev

Rev

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

Rev Author Line No. Line
23 reyssat 1
 
2879 bpr 2
listfile=wimshome/public_html/scripts/model/$lang/list
23 reyssat 3
!reset list_exists
4
!read $listfile
5
!if $list_exists=yes
6
 !exit
7
!endif
8
 
2879 bpr 9
src=!sh cd $wims_home/public_html/scripts/model/$lang/src; ls *.oef | sed 's/.oef$$//'
23 reyssat 10
src=!words2items $src
11
 
12
!writefile $listfile
11367 bpr 13
!set types=first,datalist,question,select,order,gapfill,classify,game,image
23 reyssat 14
!for f in $src
2455 bpr 15
 def=!record 0 of model/$lang/src/$f.oef
23 reyssat 16
 type=!getopt type in $def
6439 bpr 17
 !if $type!=$empty and text/css notin $type
23 reyssat 18
  !if $type notitemof $types
19
   types=!append item $type to $types
20
   type_$type=
21
  !endif
22
  type_$type=!append item $f to $(type_$type)
2455 bpr 23
  desc=!record 1 of model/$lang/src/$f.oef
23 reyssat 24
  desc=!line 1 of $desc
25
  tit=
26
  !for i=2 to 8
2455 bpr 27
   r=!record $i of model/$lang/src/$f.oef
23 reyssat 28
   r=!trim $r
29
   c=!char 1 of $r
30
   !if \ = $c and +++\title isin +++$r
31
    tit=!embraced extract $r
32
    !break
33
   !endif
34
  !next i
35
  !appendfile $listfile tit_$f=$tit\
36
desc_$f=$desc
37
 !endif
38
!next f
39
 
40
!appendfile $listfile list_exists=yes\
41
types=$types
42
 
43
!for t in $types
44
 !appendfile $listfile type_$t=$(type_$t)
45
!next t
46
 
47
!read $listfile