Subversion Repositories wimsdev

Rev

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