Rev 15179 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
11375 | bpr | 1 | type=order |
13504 | czzmrn | 2 | textarea="instruction data1 data2 data3 data4 data5" |
13715 | obado | 3 | iEdit="instruction" |
4821 | czzmrn | 4 | |
13504 | czzmrn | 5 | :Comporre una parola con le lettere date |
6 | <p>Possono essere inserite fino a 5 |
||
4821 | czzmrn | 7 | liste di parole. |
8 | Ogni volta viene estratta casualmente una parola da queste liste. Per ogni |
||
13504 | czzmrn | 9 | parola può essere indicato un suggerimento/indicazione.</p> |
10 | <p><span class="wims_warning">$wims_name_warning</span>. È necessario |
||
4821 | czzmrn | 11 | verificare che con le stesse lettere non siano realizzabili altre parole, |
13504 | czzmrn | 12 | oppure inserire una indicazione per permettere la differenziazione.</p> |
15179 | lemaire | 13 | <p class="wims_credits">Autore del modello: <a href="mailto:bernadette.m.riou@orange.fr">Bernadette Perrin-Riou</a></p> |
13504 | czzmrn | 14 | |
4821 | czzmrn | 15 | :%%%%%%%%%%%%%%%%% ATTENZIONE %%%%%%%%%%%%%%%%%%%% |
16 | |||
17 | Se si rimuovono le indicazioni del modulo modelli (le righe che |
||
18 | cominciano con ':') è necessario rimuovere tutta questa parte |
||
19 | introduttiva del file. Altrimenti Createxo potrebbe non accettare il |
||
20 | codice dell'esercizio. |
||
21 | |||
22 | :%%%%%%%% Parametri che possono essere ridefiniti %%%%%%%%%%%%%%%%% |
||
23 | |||
24 | :\title{Comporre una parola con le lettere date} |
||
5147 | bpr | 25 | :\author{Bernadette, Perrin-Riou} |
4821 | czzmrn | 26 | :\email{bpr@math.u-psud.fr} |
5724 | bpr | 27 | :\credits{} |
4821 | czzmrn | 28 | |
29 | :Consegna |
||
30 | \text{instruction=Comporre una parola utilizzando tutte le lettere proposte.} |
||
31 | |||
32 | :Numero di parole (al massimo 5) |
||
33 | Il numero di parole deve essere inferiore a 5 e inferiore al numero delle liste |
||
34 | compilate nel seguito. |
||
35 | \integer{N=3} |
||
36 | |||
37 | :Prima lista di parole |
||
5907 | bpr | 38 | Inserire una parola per riga, seguita eventualmente da un suggerimento. Se si tratta di frasi costituite da più parole, unirle sostituendo lo spazio con <span class="tt">_</span>. |
4821 | czzmrn | 39 | \text{data1=bille, un jeu |
13504 | czzmrn | 40 | domino,un jeu |
41 | jeu_de_dames, un jeu} |
||
13715 | obado | 42 | |
4821 | czzmrn | 43 | :Seconda lista di parole |
44 | \text{data2=enfant |
||
45 | mère |
||
46 | père} |
||
13715 | obado | 47 | |
11375 | bpr | 48 | :Terza lista di parole |
4821 | czzmrn | 49 | \text{data3=maison |
50 | immeuble |
||
51 | villa |
||
52 | habitation |
||
53 | } |
||
13715 | obado | 54 | |
4821 | czzmrn | 55 | :Quarta lista di parole |
56 | \text{data4=} |
||
13715 | obado | 57 | |
4821 | czzmrn | 58 | :Quinta lista di parole |
59 | \text{data5=} |
||
60 | |||
61 | :%%%%%%%%%%%%%% Nulla da modificare fino all'enunciato %%%%%%%%%%%%%%%% |
||
13715 | obado | 62 | \css{<style> |
13481 | obado | 63 | .word_jumble{ |
64 | font-size:large; |
||
65 | padding:6px; |
||
66 | margin-left:10px; |
||
67 | border: 1px solid #555; |
||
68 | }</style>} |
||
69 | |||
4821 | czzmrn | 70 | \matrix{data1=\data1} |
71 | \text{mot1=wims(nonempty items \data1[;1])} |
||
72 | \text{mot1=items(\mot1)>=2 ? shuffle(\mot1)} |
||
73 | \text{mot1=\mot1[1]} |
||
74 | \text{indication1=wims(select \data1 where column 1 issametext \mot1)} |
||
75 | \text{indication1=\indication1[2]} |
||
76 | \text{indication1=\indication1 issametext ? xxx} |
||
77 | \text{mot=\mot1} |
||
78 | \matrix{indication=\indication1} |
||
13504 | czzmrn | 79 | |
4821 | czzmrn | 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]} |
||
84 | \if{\mot2!=}{ |
||
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 | } |
||
13504 | czzmrn | 91 | |
4821 | czzmrn | 92 | \matrix{data3=\data3} |
93 | \text{mot3=wims(nonempty items \data3[;1])} |
||
94 | \text{mot3=items(\mot3)>=2 ? shuffle(\mot3)} |
||
95 | \text{mot3=\mot3[1]} |
||
96 | \if{\mot3!=}{ |
||
97 | \text{indication3=wims(select \data3 where column 1 issametext \mot3)} |
||
98 | \text{indication3=\indication3[2]} |
||
99 | \text{indication3=\indication3 issametext ? xxx} |
||
100 | \text{mot=wims(append item \mot3 to \mot)} |
||
101 | \matrix{indication=wims(append line \indication3 to \indication)} |
||
102 | } |
||
103 | |||
104 | \matrix{data4=\data4} |
||
105 | \text{mot4=wims(nonempty items \data4[;1])} |
||
106 | \text{mot4=items(\mot4)>=2 ? shuffle(\mot4)} |
||
107 | \text{mot4=\mot4[1]} |
||
108 | \if{\mot4!=}{ |
||
109 | \text{indication4=wims(select \data4 where column 1 issametext \mot4)} |
||
110 | \text{indication4=\indication4[2]} |
||
111 | \text{indication4=\indication4 issametext ? xxx} |
||
112 | \text{mot=wims(append item \mot4 to \mot)} |
||
113 | \matrix{indication=wims(append line \indication4 to \indication)} |
||
114 | } |
||
115 | |||
116 | \matrix{data5=\data5} |
||
117 | \text{mot5=wims(nonempty items \data5[;1])} |
||
118 | \text{mot5=items(\mot5)>=2 ? shuffle(\mot5)} |
||
119 | \text{mot5=\mot5[1]} |
||
120 | \if{\mot5!=}{ |
||
121 | \text{indication5=wims(select \data5 where column 1 issametext \mot5)} |
||
122 | \text{indication5=\indication5[2]} |
||
123 | \text{indication5=\indication5 issametext ? xxx} |
||
124 | \text{mot=wims(append item \mot5 to \mot)} |
||
125 | \matrix{indication=wims(append line \indication5 to \indication)} |
||
126 | } |
||
127 | |||
128 | \integer{N1=items(\mot)} |
||
129 | \text{bat=shuffle(\N1)} |
||
130 | \integer{N=min(\N1,\N)} |
||
131 | |||
132 | \text{mot=\mot[\bat]} |
||
133 | \matrix{indication=\indication[\bat;]} |
||
134 | \text{mot1=wims(text expand \mot[1] using 01)} |
||
135 | \text{mot1=wims(words2items \mot1)} |
||
5271 | bpr | 136 | \text{mot1=wims(replace internal _ by in \mot1)} |
4821 | czzmrn | 137 | |
138 | \text{mot2=wims(text expand \mot[2] using 01)} |
||
139 | \text{mot2=wims(words2items \mot2)} |
||
5271 | bpr | 140 | \text{mot2=wims(replace internal _ by in \mot2)} |
4821 | czzmrn | 141 | |
142 | \text{mot3=wims(text expand \mot[3] using 01)} |
||
143 | \text{mot3=wims(words2items \mot3)} |
||
5271 | bpr | 144 | \text{mot3=wims(replace internal _ by in \mot3)} |
4821 | czzmrn | 145 | |
146 | \text{mot4=wims(text expand \mot[4] using 01)} |
||
147 | \text{mot4=wims(words2items \mot4)} |
||
5271 | bpr | 148 | \text{mot4=wims(replace internal _ by in \mot4)} |
4821 | czzmrn | 149 | |
150 | \text{mot5=wims(text expand \mot[5] using 01)} |
||
151 | \text{mot5=wims(words2items \mot5)} |
||
5271 | bpr | 152 | \text{mot5=wims(replace internal _ by in \mot5)} |
13504 | czzmrn | 153 | |
4821 | czzmrn | 154 | \text{Mot=} |
155 | \text{STEP=wims(makelist r x for x=1 to \N)} |
||
156 | \text{STEP=r1} |
||
157 | \nextstep{\STEP} |
||
158 | |||
159 | \statement{ |
||
13481 | obado | 160 | \for{a=1 to \step-1}{ |
161 | \if{\a <= \N}{ |
||
13504 | czzmrn | 162 | <div class="word_jumble">\Mot[\a;] |
163 | \if{ \indication[\a;] notsametext xxx }{<em class="indication">(\indication[\a;])</em>}</div> |
||
13481 | obado | 164 | } |
165 | } |
||
166 | \if{\step <= \N}{ |
||
15703 | obado | 167 | <div class="instruction">\instruction</div> |
13481 | obado | 168 | <div class="wimscenter"> |
169 | \embed{r \step,50 x 50} |
||
170 | \if{ \indication[\step;] notsametext xxx }{ |
||
13504 | czzmrn | 171 | <span class="indication">(\indication[\step;])</span> } |
13481 | obado | 172 | </div> |
4821 | czzmrn | 173 | } |
174 | } |
||
175 | \answer{}{\mot1}{type=dragfill}{option=nonstop} |
||
176 | \answer{}{\mot2}{type=dragfill}{option=nonstop} |
||
177 | \answer{}{\mot3}{type=dragfill}{option=nonstop} |
||
178 | \answer{}{\mot4}{type=dragfill}{option=nonstop} |
||
179 | \answer{}{\mot5}{type=dragfill}{option=nonstop} |
||
180 | |||
181 | \text{Mot=\reply1 |
||
182 | \reply2 |
||
183 | \reply3 |
||
184 | \reply4 |
||
185 | \reply5} |
||
186 | \text{Mot=wims(replace , by in \Mot)} |
||
187 | \matrix{Mot=\Mot} |
||
188 | \text{STEP=\step <= \N ? r \step:} |