Subversion Repositories wimsdev

Rev

Rev 15179 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
11375 bpr 1
type=order
12170 mquerol 2
textarea="instruction data1 data2 data3 data4 data5"
13716 obado 3
iEdit="instruction"
4375 bpr 4
 
12170 mquerol 5
:Fer una paraula amb les lletres
13716 obado 6
<p>Es poden introduir fins a 5 llistes de paraules.
12170 mquerol 7
Cada vegada es pren una paraula aleatòria de cada llista. Una indicació
8
es pot posar per a cada paraula.
13716 obado 9
</p><p>
12170 mquerol 10
<span class="wims_warning">$wims_name_warning</span>. Heu de verificar
11
que altres paraules no són factibles amb les mateixes lletres
13476 obado 12
o posar una indicació que permeti diferenciar.</p>
13
<p class="wims_credits">
15179 lemaire 14
Autor del model: <a href="mailto:bernadette.m.riou@orange.fr">Bernadette Perrin-Riou</a>
4375 bpr 15
</p>
16
:%%%%%%%%%%%%%%%%%      ATTENTION      %%%%%%%%%%%%%%%%%%%%
17
 
18
Enlevez l'en-tête ci-dessus si vous détruisez les balises pour le modèle !
19
(Ce sont les lignes qui commencent par un ':'.)
20
Sinon l'exercice risque de ne pas pouvoir repasser sous Createxo.
21
 
22
:%%%%%%%% Paramètres d'exemples à redéfinir %%%%%%%%%%%%%%%%%
23
 
12170 mquerol 24
:\title{Barreja de lletres}
5147 bpr 25
:\author{Bernadette, Perrin-Riou}
4375 bpr 26
:\email{bpr@math.u-psud.fr}
12170 mquerol 27
:\credits{}
4375 bpr 28
 
12170 mquerol 29
:Enunciat
4375 bpr 30
\text{instruction=Composer un mot avec toutes les lettres proposées.}
31
 
12170 mquerol 32
:Nombre de paraules (màxim 5)
33
El nombre de paraules ha de ser inferior a 5 i inferior al nombre de llistes
34
completat a continuació.
4375 bpr 35
\integer{N=3}
36
 
12170 mquerol 37
:Primera llista de paraules
38
Introduïu una paraula (o grup de paraules) per línia, possiblement seguit d'una indicació. Si ho és
39
d'un grup de paraules, reemplaça l'espai amb  <span class="tt">_</span>.
4375 bpr 40
\text{data1=bille, un jeu
12170 mquerol 41
domino,un jeu
42
jeu_de_dames,un jeu}
13476 obado 43
 
12170 mquerol 44
:Segona llista de paraules
4375 bpr 45
\text{data2=enfant
46
mère
47
père}
13476 obado 48
 
12170 mquerol 49
:Tercera llista de paraules
4375 bpr 50
\text{data3=maison
51
immeuble
52
villa
53
habitation
54
}
13476 obado 55
 
12170 mquerol 56
:Quarta llista de paraules
4375 bpr 57
\text{data4=}
13476 obado 58
 
12170 mquerol 59
:Cinquena llista de paraules
4375 bpr 60
\text{data5=}
61
 
62
:%%%%%%%%%%%%%% Rien à modifier avant l'énoncé %%%%%%%%%%%%%%%%
13716 obado 63
\css{<style>
13481 obado 64
  .word_jumble{
65
    font-size:large;
66
    padding:6px;
67
    margin-left:10px;
68
    border: 1px solid #555;
69
  }</style>}
70
 
4375 bpr 71
\matrix{data1=\data1}
72
\text{mot1=wims(nonempty items \data1[;1])}
73
\text{mot1=items(\mot1)>=2 ? shuffle(\mot1)}
74
\text{mot1=\mot1[1]}
75
\text{indication1=wims(select \data1 where column 1 issametext \mot1)}
76
\text{indication1=\indication1[2]}
77
\text{indication1=\indication1 issametext ? xxx}
78
\text{mot=\mot1}
79
\matrix{indication=\indication1}
80
\matrix{data2=\data2}
81
\text{mot2=wims(nonempty items \data2[;1])}
82
\text{mot2=items(\mot2)>=2 ? shuffle(\mot2)}
83
\text{mot2=\mot2[1]}
4734 bpr 84
\if{\mot2!=}{
4375 bpr 85
 \text{indication2=wims(select \data2 where column 1 issametext \mot2)}
86
 \text{indication2=\indication2[2]}
87
 \text{indication2=\indication2 issametext ? xxx}
88
 \text{mot=wims(append item \mot2 to \mot)}
89
 \matrix{indication=wims(append line \indication2 to \indication)}
90
}
91
\matrix{data3=\data3}
92
\text{mot3=wims(nonempty items \data3[;1])}
93
\text{mot3=items(\mot3)>=2 ? shuffle(\mot3)}
94
\text{mot3=\mot3[1]}
4734 bpr 95
\if{\mot3!=}{
4375 bpr 96
  \text{indication3=wims(select \data3 where column 1 issametext \mot3)}
97
  \text{indication3=\indication3[2]}
98
  \text{indication3=\indication3 issametext ? xxx}
99
  \text{mot=wims(append item \mot3 to \mot)}
100
  \matrix{indication=wims(append line \indication3 to \indication)}
101
}
102
 
