Subversion Repositories wimsdev

Rev

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