Rev 13477 | 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=order first |
23 | reyssat | 2 | textarea="data explain" |
3 | |||
4135 | bpr | 4 | :Reorder items correctly, drag-and-drop. |
23 | reyssat | 5 | |
13477 | obado | 6 | <p> |
4135 | bpr | 7 | It presents a list of items to be reordered correctly by dragging and dropping the items in the right place. <p> |
8 | To make an exercise with this model, type the list of |
||
9 | items to be sorted and change the instruction. |
||
13477 | obado | 10 | </p><p> |
4135 | bpr | 11 | With a slight modification, a variant of this model can accept images as items. |
13477 | obado | 12 | </p> |
13 | <p class="wims_credits">Author of the model: Gang Xiao <qualite@wimsedu.info></p> |
||
23 | reyssat | 14 | |
15 | :%%%%%%%%%%%%%%%%% ATTENTION %%%%%%%%%%%%%%%%%%%% |
||
16 | |||
4135 | bpr | 17 | Remove the above header if you destroy the model tags, i.e. the lines starting |
18 | with a ':'. Otherwise the exercise might not be recognised by Createxo. |
||
23 | reyssat | 19 | |
4135 | bpr | 20 | :%%%%%%%% Example parameters to be redefined %%%%%%%%%%%%%%%%% |
23 | reyssat | 21 | |
4135 | bpr | 22 | :\title{Reorder (drag and drop)} |
5147 | bpr | 23 | :\author{XIAO, Gang} |
8002 | bpr | 24 | :\email{qualite@wimsedu.info} |
5724 | bpr | 25 | :\credits{} |
23 | reyssat | 26 | |
4135 | bpr | 27 | :Number of items to be sorted per exercise: up to 20. |
28 | If this number is lower than the available items, a random subset of the |
||
29 | items will be presented to the learner. <p> |
||
30 | If this number is greater than the available items, it will be truncated |
||
31 | to the number of items. |
||
23 | reyssat | 32 | \integer{tot=6} |
33 | |||
4135 | bpr | 34 | :The size of labels to drag, in pixels, x times y. |
35 | 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 | 36 | \text{size=80x40} |
37 | |||
4135 | bpr | 38 | :The list of items to reorder |
39 | Write the itemss in the correct order, separated by commas. |
||
23 | reyssat | 40 | \text{data=Mercury,Venus,Earth,Mars,Jupiter,Saturn,Uranus,Neptune} |
41 | |||
13704 | obado | 42 | :Instructions |
23 | reyssat | 43 | \text{explain= |
4135 | bpr | 44 | Please put the following planets of the solar system into the right order, with |
45 | the closest to the Sun in first position. |
||
23 | reyssat | 46 | } |
13477 | obado | 47 | |
11544 | obado | 48 | :Embraced random items |
8512 | bpr | 49 | $embraced_randitem |
11544 | obado | 50 | \text{accolade=item(1,1 yes, |
51 | 2 no)} |
||
23 | reyssat | 52 | |
53 | :%%%%%%%%%%%%%% Nothing to modify before the statement %%%%%%%%%%%%%%%% |
||
10914 | bpr | 54 | \text{data=randomrow(\data)} |
8512 | bpr | 55 | \text{accolade=wims(word 1 of \accolade)} |
56 | \text{data=\accolade=1 ? wims(embraced randitem \data)} |
||
23 | reyssat | 57 | \integer{datacnt=items(\data)} |
58 | \integer{tot=min(20,min(\tot,\datacnt))} |
||
59 | \if{\tot<\datacnt}{ |
||
60 | \text{sh=shuffle(\datacnt)} |
||
61 | \text{sh=wims(sort numeric items \sh[1..\tot])} |
||
62 | \text{data=item(\sh,\data)} |
||
63 | } |
||
64 | |||
65 | \text{st=wims(makelist r x for x=1 to \tot)} |
||
66 | \steps{\st} |
||
67 | |||
68 | :%%%%%%%%%%%%% Now the statement in html. %%%%%%%%%%%%%%%%%%%% |
||
69 | |||
70 | ::You don't need to modify this in general. |
||
71 | |||
72 | \statement{\explain |
||
8512 | bpr | 73 | <table class="wimsnoborder"><tr> |
23 | reyssat | 74 | \for{k=1 to \tot}{<td>\embed{r\k,\size}</td>} |
75 | </tr></table> |
||
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} |