Subversion Repositories wimsdev

Rev

Rev 8512 | Rev 13477 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4122 bpr 1
type=game
2
textarea="data"
3
 
4148 bpr 4
:Write the events in chronological order.
4122 bpr 5
<p>
6
Author of the model: Bernadette Perrin-Riou <bpr@math.u-psud.fr>
7
</p>
8
:%%%%%%%%%%%%%%%%%      ATTENTION      %%%%%%%%%%%%%%%%%%%%
9
 
4136 bpr 10
Remove the above header if you destroy the model tags i.e. the lines starting
11
with a ':'. Otherwise the exercise might not be recognised by Createxo.
4122 bpr 12
 
13
:%%%%%%%% Example parameters to be redefined %%%%%%%%%%%%%%%%%
4148 bpr 14
:\title{Timeline}
5147 bpr 15
:\author{Csilla, Ducrocq}
5724 bpr 16
:\email{}
17
:\credits{}
4135 bpr 18
:Instruction
4122 bpr 19
 
4135 bpr 20
\text{instruction=Write the dates in the bottom line and the matching events in the top line.}
21
:Maximum 10 dates will be presented to the learner at a time.
22
 These will be drawn randomly from the entire list (Main data) provided.
4122 bpr 23
\text{N=5}
7167 bpr 24
:Color of the arrow
4122 bpr 25
\text{couleur=orange}
26
:Width of labels
27
\text{facteur=100}
28
:Height of labels
29
\integer{height=100}
5744 bpr 30
:Width of the arrow
31
Choose an integer between 1 and 3
32
\integer{wi=1}
4122 bpr 33
:use both the items of the main data (0), only the first column (1), only the second column (2)
34
\text{choix=0}
35
:Main data.
36
\text{data=1492,Christopher Columbus discovers America
37
1607,the first English settlements
38
1776,Declaration of Independence
39
1789,First constitution of the USA
40
1860,Abraham lincoln becomes president
41
1917,the USA joins the 1st World War
42
1929,the Wall street Crash
43
1941,Pearl harbor
44
1945,End of World War 2}
45
 
11544 obado 46
:Embraced random items
7167 bpr 47
$embraced_randitem
48
\text{accolade=item(1,1 yes,
49
2 no)}
8512 bpr 50
 
4122 bpr 51
:%%%%%%%%%%%%%% Rien à modifier ensuite %%%%%%%%%%%%%%%%
7167 bpr 52
\text{accolade=wims(word 1 of \accolade)}
8512 bpr 53
\real{M=\N-0.3}
4122 bpr 54
\text{xrange=-1,\N+1}
7167 bpr 55
\text{yrange=\choix iswordof 0 ? -5,5:-2,5}
4122 bpr 56
\text{yrange=\choix=1 ? -5,2}
7167 bpr 57
\text{yrange=\choix=3 ? -5,4}
4122 bpr 58
\text{cnt=rows(\data)}
59
\text{shu=shuffle(\cnt)}
60
\text{shu=\shu[1..\N]}
61
\text{shu=wims(sort numeric item \shu)}
62
\text{data=row([\shu],\data)}
7167 bpr 63
\text{data=\accolade=1 ? wims(embraced randitem \data)}
4122 bpr 64
\matrix{rep=\data}
65
\integer{size=(1.5*\facteur)*(\M+1)}
66
\integer{height2=4*\height}
67
\text{size=\size,\height2}
68
\text{fleche=xrange \xrange
69
yrange \yrange
5744 bpr 70
lines \couleur,\M,\wi/2,-1,\wi/2,-1,-\wi/2,\M,-\wi/2,\M,-\wi,\N+0.5,0,\M,\wi,\M,\wi/2
7167 bpr 71
fill 0,0,\couleur
4122 bpr 72
}
73
 
