Rev 15179 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
11375 | bpr | 1 | type=order first |
23 | reyssat | 2 | textarea="data explain" |
13715 | obado | 3 | iEdit="explain" |
23 | reyssat | 4 | |
4135 | bpr | 5 | :Reorder items correctly, drag-and-drop. |
23 | reyssat | 6 | |
13477 | obado | 7 | <p> |
4135 | bpr | 8 | It presents a list of items to be reordered correctly by dragging and dropping the items in the right place. <p> |
9 | To make an exercise with this model, type the list of |
||
10 | items to be sorted and change the instruction. |
||
13477 | obado | 11 | </p><p> |
4135 | bpr | 12 | With a slight modification, a variant of this model can accept images as items. |
13477 | obado | 13 | </p> |
15179 | lemaire | 14 | <p class="wims_credits">Author of the model: <a href="mailto:qualite@wimsedu.info">Gang Xiao</a></p> |
23 | reyssat | 15 | |
16 | :%%%%%%%%%%%%%%%%% ATTENTION %%%%%%%%%%%%%%%%%%%% |
||
17 | |||
4135 | 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 | |
4135 | bpr | 21 | :%%%%%%%% Example parameters to be redefined %%%%%%%%%%%%%%%%% |
23 | reyssat | 22 | |
4135 | bpr | 23 | :\title{Reorder (drag and drop)} |
5147 | bpr | 24 | :\author{XIAO, Gang} |
8002 | bpr | 25 | :\email{qualite@wimsedu.info} |
5724 | bpr | 26 | :\credits{} |
23 | reyssat | 27 | |
4135 | bpr | 28 | :Number of items to be sorted per exercise: up to 20. |
29 | If this number is lower than the available items, a random subset of the |
||
30 | items will be presented to the learner. <p> |
||
31 | If this number is greater than the available items, it will be truncated |
||
32 | to the number of items. |
||
23 | reyssat | 33 | \integer{tot=6} |
34 | |||
4135 | bpr | 35 | :The size of labels to drag, in pixels, x times y. |
36 | Think of people who have to increase the font size of their browsers to see well! Don't make the labels too small. |
||
23 | reyssat | 37 | \text{size=80x40} |
38 | |||
4135 | bpr | 39 | :The list of items to reorder |
40 | Write the itemss in the correct order, separated by commas. |
||
23 | reyssat | 41 | \text{data=Mercury,Venus,Earth,Mars,Jupiter,Saturn,Uranus,Neptune} |
42 | |||
13704 | obado | 43 | :Instructions |
23 | reyssat | 44 | \text{explain= |
4135 | bpr | 45 | Please put the following planets of the solar system into the right order, with |
46 | the closest to the Sun in first position. |
||
23 | reyssat | 47 | } |
13477 | obado | 48 | |
11544 | obado | 49 | :Embraced random items |
8512 | bpr | 50 | $embraced_randitem |
11544 | obado | 51 | \text{accolade=item(1,1 yes, |
52 | 2 no)} |
||
23 | reyssat | 53 | |
54 | :%%%%%%%%%%%%%% Nothing to modify before the statement %%%%%%%%%%%%%%%% |
||
10914 | bpr | 55 | \text{data=randomrow(\data)} |
8512 | bpr | 56 | \text{accolade=wims(word 1 of \accolade)} |
57 | \text{data=\accolade=1 ? wims(embraced randitem \data)} |
||
23 | reyssat | 58 | \integer{datacnt=items(\data)} |
59 | \integer{tot=min(20,min(\tot,\datacnt))} |
||
60 | \if{\tot<\datacnt}{ |
||
61 | \text{sh=shuffle(\datacnt)} |
||
62 | \text{sh=wims(sort numeric items \sh[1..\tot])} |
||
63 | \text{data=item(\sh,\data)} |
||
64 | } |
||
65 | |||
66 | \text{st=wims(makelist r x for x=1 to \tot)} |
||
67 | \steps{\st} |
||
68 | |||
69 | :%%%%%%%%%%%%% Now the statement in html. %%%%%%%%%%%%%%%%%%%% |
||
70 | |||
71 | ::You don't need to modify this in general. |
||
72 | |||
15344 | obado | 73 | \statement{ |
74 | <div>\explain</div> |
||
75 | \for{k=1 to \tot}{<div class="inline">\embed{r\k,\size}</div>} |
||
23 | reyssat | 76 | } |
77 | |||
78 | :%%%%%%%%%%%%% Nothing to modify after. %%%%%%%%%%%%%%%%%5 |
||
79 | |||
80 | \answer{1}{\data[1]}{type=dragfill} |
||
81 | \answer{2}{\data[2]}{type=dragfill} |
||
82 | \answer{3}{\data[3]}{type=dragfill} |
||
83 | \answer{4}{\data[4]}{type=dragfill} |
||
84 | \answer{5}{\data[5]}{type=dragfill} |
||
85 | \answer{6}{\data[6]}{type=dragfill} |
||
86 | \answer{7}{\data[7]}{type=dragfill} |
||
87 | \answer{8}{\data[8]}{type=dragfill} |
||
88 | \answer{9}{\data[9]}{type=dragfill} |
||
89 | \answer{10}{\data[10]}{type=dragfill} |
||
90 | \answer{11}{\data[11]}{type=dragfill} |
||
91 | \answer{12}{\data[12]}{type=dragfill} |
||
92 | \answer{13}{\data[13]}{type=dragfill} |
||
93 | \answer{14}{\data[14]}{type=dragfill} |
||
94 | \answer{15}{\data[15]}{type=dragfill} |
||
95 | \answer{16}{\data[16]}{type=dragfill} |
||
96 | \answer{17}{\data[17]}{type=dragfill} |
||
97 | \answer{18}{\data[18]}{type=dragfill} |
||
98 | \answer{19}{\data[19]}{type=dragfill} |
||
99 | \answer{20}{\data[20]}{type=dragfill} |