Subversion Repositories wimsdev

Rev

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

Rev Author Line No. Line
11375 bpr 1
type=gapfill
13705 obado 2
textarea="data pre post"
3
iEdit="pre post"
23 reyssat 4
 
4131 bpr 5
:Fill in the blanks in a random text.
23 reyssat 6
 
4131 bpr 7
The exercise presents texts where a certain number of
8
blanks have to be filled in. For each blank several answers are provided but
9
only one is correct.
23 reyssat 10
<p>
4131 bpr 11
To make an exercise with this model, type the texts.
12
Insert blanks in the texts according to the syntax explained below.
13477 obado 13
</p><p class="wims_credits">
8002 bpr 14
Author of the model: Gang Xiao <qualite@wimsedu.info> modified by Bernadette Perrin-Riou
4706 bpr 15
(option clickfill)
13477 obado 16
</p>
23 reyssat 17
:%%%%%%%%%%%%%%%%%      ATTENTION      %%%%%%%%%%%%%%%%%%%%
18
 
4131 bpr 19
Remove the above header if you destroy the model tags i.e. the lines starting
20
with a ':'. Otherwise the exercise might not be recognised by Createxo.
23 reyssat 21
 
22
:%%%%%%%% Example parameters to be redefined %%%%%%%%%%%%%%%%%
23
 
4131 bpr 24
:\title{Fill in the blanks}
5147 bpr 25
:\author{XIAO, Gang}
8002 bpr 26
:\email{qualite@wimsedu.info}
5724 bpr 27
:\credits{}
23 reyssat 28
 
13705 obado 29
:Response format
30
 
7165 bpr 31
\text{format=item(1,menu,
13705 obado 32
clickfill,
33
dragfill)}
4706 bpr 34
 
7166 bpr 35
:Size
4706 bpr 36
\text{len=150 x 25}
37
 
13705 obado 38
:Main data
39
<p>Type the text with one blank per line. Separate different texts by a semi-colon.
40
(Make sure the texts themselves do not contain semi-colons, if you need
41
to include semi-colons in a text use its html code.)</p><p>
4135 bpr 42
Each blank should be placed between a pair of double-question marks
8002 bpr 43
"??". (Up to 20 blanks can be specified in each text.) The right answer should be written first,
13705 obado 44
followed by the wrong answers, the answers separated by a comma.</p>
4248 bpr 45
 
23 reyssat 46
$embraced_randitem
47
\text{data=
48
The last emperor ??Pu Yi, Pu Jie, Ci Xi, Yuan Shikai??
49
of the last Chinese dynasty ??Qing,Ming,Song,Tang??, was destituted by
4135 bpr 50
??a military uprising, the Japanses invaders,The soviet Red Army,
23 reyssat 51
the communists?? in
13705 obado 52
??1911,1917,1937,1945,1949??.
53
He ??died of a disease,was executed,committed suicide?? in
23 reyssat 54
??1967,1911,1918,1945,1950,1960?? in Beijing.;
55
 
4135 bpr 56
After ??a ferocious,an easy?? battle, the Japanese invaded Shanghai in
23 reyssat 57
??1937,1932,1938,1940,1941,1942?? which had an western "common"
13705 obado 58
concession in that time.
59
They ??partially, totally, not at all?? respected the neutrality of the concession
23 reyssat 60
during their occupation up to ??1941,1939,1942,1945??. The abolition of the
61
concession was first pronounced by the
4135 bpr 62
??puppet,nationalist,communist?? government
23 reyssat 63
in ??1943,1945,1949,1960??.;
64
 
65
The first opium war was launched by
4135 bpr 66
??Great Britain,France, the United States, several western countries??
67
against ??China, India?? in ??1839,{1739,1741,1756},1841,1856}??, with the aim of
13705 obado 68
??protecting,prohibiting?? the drug (opium) traffic.
69
This ended by the capitulation of the ??Chinese,Indian?? government
23 reyssat 70
??3,2,4,5,8?? years later, with the signature of the treaty of
71
??Nankin,Pekin,Canton,Maguan,Taiping,Tianjin??.;
72
}
73
 