74
\text{STEP=\choix=0 ? wims(values x for x=1 to 2*\N)}
75
\text{STEP=\choix=1 ? wims(values 2*x-1 for x=1 to \N)}
7167 bpr 76
\text{STEP=\choix=2 or \choix=3? wims(values 2*x for x=1 to \N)}
4122 bpr 77
\text{STEP=wims(makelist r x for x in  \STEP)}
78
\steps{\STEP}
79
\text{positionbas=}
80
\text{positionhaut=}
7167 bpr 81
\text{positionbas2=}
4122 bpr 82
\for{j=0 to \N-1}{
7167 bpr 83
  \text{fleche=\choix=0 or \choix=1 or \choix=3 ? \fleche
5744 bpr 84
  line \j-0.1,-\wi/2,\j-0.1,-2*\wi,\couleur}
7167 bpr 85
  \text{fleche=\choix=0 or \choix=2 or \choix=3? \fleche
5744 bpr 86
  line \j-0.1,\wi/2,\j-0.1,2*\wi,\couleur}
4122 bpr 87
  \text{ans=pari([2*\j+1,2*\j+2])}
7167 bpr 88
  \text{v=slib(draw/convpixel \j-0.5,-2,\size,\xrange,\yrange,0,pixels)}
89
  \text{positionbas=\positionbas
90
 r\ans[1],\v[1] x \v[2]}
4122 bpr 91
 \text{v=slib(draw/convpixel \j-0.5,-2,\size,\xrange,\yrange,0,pixels)}
7167 bpr 92
 \text{positionbas2=\positionbas2
93
 r\ans[2],\v[1] x \v[2]}
94
  \text{v=slib(draw/convpixel \j-0.5,4,\size,\xrange,\yrange,0,pixels)}
95
  \text{positionhaut=\positionhaut
4122 bpr 96
r\ans[2],\v[1] x \v[2]}
7167 bpr 97
 
98
 \text{fleche=\choix=3? \fleche
99
 text black, \j-0.2,3,medium,\data[\j+1;1]}
4122 bpr 100
 }
7167 bpr 101
  \text{position=\choix=1 or \choix=0? \positionbas}
102
  \text{position=\choix=2 or \choix=0? \position
4122 bpr 103
 \positionhaut}
7167 bpr 104
 \text{position=\choix=3? \positionbas2}
4122 bpr 105
 \text{urlfleche=draw(\size
106
\fleche)}
7167 bpr 107
\statement{
108
\instruction
5744 bpr 109
<div class="wimscenter">
4122 bpr 110
\special{imagefill \urlfleche,\size[1]x\size[2],\facteur x \height
111
\position}
5744 bpr 112
</div>
4122 bpr 113
}
114
 
115
\answer{}{\rep[1;1]}{type=clickfill}{option=shuffle}
116
\answer{}{\rep[1;2]}{type=clickfill}{option=shuffle}
117
\answer{}{\rep[2;1]}{type=clickfill}{option=shuffle}
118
\answer{}{\rep[2;2]}{type=clickfill}{option=shuffle}
119
\answer{}{\rep[3;1]}{type=clickfill}{option=shuffle}
120
\answer{}{\rep[3;2]}{type=clickfill}{option=shuffle}
121
\answer{}{\rep[4;1]}{type=clickfill}{option=shuffle}
122
\answer{}{\rep[4;2]}{type=clickfill}{option=shuffle}
123
\answer{}{\rep[5;1]}{type=clickfill}{option=shuffle}
124
\answer{}{\rep[5;2]}{type=clickfill}{option=shuffle}
125
\answer{}{\rep[6;1]}{type=clickfill}{option=shuffle}
126
\answer{}{\rep[6;2]}{type=clickfill}{option=shuffle}
127
\answer{}{\rep[7;1]}{type=clickfill}{option=shuffle}
128
\answer{}{\rep[7;2]}{type=clickfill}{option=shuffle}
129
\answer{}{\rep[8;1]}{type=clickfill}{option=shuffle}
130
\answer{}{\rep[8;2]}{type=clickfill}{option=shuffle}
131
\answer{}{\rep[9;1]}{type=clickfill}{option=shuffle}
132
\answer{}{\rep[9;2]}{type=clickfill}{option=shuffle}
133
\answer{}{\rep[10;1]}{type=clickfill}{option=shuffle}
7167 bpr 134
\answer{}{\rep[10;2]}{type=clickfill}{option=shuffle}