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=select
13716 obado 2
textarea="data instruction instruction2"
3
iEdit="instruction instruction2"
4688 bpr 4
 
12172 mquerol 5
:Seleccionar una paraula i, tot seguit, proporcionar informació sobre aquesta paraula.
6
En el primer pas, es demana marcar paraules; en el segon pas,
7
es fa una pregunta sobre aquestes paraules (text per respondre).
4688 bpr 8
 
6070 bpr 9
<div class="small">
12172 mquerol 10
Aquest exercici es pot transformar fàcilment per ser inclòs en un mòdul OEF
11
si voleu posar les dades en un fitxer auxiliar. Per això,
12
simplement ompliu el camp \text{file=} posant el nom del fitxer
13
(una vegada que l'exercici s'ha transferit a un mòdul OEF d'un compte de Modtool).
14
Existeix un exercici més complet del mateix tipus a Quicktool.
6070 bpr 15
</div>
16
 
13476 obado 17
<p class="wims_credits">
15179 lemaire 18
  Autor del model: <a href="mailto:bernadette.m.riou@orange.fr">Bernadette Perrin-Riou</a>
13476 obado 19
</p>
4688 bpr 20
 
21
:%%%%%%%%%%%%%%%%%      ATTENTION      %%%%%%%%%%%%%%%%%%%%
22
 
23
Enlevez l'en-tête ci-dessus si vous détruisez les balises pour le modèle !
24
(Ce sont les lignes qui commencent par un ':'.)
25
Sinon l'exercice risque de ne pas pouvoir repasser sous Createxo.
26
 
27
:%%%%%%%% Paramètres d'exemples à redéfinir %%%%%%%%%%%%%%%%%
28
 
13476 obado 29
:\title{Preguntes sobre paraules seleccionades primer}
6070 bpr 30
:\author{Bernadette, Perrin-Riou}
31
:\email{bpr@math.u-psud.fr}
32
:\credits{}
4688 bpr 33
 
12172 mquerol 34
:Enunciat per a la primera pregunta
4688 bpr 35
\text{instruction= Marquer les verbes conjugués.}
13476 obado 36
 
12172 mquerol 37
:Enunciat per a la segona pregunta
4688 bpr 38
\text{instruction2=Quels sont leurs infinitifs ?}
39
 
12172 mquerol 40
:Anàlisi de les respostes a la segona pregunta
41
Les possibilitats són <span class="tt">case</span>, <span class="tt">nocase</span> (no té en compte la diferència entre majúscules/minúscules ni els accents).
42
Si no es posa res, no es fa una segona pregunta.
4688 bpr 43
\text{format=case}
13476 obado 44
 
12172 mquerol 45
:Nombre de línies de dades
4688 bpr 46
\text{M=3}
13476 obado 47
 
12172 mquerol 48
:Mida dels camps de resposta de la segona pregunta
4688 bpr 49
\text{size=15}
50
 
12172 mquerol 51
:Dades
52
Un text per línia. Posem entre dobles signes d'interrogació la paraula a marcar
53
seguida del text per respondre la segona pregunta, separada pel símbol
5907 bpr 54
<span class="tt wims_code_words">|</span>.
6070 bpr 55
$embraced_randitem
4688 bpr 56
 
57
\text{data= Le chat ??mange|manger?? la souris.
58
Vous ??{avez bu,buvez}|boire?? du {thé,café}.
59
Nous ??tournons|tourner?? les pages du livre une à une.
11375 bpr 60
Les randonneurs ??{feront,font}|faire?? un feu.
61
Il ??{a déménagé,déménage}|déménager?? pendant les vacances.
62
Les navires ??{ont quitté,quittent}|quitter?? le port aujourd'hui.
63
Mon chien ??remue|remuer?? {la queue,les oreilles}.
4688 bpr 64
Tu ??{prépareras,as préparé,prépares}|préparer?? un cadeau pour tes {parents,grands-parents}.
65
Je ??suis arrivé|arriver?? {en retard,en avance} à mon rendez-vous.
66
{Christian,Paul} et moi ??regardons|regarder?? un film d'aventure.
67
}
68
 
12172 mquerol 69
:S'accepta text aleatori posat entre claus
6070 bpr 70
$embraced_randitem
12172 mquerol 71
\text{accolade=item(1,1 sí,
72
2 no)}
4688 bpr 73
:%%%%%%%%%%%%%% Rien à modifier avant l'énoncé %%%%%%%%%%%%%%%%
12172 mquerol 74
 
6070 bpr 75
\text{accolade=wims(word 1 of \accolade)}
76
 
4688 bpr 77
\text{file=}
78
\text{partialscore=split}
79
 
80
\text{first_step=1}
81
\text{alea=yes}
13716 obado 82
\css{<style>
13739 bpr 83
  .reponse {border-left-color: var(--wims_ref_color)}
13725 obado 84
  .verbe{color:blue;font-size:large;}
85
</style>}
4688 bpr 86
\text{paste=yes}
87
\text{pos_rep=outside}
6070 bpr 88
\text{second_step=\format notsametext ? yes:no}
4688 bpr 89
#####################
90
 
91
 
92
\text{format0=mark}
93
 
94
\if{\file notsametext}{
95
  \text{file0=randitem(\file)}
96
  \integer{cnt_question= wims(recordcnt \file0)}
6070 bpr 97
  \text{battage=\alea issametext yes ? shuffle(\cnt_question):
4688 bpr 98
wims(makelist x for x = 1 to \cnt_question)}
13739 bpr 99
  \text{texte=wims(record \battage[1] of \file0)}
100
}{
4688 bpr 101
  \integer{cnt_question=rows(\data)}
102
  \integer{N=min(\cnt_question,\M)}
103
  \integer{N=min(\N,10)}
104
  \text{liste=shuffle(\cnt_question)}
105
  \text{liste=\liste[1..\N]}
106
  \matrix{data=\data}
107
  \text{texte=\data[\liste;]}
17234 bpr 108
  \text{texte=wims(replace internal ; by  <br> in \texte)}
4688 bpr 109
}
110
 
6946 bpr 111
\text{autocompletion=\format iswordof case ? autocomplete="off"}
4688 bpr 112
\integer{first_step=\first_step notwordof 0 ? 1}
113
\text{option_reaccent=\reaccent!=yes ? noreaccent:}
114
\text{nopaste=\paste issametext no ? slib(utilities/nopaste )}
115
 
116
\text{size=\format iswordof dragfill clickfill ? \size x 1}
117
 
118
\text{texte=wims(\texte)}
6070 bpr 119
\text{texte=\accolade=1 ?wims(embraced randitem \texte)}
4688 bpr 120
\text{texte=wims(replace internal ??| by ??&nbsp;| in \texte)}
121
\text{texte=wims(replace internal ?? | by ??&nbsp;| in \texte)}
17234 bpr 122
\text{texte = wims(replace internal <br> by <br> _newline_  in \texte)}
13476 obado 123
 
4688 bpr 124
\matrix{texte=slib(text/markgroup \texte)}
125
\matrix{numero=\texte[1..-4;]}
126
\text{traduction=\texte[-2;]}
127
\text{traduction=wims(replace internal || by | in \traduction)}
128
\text{cnt_mot = rows(\numero)}
129
\text{Numero = wims(rows2lines \numero)}
130
\text{Numero = wims(lines2items \Numero)}
131
\text{prem_numero=wims(column 1 of \numero)}
132
\text{texte = \texte[-3;]}
13476 obado 133
\text{texte = wims(replace internal _newline_ by  in \texte)}
4688 bpr 134
\text{cnt = items(\texte)}
135
\text{Texte=wims(items2words \texte)}
11375 bpr 136
 
4688 bpr 137
\text{rep_compose = }
138
\for{ i = 1 to \cnt_mot}{
13739 bpr 139
  \text{nom_compose= \texte[\numero[\i;]]}
140
  \text{nom_compose =wims(items2words \nom_compose)}
141
  \text{rep_compose = \rep_compose,\nom_compose}
4688 bpr 142
}
143
\text{rep_compose= wims(nonempty items \rep_compose)}
144
 
145
\text{STEP = wims(makelist r x for x = 2 to \cnt_mot+1)}
13476 obado 146
\text{labels = wims(makelist x for x = 2 to \cnt_mot+1)}
147
 
4688 bpr 148
\text{position=}
149
\integer{a=0}
150
\for{t = 1 to \cnt}{
151
  \if{\t isitemof \prem_numero}{
152
    \integer{a =\a+1}
153
    \text{position=\position,\a}
154
  }{
155
    \text{position=\position,0}
156
  }
157
 }
158
\text{position=wims(nonempty items \position)}
159
 
160
\text{STEP1=\first_step=1?r1}
161
\text{STEP1=\second_step issametext yes ? \STEP1
162
\STEP
163
}
164
 
165
\steps{\STEP1}
166
 
167
 
168
\integer{reste=\cnt%\coupure}
169
\integer{quo=(\cnt-\reste)/\coupure}
170
\integer{quo=\reste=0? \quo-1}
171
\text{nombre=wims(makelist x for x = 1 to \cnt)}
172
%%%%%%%%%%%
173
 
13739 bpr 174
\statement{
175
  \nopaste <div class="instruction">\instruction</div>
176
  \preliminaire
4688 bpr 177
  \if{\reading notsametext }{\special{help reading,[à lire]}}
178
  \if{\image notsametext }{\special{help image,[à regarder]}}
179
  \audio\video
180
  \if{\step=\first_step}{
13739 bpr 181
    <div class="wims_question">
182
      \if{\format iswordof flashcard}{
183
        <p> \for{h=1 to \cnt}{\texte[\h] }</p>}
184
      \for{h=1 to \cnt}{
185
        \embed{reply 1,\h}
4688 bpr 186
      }
187
    </div>
13739 bpr 188
  }
189
  \if{\step >=1+\first_step}{
190
    \if{\pos_rep=outside}{
191
      <div class="wims_question reponse">
192
        \for{s = 1 to \cnt}{
193
          \if{\s notitemof \Numero}{
194
            \texte[\s]
195
          }{
196
            \if{\s isitemof \Numero}{
197
              <span class="verbe">\texte[\s]</span>
198
            }
199
          }
200
        }
201
      </div>
202
      <p>\instruction2</p>
203
      <div class="wims_question">
204
          \for{s= 1 to \cnt_mot}{
205
            <div class="field">
206
              <label for="reply\labels[\s]">\rep_compose[\s] :</label>
207
              \embed{\STEP[\s],\size
208
                \autocompletion}
209
            </div>
210
          }
211
      </div>
4688 bpr 212
    }
13739 bpr 213
    \if{\pos_rep=inside}{
214
      <p>\instruction2</p>
215
      <div class="wims_question">
216
        \for{s = 1 to \cnt}{
217
          \if{\s notitemof \Numero}{
218
            \texte[\s]
219
          }{
220
            \if{\s isitemof \prem_numero}{
221
              \embed{\STEP[\position[\s]], \size
222
                \autocompletion}
223
            }
224
            <span class="smaller" style="color:blue;">\texte[\s]</span>
225
          }
226
        }
227
      </div>
228
    }
229
    \if{\pos_rep=under}{
230
      <div class="wims_question">
231
        \for{u = 0 to \quo}{
232
          <table style="border:none">
233
            <tr>
234
            \for{ v = 1 to \coupure}{
235
              <td style="text-align:center">
236
                \if{\coupure*\u+\v <= \cnt}{
237
                  \if{\nombre[\coupure*\u+\v] isitemof \Numero}{<span style="color:blue;">}
238
                  \texte[\coupure*\u+\v]
239
                }{&nbsp;}
240
                \if{\nombre[\coupure*\u+\v] isitemof \Numero}{</span>}
241
              </td>
242
            }
243
            </tr><tr>
244
            \for{ v = 1 to \coupure}{
245
              <td style="text-align:center">
246
                \if{\nombre[\coupure*\u+\v] isitemof \prem_numero}{
247
                  \embed{\STEP[\position[\nombre[\coupure*\u+\v]]], \size
248
                         \autocompletion}
249
                }{&nbsp;}
250
              </td>
251
            }
17234 bpr 252
            </tr><tr><td colspan="\coupure"><hr></td></tr>
13739 bpr 253
          </table>
254
        }
255
      </div>
256
    }
4688 bpr 257
  }
258
}
259
 
260
\answer{}{\Numero;\texte}{type=\format0}{option=\partialscore \option}
14910 bpr 261
\answer{\rep_compose[1]}{\traduction[1]}{type=\format}{option=\option_reaccent}
4688 bpr 262
\answer{\rep_compose[2]}{\traduction[2]}{type=\format}{option=\option_reaccent}
263
\answer{\rep_compose[3]}{\traduction[3]}{type=\format}{option=\option_reaccent}
264
\answer{\rep_compose[4]}{\traduction[4]}{type=\format}{option=\option_reaccent}
265
\answer{\rep_compose[5]}{\traduction[5]}{type=\format}{option=\option_reaccent}
266
\answer{\rep_compose[6]}{\traduction[6]}{type=\format}{option=\option_reaccent}
267
\answer{\rep_compose[7]}{\traduction[7]}{type=\format}{option=\option_reaccent}
268
\answer{\rep_compose[8]}{\traduction[8]}{type=\format}{option=\option_reaccent}
269
\answer{\rep_compose[9]}{\traduction[9]}{type=\format}{option=\option_reaccent}
270
\answer{\rep_compose[10]}{\traduction[10]}{type=\format}{option=\option_reaccent}
271
\answer{\rep_compose[11]}{\traduction[11]}{type=\format}{option=\option_reaccent}
272
\answer{\rep_compose[12]}{\traduction[12]}{type=\format}{option=\option_reaccent}
273
\answer{\rep_compose[13]}{\traduction[13]}{type=\format}{option=\option_reaccent}
274
\answer{\rep_compose[14]}{\traduction[14]}{type=\format}{option=\option_reaccent}
275
\answer{\rep_compose[15]}{\traduction[15]}{type=\format}{option=\option_reaccent}
276
\answer{\rep_compose[16]}{\traduction[16]}{type=\format}{option=\option_reaccent}
277
\answer{\rep_compose[17]}{\traduction[17]}{type=\format}{option=\option_reaccent}
278
\answer{\rep_compose[18]}{\traduction[18]}{type=\format}{option=\option_reaccent}
279
\answer{\rep_compose[19]}{\traduction[19]}{type=\format}{option=\option_reaccent}
280
\answer{\rep_compose[20]}{\traduction[20]}{type=\format}{option=\option_reaccent}