13705 obado 74
:Text before the question. can be empty.
23 reyssat 75
$embraced_randitem
8512 bpr 76
\text{pre=Fill-in the choices:}
23 reyssat 77
 
13705 obado 78
:Text after the question. can be empty.
23 reyssat 79
$embraced_randitem
80
\text{post=}
81
 
11544 obado 82
:Embraced random items
7165 bpr 83
$embraced_randitem
84
\text{accolade=item(1,1 yes,
85
2 no)}
86
 
23 reyssat 87
:%%%%%%%%%%%%%% Nothing to modify before the statement %%%%%%%%%%%%%%%%
13550 bpr 88
\text{accolade=wims(word 1 of \accolade)}
7165 bpr 89
\text{format=wims(word 1 of \format)}
13564 bpr 90
\text{len=\format issametext menu ? }
23 reyssat 91
\text{data=wims(singlespace \data)}
92
\text{data=wims(nonempty rows \data)}
93
\text{data=randomrow(\data)}
7165 bpr 94
\text{data=\accolade=1 ?wims(embraced randitem \data)}
23 reyssat 95
\text{data=slib(text/cutchoice2 \data)}
96
\integer{qs=min(20,floor(rows(\data)/2))}
97
 
98
\text{good=}
99
\text{field=}
100
\for{i=1 to \qs}{
101
 \text{f=\data[2*\i;]}
102
 \text{g=\f[1]}
103
 \text{f=wims(sort items \f)}
4706 bpr 104
 \text{g1=positionof(\g,\f)}
7165 bpr 105
 \text{good=\format iswordof clickfill dragfill ?\good\g,:\good\g1,}
23 reyssat 106
 \text{field=\field\f;}
107
}
108
 
7165 bpr 109
\text{pre=\accolade=1 ?wims(embraced randitem \pre)}
110
\text{post=\accolade=1 ?wims(embraced randitem \post)}
23 reyssat 111
\text{qlist=wims(makelist reply x for x=1 to \qs)}
112
\steps{\qlist}
113
 
114
:%%%%%%%%%%%%% Now the statement in html. %%%%%%%%%%%%%%%%%%%%
115
 
116
::You don't need to modify this in general.
117
 
13564 bpr 118
\statement{
119
  <div class="instruction">\pre</div>
120
  \data[1;]
121
  \for{k=1 to \qs}{
122
    \embed{r \k,\len} \data[2*\k+1;]
123
  }
124
  \post
23 reyssat 125
}
126
 
127
:%%%%%%%%%%%%% Nothing to modify after. %%%%%%%%%%%%%%%%%5
128
 
13704 obado 129
\answer{Field 1}{\good[1];\field[1;]}{type=\format}
130
\answer{Field 2}{\good[2];\field[2;]}{type=\format}
131
\answer{Field 3}{\good[3];\field[3;]}{type=\format}
132
\answer{Field 4}{\good[4];\field[4;]}{type=\format}
133
\answer{Field 5}{\good[5];\field[5;]}{type=\format}
134
\answer{Field 6}{\good[6];\field[6;]}{type=\format}
135
\answer{Field 7}{\good[7];\field[7;]}{type=\format}
136
\answer{Field 8}{\good[8];\field[8;]}{type=\format}
137
\answer{Field 9}{\good[9];\field[9;]}{type=\format}
138
\answer{Field 10}{\good[10];\field[10;]}{type=\format}
139
\answer{Field 11}{\good[11];\field[11;]}{type=\format}
140
\answer{Field 12}{\good[12];\field[12;]}{type=\format}
141
\answer{Field 13}{\good[13];\field[13;]}{type=\format}
142
\answer{Field 14}{\good[14];\field[14;]}{type=\format}
143
\answer{Field 15}{\good[15];\field[15;]}{type=\format}
144
\answer{Field 16}{\good[16];\field[16;]}{type=\format}
145
\answer{Field 17}{\good[17];\field[17;]}{type=\format}
146
\answer{Field 18}{\good[18];\field[18;]}{type=\format}
147
\answer{Field 19}{\good[19];\field[19;]}{type=\format}
148
\answer{Field 20}{\good[20];\field[20;]}{type=\format}
23 reyssat 149