Rev 5724 | Rev 8512 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
23 | reyssat | 1 | type=datalist |
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. |
23 | reyssat | 50 | \matrix{data= |
51 | Germany, Berlin |
||
52 | Australia, Canberra |
||
53 | Canada, Ottawa |
||
54 | China, Beijing |
||
55 | Spain, Madrid |
||
56 | United States, Washington |
||
57 | France, Paris |
||
58 | Great Britain, London |
||
59 | India, New Delhi |
||
60 | Indonesia, Jacarta |
||
61 | Italy, Rome |
||
62 | Japon, Tokyo |
||
63 | Russia, Moscow |
||
64 | } |
||
65 | |||
66 | :Text that explains what should be done. |
||
67 | $embraced_randitem |
||
4131 | bpr | 68 | \text{explain=Match the countries and their |
23 | reyssat | 69 | capitals.} |
70 | |||
71 | :%%%%%%%%%%%%%% Nothing to modify before the statement %%%%%%%%%%%%%%%% |
||
72 | |||
73 | \integer{datacnt=rows(\data)} |
||
74 | \integer{tot=\tot>\datacnt?\datacnt} |
||
75 | |||
76 | \text{shuf=item(1..\tot,shuffle(\datacnt))} |
||
77 | \text{data=row(\shuf,\data)} |
||
78 | \text{datal=column(1,\data)} |
||
79 | \text{datar=column(2,\data)} |
||
80 | \text{size=\sizev[]x\sizel[]x\sizer} |
||
81 | \text{explain=wims(embraced randitem \explain)} |
||
82 | |||
83 | :%%%%%%%%%%%%% Now the statement in html. %%%%%%%%%%%%%%%%%%%% |
||
84 | |||
85 | ::You don't need to modify this in general. |
||
86 | |||
87 | The command to show the correspondance table, it is |
||
88 | \embed{reply 1,\size} |
||
89 | |||
90 | \statement{\explain |
||
91 | |||
5723 | bpr | 92 | <p class="wimscenter"> |
23 | reyssat | 93 | \embed{reply 1,\size} |
5723 | bpr | 94 | </p> |
23 | reyssat | 95 | |
96 | } |
||
97 | |||
98 | :%%%%%%%%%%%%% Nothing to modify after. %%%%%%%%%%%%%%%%%5 |
||
99 | |||
100 | \answer{The reply}{\datal;\datar}{type=correspond} |
||
101 |