Rev 6132 | Rev 13480 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
type=game
textarea="data"
:Reorder the labels (puzzle).
The labels have all been mixed up and have to be reordered correctly. Only two labels can be exchanged at a time.
Click on one label first, then on the label you wish to replace the first one with.
<p>
Author of the model: Bernadette Perrin-Riou <bpr@math.u-psud.fr>
</p>
:%%%%%%%%%%%%%%%%% ATTENTION %%%%%%%%%%%%%%%%%%%%
Remove the above header if you destroy the model tags i.e. the lines starting
with a ':'. Otherwise the exercise might not be recognised by Createxo.
:%%%%%%%% Example parameters to be redefined %%%%%%%%%%%%%%%%%
:\title{Word Puzzle}
:\author{Csilla, Ducrocq}
:\email{}
:\credits{}
:Consigne
\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.}
:Nombre de questions proposées (maximum 5)
\text{N=2}
:Main data.
Write the elements of the puzzle in the right order. Separate each element with a comma.
\text{data=The, cat, ate, the, mouse.
The, mouse, was, eaten, by, the, cat.
The, man, beat, the, dog.
The, dog, was, beaten, by, the, man.
Mary, has, watered, the, flowers.
The, flowers, have, been, watered, by, Mary.
}
:%%%%%%%%%%%%%% Nothing to modify before the statement %%%%%%%%%%%%%%%%
\integer{M=rows(\data)}
\integer{N=min(\N,\M)}
\integer{N=min(\N,10)}
\text{liste=shuffle(\M)}
\text{liste=\liste[1..\N]}
\matrix{data=\data}
\matrix{data=\data[\liste;]}
\text{option=}
\for{j=1 to \N}{
\integer{nb_item=items(\data[\j;])}
\text{option=wims(append line 1 x \nb_item to \option)}
}
\matrix{option=\option}
\text{STEP=wims(makelist r x for x=1 to \N)}
\steps{\STEP}
\statement{\instruction
\if{\N=1}{
<p class="wimscenter">\embed{r 1, 400 x 60}</p>
}{
\for{s=1 to \N}{<p> \s : </p>
<p class="wimscenter">\embed{r \s, 400 x 60}</p>
}
}
}
\answer{1}{\data[1;];\option[1;] x 80}{type=puzzle}{option=text}
\answer{2}{\data[2;];\option[2;] x 80}{type=puzzle}{option=text}
\answer{3}{\data[3;];\option[3;] x 80}{type=puzzle}{option=text}
\answer{4}{\data[4;];\option[4;] x 80}{type=puzzle}{option=text}
\answer{5}{\data[5;];\option[5;] x 80}{type=puzzle}{option=text}
\answer{6}{\data[6;];\option[6;] x 80}{type=puzzle}{option=text}
\answer{7}{\data[7;];\option[7;] x 80}{type=puzzle}{option=text}
\answer{8}{\data[8;];\option[8;] x 80}{type=puzzle}{option=text}
\answer{9}{\data[9;];\option[9;] x 80}{type=puzzle}{option=text}
\answer{10}{\data[10;];\option[10;] x 80}{type=puzzle}{option=text}