Subversion Repositories wimsdev

Rev

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

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