Subversion Repositories wimsdev

Rev

Rev 14929 | 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"
13715 obado 3
iEdit="explain"
23 reyssat 4
 
4131 bpr 5
:Match two items.
23 reyssat 6
 
4131 bpr 7
Items are presented in a table in two columns. Match the
8
items by clicking on the two items that correspond.
23 reyssat 9
<p>
13704 obado 10
To make an exercise with this model, type the list of matching items.
13477 obado 11
</p><p>
4131 bpr 12
With a slight modification, a variant of this exercise can accept images as items.
14929 lemaire 13
</p>
23 reyssat 14
 
15179 lemaire 15
<p class="wims_credits">Author of the model: <a href="mailto:qualite@wimsedu.info">Gang Xiao</a></p>
14929 lemaire 16
 
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
 
24
:\title{Correspondance}
5147 bpr 25
:\author{Gang, Xiao}
8002 bpr 26
:\email{qualite@wimsedu.info}
5724 bpr 27
:\credits{}
23 reyssat 28
 
4131 bpr 29
:Number of (pairs of) matching items.
23 reyssat 30
\integer{tot=6}
31
 
4131 bpr 32
:The vertical size of labels in pixels.
33
Think of people who have to increase the font size of their browsers to see well!
34
Don't make the labels too small.
23 reyssat 35
\integer{sizev=50}
36
 
13704 obado 37
:The horizontal size of left boxes (in pixels).
4131 bpr 38
Think of people who have to increase the font size of their browsers to see well!
39
Don't make the labels too small.
23 reyssat 40
\integer{sizel=250}
41
 
13704 obado 42
:The horizontal size of right boxes (in pixels).
4131 bpr 43
Think of people who have to increase the font size of their browsers to see well!
44
Don't make the labels too small.
23 reyssat 45
\integer{sizer=250}
46
 
14929 lemaire 47
:Feedback displayed in all cases after the learner's response.
48
\text{feedback_general=}
49
 
50
:Instructions
51
$embraced_randitem
52
\text{explain=Match the countries and their capitals.}
53
 
23 reyssat 54
:Main data.
4131 bpr 55
Write one pair of corresponding items per line, separated by a comma.
8512 bpr 56
$embraced_randitem
23 reyssat 57
\matrix{data=
58
Germany,		Berlin
59
Australia,		Canberra
60
Canada,			Ottawa
61
China,			Beijing
62
Spain,			Madrid
63
United States,		Washington
64
France,			Paris
65
Great Britain,		London
66
India,			New Delhi
67
Indonesia,		Jacarta
68
Italy,			Rome
69
Japon,			Tokyo
70
Russia,			Moscow
71
}
72
 
11544 obado 73
:Embraced random items
8512 bpr 74
$embraced_randitem
75
 
11544 obado 76
\text{accolade=item(1,1 yes,
77
2 no)}
8512 bpr 78
 
23 reyssat 79
:%%%%%%%%%%%%%% Nothing to modify before the statement %%%%%%%%%%%%%%%%
14929 lemaire 80
\text{accolade=wims(word 1 of \accolade)}
23 reyssat 81
\integer{datacnt=rows(\data)}
82
\integer{tot=\tot>\datacnt?\datacnt}
83
 
84
\text{shuf=item(1..\tot,shuffle(\datacnt))}
85
\text{data=row(\shuf,\data)}
8512 bpr 86
\text{data=\accolade=1? wims(embraced randitem \data)}
23 reyssat 87
\text{datal=column(1,\data)}
88
\text{datar=column(2,\data)}
89
\text{size=\sizev[]x\sizel[]x\sizer}
8512 bpr 90
\text{explain=\accolade=1? wims(embraced randitem \explain)}
23 reyssat 91
 
14929 lemaire 92
# For Latex version
93
\text{shuf2=shuffle(\tot)}
94
\text{latexdatar=\datar[\shuf2]}
95
\real{latexsizel=max(1,min(floor(\sizel/5)/10,6))}
96
\real{latexsizer=max(1,min(floor(\sizer/5)/10,6))}
97
\text{latexsrc=\begin{tabular}{p{\latexsizel cm}lp{1cm}lp{\latexsizer cm}}}
98
\for{lk=1 to \tot}{
99
  \text{latexsrc=\latexsrc \datal[\lk] &\(\bullet\) &&\(\bullet\) & \latexdatar[\lk]\\ [1.5ex]  }
100
}
101
\text{latexsrc=\latexsrc \\ 
102
\end{tabular}}
103
\text{latexsol=\begin{tabular}{p{\latexsizel cm}lp{\latexsizer cm}}}
104
\for{lk=1 to \tot}{
105
  \text{latexsol=\latexsol \datal[\lk] &\(\longleftrightarrow \)& \datar[\lk]\\ [1.5ex] }
106
}
107
\text{latexsol=\latexsol\\ 
108
\end{tabular}}
109
 
23 reyssat 110
:%%%%%%%%%%%%% Now the statement in html. %%%%%%%%%%%%%%%%%%%%
111
 
112
::You don't need to modify this in general.
113
 
13704 obado 114
# The command to show the correspondance table is
115
# \embed{reply 1,\size}
23 reyssat 116
 
13704 obado 117
\statement{<div class="instructions">\explain</div>
8512 bpr 118
<div class="wimscenter">
23 reyssat 119
\embed{reply 1,\size}
8512 bpr 120
</div>
23 reyssat 121
}
122
 
123
:%%%%%%%%%%%%% Nothing to modify after. %%%%%%%%%%%%%%%%%5
14929 lemaire 124
\answer{The reply}{\datal;\datar}{type=correspond}
125
\feedback{\feedback_general notsametext }{<p class="feedback">\feedback_general</p>}
23 reyssat 126
 
14929 lemaire 127
# Latex version
128
\latex{
129
\begin{statement}
130
\explain
131
\begin{center}
132
\latexsrc
133
\end{center}
134
\end{statement}
135
\begin{solution}\
136
\begin{center}
137
\latexsol
138
\end{center}
139
\end{solution}
140
}