Subversion Repositories wimsdev

Rev

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

Rev Author Line No. Line
11375 bpr 1
type=classify
23 reyssat 2
textarea="data explain"
3
 
4131 bpr 4
:Match two items.
23 reyssat 5
 
4131 bpr 6
Items are presented in a table in two columns. Match the
7
items by clicking on the two items that correspond.
23 reyssat 8
<p>
4131 bpr 9
To make an exercise with this model, type the list of
10
matching items.
23 reyssat 11
<p>
4131 bpr 12
With a slight modification, a variant of this exercise can accept images as items.
23 reyssat 13
<p>
8002 bpr 14
Author of the model: Gang Xiao <qualite@wimsedu.info>
23 reyssat 15
 
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
 
23
:\title{Correspondance}
5147 bpr 24
:\author{Gang, Xiao}
8002 bpr 25
:\email{qualite@wimsedu.info}
5724 bpr 26
:\credits{}
23 reyssat 27
 
4131 bpr 28
:Number of (pairs of) matching items.
23 reyssat 29
\integer{tot=6}
30
 
4131 bpr 31
:The vertical size of labels in pixels.
32
Think of people who have to increase the font size of their browsers to see well!
33
Don't make the labels too small.
34
 
35
 
23 reyssat 36
\integer{sizev=50}
37
 
38
:The horizontal size of left boxes in pixels.
4131 bpr 39
Think of people who have to increase the font size of their browsers to see well!
40
Don't make the labels too small.
23 reyssat 41
\integer{sizel=250}
42
 
43
:The horizontal size of right boxes in pixels.
4131 bpr 44
Think of people who have to increase the font size of their browsers to see well!
45
Don't make the labels too small.
23 reyssat 46
\integer{sizer=250}
47
 
48
:Main data.
4131 bpr 49
Write one pair of corresponding items per line, separated by a comma.
8512 bpr 50
$embraced_randitem
23 reyssat 51
\matrix{data=
52
Germany,		Berlin
53
Australia,		Canberra
54
Canada,			Ottawa
55
China,			Beijing
56
Spain,			Madrid
57
United States,		Washington
58
France,			Paris
59
Great Britain,		London
60
India,			New Delhi
61
Indonesia,		Jacarta
62
Italy,			Rome
63
Japon,			Tokyo
64
Russia,			Moscow
65
}
66
 
67
:Text that explains what should be done.
68
$embraced_randitem
4131 bpr 69
\text{explain=Match the countries and their
23 reyssat 70
capitals.}
71
 
8512 bpr 72
:Mise en aléatoire par des accolades emboitables
73
$embraced_randitem
74
 
75
\text{accolade=item(1,1 oui,
76
2 non)}
77
 
78
\text{accolade=item(1,1 oui,
79
2 non)}
80
 
23 reyssat 81
:%%%%%%%%%%%%%% Nothing to modify before the statement %%%%%%%%%%%%%%%%
82
 
83
\integer{datacnt=rows(\data)}
84
\integer{tot=\tot>\datacnt?\datacnt}
85
 
86
\text{shuf=item(1..\tot,shuffle(\datacnt))}
87
\text{data=row(\shuf,\data)}
8512 bpr 88
\text{data=\accolade=1? wims(embraced randitem \data)}
89
 
23 reyssat 90
\text{datal=column(1,\data)}
91
\text{datar=column(2,\data)}
92
\text{size=\sizev[]x\sizel[]x\sizer}
8512 bpr 93
\text{explain=\accolade=1? wims(embraced randitem \explain)}
23 reyssat 94
 
95
:%%%%%%%%%%%%% Now the statement in html. %%%%%%%%%%%%%%%%%%%%
96
 
97
::You don't need to modify this in general.
98
 
99
The command to show the correspondance table, it is
100
\embed{reply 1,\size}
101
 
102
\statement{\explain
103
 
8512 bpr 104
<div class="wimscenter">
23 reyssat 105
\embed{reply 1,\size}
8512 bpr 106
</div>
23 reyssat 107
 
108
}
109
 
110
:%%%%%%%%%%%%% Nothing to modify after. %%%%%%%%%%%%%%%%%5
111
 
112
\answer{The reply}{\datal;\datar}{type=correspond}