Rev 11377 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 11377 | Rev 13626 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | 1 | ||
2 | listfile=wimshome/public_html/scripts/model/$lang/list |
2 | listfile=wimshome/public_html/scripts/model/$lang/list |
3 | !reset list_exists |
3 | !reset list_exists |
4 | !read $listfile |
4 | !read $listfile |
5 | !if $list_exists=yes |
5 | !if $list_exists=yes |
6 | !exit |
6 | !exit |
7 | !endif |
7 | !endif |
8 | 8 | ||
9 | src=!sh cd $wims_home/public_html/scripts/model/$lang/src; ls *.oef | sed 's/.oef$$//' |
9 | src=!sh cd $wims_home/public_html/scripts/model/$lang/src; ls *.oef | sed 's/.oef$$//' |
10 | src=!words2items $src |
10 | src=!words2items $src |
11 | 11 | ||
12 | !writefile $listfile |
12 | !writefile $listfile |
13 | !! allow to order types. The types not written here are automatically added at the end |
13 | !! allow to order types. The types not written here are automatically added at the end |
14 | !set types=first,datalist,question,select,gapfill,classify,order,game,imaudio,chemistry |
14 | !set types=first,datalist,question,select,gapfill,classify,order,game,imaudio,chemistry |
15 | !for f in $src |
15 | !for f in $src |
16 | def=!record 0 of model/$lang/src/$f.oef |
16 | def=!record 0 of model/$lang/src/$f.oef |
17 | type=!getopt type in $def |
17 | type=!getopt type in $def |
18 | !if $type!=$empty and text/css notin $type |
18 | !if $type!=$empty and text/css notin $type |
19 | !if $type notitemof $types |
19 | !if $type notitemof $types |
20 | types=!append item $type to $types |
20 | types=!append item $type to $types |
21 | type_$type= |
21 | type_$type= |
22 | !endif |
22 | !endif |
23 | type_$type=!append item $f to $(type_$type) |
23 | type_$type=!append item $f to $(type_$type) |
24 | desc=!record 1 of model/$lang/src/$f.oef |
24 | desc=!record 1 of model/$lang/src/$f.oef |
25 | desc=!line 1 of $desc |
25 | desc=!line 1 of $desc |
26 | tit= |
26 | tit= |
27 | !for i=2 to 8 |
27 | !for i=2 to 8 |
28 | r=!record $i of model/$lang/src/$f.oef |
28 | r=!record $i of model/$lang/src/$f.oef |
29 | r=!trim $r |
29 | r=!trim $r |
30 | c=!char 1 of $r |
30 | c=!char 1 of $r |
31 | !if \ = $c and +++\title isin +++$r |
31 | !if \ = $c and +++\title isin +++$r |
32 | tit=!embraced extract $r |
32 | tit=!embraced extract $r |
33 | !break |
33 | !break |
34 | !endif |
34 | !endif |
35 | !next i |
35 | !next i |
36 | !appendfile $listfile tit_$f=$tit\ |
36 | !appendfile $listfile tit_$f=$tit\ |
37 | desc_$f=$desc |
37 | desc_$f=$desc |
38 | !endif |
38 | !endif |
39 | !next f |
39 | !next f |
40 | 40 | ||
41 | !appendfile $listfile list_exists=yes\ |
41 | !appendfile $listfile list_exists=yes\ |
42 | types=$types |
42 | types=$types |
43 | 43 | ||
44 | !for t in $types |
44 | !for t in $types |
45 | !appendfile $listfile type_$t=$(type_$t) |
45 | !appendfile $listfile type_$t=$(type_$t) |
46 | !next t |
46 | !next t |
47 | 47 | ||
48 | !read $listfile |
48 | !read $listfile |