103
\matrix{data4=\data4}
104
\text{mot4=wims(nonempty items \data4[;1])}
105
\text{mot4=items(\mot4)>=2 ? shuffle(\mot4)}
106
\text{mot4=\mot4[1]}
107
\if{\mot4!=}{
108
  \text{indication4=wims(select \data4 where column 1 issametext \mot4)}
109
  \text{indication4=\indication4[2]}
110
  \text{indication4=\indication4 issametext ? xxx}
4734 bpr 111
  \text{mot=wims(append item \mot4 to \mot)}
4375 bpr 112
  \matrix{indication=wims(append line \indication4 to \indication)}
113
}
114
 
115
\matrix{data5=\data5}
116
\text{mot5=wims(nonempty items \data5[;1])}
117
\text{mot5=items(\mot5)>=2 ? shuffle(\mot5)}
118
\text{mot5=\mot5[1]}
119
\if{\mot5!=}{
120
  \text{indication5=wims(select \data5 where column 1 issametext \mot5)}
121
  \text{indication5=\indication5[2]}
122
  \text{indication5=\indication5 issametext ? xxx}
4734 bpr 123
  \text{mot=wims(append item \mot5 to \mot)}
4375 bpr 124
  \matrix{indication=wims(append line \indication5 to \indication)}
125
}
126
 
127
\integer{N1=items(\mot)}
128
\text{bat=shuffle(\N1)}
129
\integer{N=min(\N1,\N)}
130
 
131
\text{mot=\mot[\bat]}
132
\matrix{indication=\indication[\bat;]}
133
\text{mot1=wims(text expand \mot[1] using 01)}
134
\text{mot1=wims(words2items \mot1)}
5271 bpr 135
\text{mot1=wims(replace internal _ by &nbsp; in \mot1)}
4375 bpr 136
 
137
\text{mot2=wims(text expand \mot[2] using 01)}
138
\text{mot2=wims(words2items \mot2)}
5271 bpr 139
\text{mot2=wims(replace internal _ by &nbsp; in \mot2)}
4375 bpr 140
 
141
\text{mot3=wims(text expand \mot[3] using 01)}
142
\text{mot3=wims(words2items \mot3)}
5271 bpr 143
\text{mot3=wims(replace internal _ by &nbsp; in \mot3)}
4375 bpr 144
 
145
\text{mot4=wims(text expand \mot[4] using 01)}
146
\text{mot4=wims(words2items \mot4)}
5271 bpr 147
\text{mot4=wims(replace internal _ by &nbsp; in \mot4)}
4375 bpr 148
 
149
\text{mot5=wims(text expand \mot[5] using 01)}
150
\text{mot5=wims(words2items \mot5)}
5271 bpr 151
\text{mot5=wims(replace internal _ by &nbsp; in \mot5)}
4375 bpr 152
\text{Mot=}
153
\text{STEP=wims(makelist r x for x=1 to \N)}
154
\text{STEP=r1}
155
\nextstep{\STEP}
156
 
157
\statement{
13481 obado 158
  <div class="spacer">
159
  \for{a=1 to \step-1}{
160
    \if{\a <= \N}{
161
    <span class="word_jumble">
162
      \Mot[\a;]
163
      \if{ \indication[\a;] notsametext xxx }{ <em class="indication">(\indication[\a;])</em>}
164
    </span>
165
    }
4375 bpr 166
  }
13481 obado 167
  </div>
168
  \if{\step <= \N}{
15703 obado 169
    <div class="instruction">\instruction</div>
13481 obado 170
    <div class="wimscenter">
171
      \embed{r \step,50 x 50}
172
      \if{ \indication[\step;] notsametext xxx }{
173
        (<span class="indication">\indication[\step;]</span>)
174
      }
175
    </div>
176
  }
4375 bpr 177
}
13481 obado 178
 
4375 bpr 179
\answer{}{\mot1}{type=dragfill}{option=nonstop}
180
\answer{}{\mot2}{type=dragfill}{option=nonstop}
181
\answer{}{\mot3}{type=dragfill}{option=nonstop}
182
\answer{}{\mot4}{type=dragfill}{option=nonstop}
183
\answer{}{\mot5}{type=dragfill}{option=nonstop}
184
 
185
\text{Mot=\reply1
186
\reply2
187
\reply3
188
\reply4
189
\reply5}
190
\text{Mot=wims(replace , by in \Mot)}
191
\matrix{Mot=\Mot}
192
\text{STEP=\step <= \N ? r \step:}