Subversion Repositories wimsdev

Rev

Rev 11377 | 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
13626 bpr 6
  !exit
23 reyssat 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
11371 bpr 13
!! allow to order types. The types not written here are automatically added at the end
11377 bpr 14
!set types=first,datalist,question,select,gapfill,classify,order,game,imaudio,chemistry
23 reyssat 15
!for f in $src
13626 bpr 16
  def=!record 0 of model/$lang/src/$f.oef
17
  type=!getopt type in $def
18
  !if $type!=$empty and text/css notin $type
19
    !if $type notitemof $types
20
      types=!append item $type to $types
21
      type_$type=
22
    !endif
23
    type_$type=!append item $f to $(type_$type)
24
    desc=!record 1 of model/$lang/src/$f.oef
25
    desc=!line 1 of $desc
26
    tit=
27
    !for i=2 to 8
28
      r=!record $i of model/$lang/src/$f.oef
29
      r=!trim $r
30
      c=!char 1 of $r
31
      !if \ = $c and +++\title isin +++$r
32
        tit=!embraced extract $r
33
        !break
34
      !endif
35
    !next i
36
    !appendfile $listfile tit_$f=$tit\
37
desc_$f=$desc
23 reyssat 38
  !endif
39
!next f
40
 
41
!appendfile $listfile list_exists=yes\
42
types=$types
43
 
44
!for t in $types
13626 bpr 45
  !appendfile $listfile type_$t=$(type_$t)
23 reyssat 46
!next t
47
 
48
!read $listfile