Rev 13488 | 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=game |
4122 | bpr | 2 | textarea="data" |
3 | |||
4135 | bpr | 4 | :Reorder the labels (puzzle). |
4122 | bpr | 5 | |
4135 | bpr | 6 | The labels have all been mixed up and have to be reordered correctly. Only two labels can be exchanged at a time. |
7 | Click on one label first, then on the label you wish to replace the first one with. |
||
8 | |||
13477 | obado | 9 | <p class="wims_credits"> |
4122 | bpr | 10 | Author of the model: Bernadette Perrin-Riou <bpr@math.u-psud.fr> |
11 | </p> |
||
12 | :%%%%%%%%%%%%%%%%% ATTENTION %%%%%%%%%%%%%%%%%%%% |
||
4135 | bpr | 13 | Remove the above header if you destroy the model tags i.e. the lines starting |
14 | with a ':'. Otherwise the exercise might not be recognised by Createxo. |
||
4122 | bpr | 15 | |
16 | :%%%%%%%% Example parameters to be redefined %%%%%%%%%%%%%%%%% |
||
17 | |||
18 | :\title{Word Puzzle} |
||
5147 | bpr | 19 | :\author{Csilla, Ducrocq} |
5724 | bpr | 20 | :\email{} |
21 | :\credits{} |
||
13477 | obado | 22 | |
23 | :Instructions |
||
4122 | bpr | 24 | \text{instruction=Make sentences with the words below. First click on the word you want to move then on another word that it is to be replaced with.} |
13477 | obado | 25 | |
13705 | obado | 26 | :Amount of displayed questions (maximum 5) |
4122 | bpr | 27 | \text{N=2} |
13477 | obado | 28 | |
13705 | obado | 29 | :Main data |
4135 | bpr | 30 | Write the elements of the puzzle in the right order. Separate each element with a comma. |
4122 | bpr | 31 | \text{data=The, cat, ate, the, mouse. |
4135 | bpr | 32 | The, mouse, was, eaten, by, the, cat. |
33 | The, man, beat, the, dog. |
||
34 | The, dog, was, beaten, by, the, man. |
||
35 | Mary, has, watered, the, flowers. |
||
36 | The, flowers, have, been, watered, by, Mary. |
||
37 | } |
||
4122 | bpr | 38 | |
39 | :%%%%%%%%%%%%%% Nothing to modify before the statement %%%%%%%%%%%%%%%% |
||
40 | |||
41 | \integer{M=rows(\data)} |
||
42 | \integer{N=min(\N,\M)} |
||
43 | \integer{N=min(\N,10)} |
||
44 | \text{liste=shuffle(\M)} |
||
45 | \text{liste=\liste[1..\N]} |
||
46 | \matrix{data=\data} |
||
47 | \matrix{data=\data[\liste;]} |
||
48 | \text{option=} |
||
49 | \for{j=1 to \N}{ |
||
50 | \integer{nb_item=items(\data[\j;])} |
||
51 | \text{option=wims(append line 1 x \nb_item to \option)} |
||
52 | } |
||
53 | \matrix{option=\option} |
||
54 | \text{STEP=wims(makelist r x for x=1 to \N)} |
||
55 | \steps{\STEP} |
||
13480 | obado | 56 | |
57 | \statement{ |
||
58 | <div class="instruction">\instruction</div> |
||
59 | \if{\N=1}{ |
||
60 | <div class="wimscenter">\embed{r 1, 400 x 60}</div> |
||
61 | }{ |
||
62 | \for{s=1 to \N}{ |
||
13488 | obado | 63 | <p>\s :</p> |
13480 | obado | 64 | <div class="wimscenter">\embed{r \s, 400 x 60}</div> |
65 | } |
||
66 | } |
||
4122 | bpr | 67 | } |
13480 | obado | 68 | |
4122 | bpr | 69 | \answer{1}{\data[1;];\option[1;] x 80}{type=puzzle}{option=text} |
70 | \answer{2}{\data[2;];\option[2;] x 80}{type=puzzle}{option=text} |
||
71 | \answer{3}{\data[3;];\option[3;] x 80}{type=puzzle}{option=text} |
||
72 | \answer{4}{\data[4;];\option[4;] x 80}{type=puzzle}{option=text} |
||
73 | \answer{5}{\data[5;];\option[5;] x 80}{type=puzzle}{option=text} |
||
74 | \answer{6}{\data[6;];\option[6;] x 80}{type=puzzle}{option=text} |
||
75 | \answer{7}{\data[7;];\option[7;] x 80}{type=puzzle}{option=text} |
||
76 | \answer{8}{\data[8;];\option[8;] x 80}{type=puzzle}{option=text} |
||
77 | \answer{9}{\data[9;];\option[9;] x 80}{type=puzzle}{option=text} |
||
78 | \answer{10}{\data[10;];\option[10;] x 80}{type=puzzle}{option=text} |