Subversion Repositories wimsdev

Rev

Rev 13716 | Rev 13739 | 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
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">
18
  Autor del model: Bernadette Perrin-Riou <bpr@math.u-psud.fr>
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>
13725 obado 83
  .reponse {border-left-color: #FFCC99;}
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)}
99
\text{texte=wims(record \battage[1] of \file0)}
100
   }{
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;]}
6070 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)}
13476 obado 122
\text{texte = wims(replace internal <br/> by <br/> _newline_  in \texte)}
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}{
139
 \text{nom_compose= \texte[\numero[\i;]]}
140
 \text{nom_compose =wims(items2words \nom_compose)}
141
\text{rep_compose = \rep_compose,\nom_compose}
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
 
12172 mquerol 174
\statement{\nopaste <div class="instruction">\instruction</div>
4688 bpr 175
\preliminaire
176
  \if{\reading notsametext }{\special{help reading,[à lire]}}
177
  \if{\image notsametext }{\special{help image,[à regarder]}}
178
  \audio\video
179
  \if{\step=\first_step}{
13725 obado 180
    <div class="oef_question">
4688 bpr 181
   \if{\format iswordof flashcard}{
12172 mquerol 182
     <p> \for{h=1 to \cnt}{\texte[\h] }</p>}
4688 bpr 183
    \for{h=1 to \cnt}{
11375 bpr 184
      \embed{reply 1,\h}
4688 bpr 185
    }
186
    </div>
187
   }
188
 \if{\step >=1+\first_step}{
189
   \if{\pos_rep=outside}{
13725 obado 190
     <div class="oef_question reponse">
4688 bpr 191
     \for{s = 1 to \cnt}{
192
      \if{\s notitemof \Numero}{\texte[\s]}{
193
      \if{\s isitemof \Numero}{
13725 obado 194
      <span class="verbe">\texte[\s]</span>}
4688 bpr 195
      }
196
    }
197
    </div>
12172 mquerol 198
     <p>\instruction2</p>
13725 obado 199
    <div class="oef_question">
4688 bpr 200
   \for{s= 1 to \cnt_mot}{
13476 obado 201
         <div class="field">
202
          <label for="reply\labels[\s]">\rep_compose[\s] :</label>
203
          \embed{\STEP[\s],\size
204
            \autocompletion}
205
         </div>
4688 bpr 206
   }
207
   </div>
208
 }
209
 \if{\pos_rep=inside}{
12172 mquerol 210
    <p>\instruction2</p>
13725 obado 211
    <div class="oef_question">
4688 bpr 212
    \for{s = 1 to \cnt}{
213
      \if{\s notitemof \Numero}{\texte[\s]}{
214
      \if{\s isitemof \prem_numero}{
215
      \embed{\STEP[\position[\s]], \size
216
      \autocompletion}
217
      }
6132 bpr 218
      <span class="smaller" style="color:blue;">\texte[\s]</span>}
4688 bpr 219
    }
220
   </div>
221
  }
222
  \if{\pos_rep=under}{
13725 obado 223
    <div class="oef_question">
12172 mquerol 224
    \for{u = 0 to \quo}{<table style="border:none">
4688 bpr 225
    <tr>
12172 mquerol 226
    \for{ v = 1 to \coupure}{<td style="text-align:center">
11375 bpr 227
       \if{\coupure*\u+\v <= \cnt}{
12172 mquerol 228
         \if{\nombre[\coupure*\u+\v] isitemof \Numero}{<span style="color:blue;">}
4688 bpr 229
           \texte[\coupure*\u+\v]}{&nbsp;}
6132 bpr 230
          \if{\nombre[\coupure*\u+\v] isitemof \Numero}{</span>}
4688 bpr 231
       </td>
232
      }
233
     </tr><tr>
234
     \for{ v = 1 to \coupure}{
12172 mquerol 235
        <td style="text-align:center">
11375 bpr 236
      \if{\nombre[\coupure*\u+\v] isitemof \prem_numero}{
4688 bpr 237
         \embed{\STEP[\position[\nombre[\coupure*\u+\v]]], \size
238
         \autocompletion}
239
      }{&nbsp;}
240
      </td>
241
     }
12172 mquerol 242
    </tr><tr><td colspan="\coupure"><hr /></td></tr>
4688 bpr 243
       </table> }
244
 
245
   </div>
246
  }
247
 }
248
}
249
 
250
\answer{}{\Numero;\texte}{type=\format0}{option=\partialscore \option}
251
\answer{\rep_compose[1]}{\traduction[1];\choix}{type=\format}
252
\answer{\rep_compose[2]}{\traduction[2]}{type=\format}{option=\option_reaccent}
253
\answer{\rep_compose[3]}{\traduction[3]}{type=\format}{option=\option_reaccent}
254
\answer{\rep_compose[4]}{\traduction[4]}{type=\format}{option=\option_reaccent}
255
\answer{\rep_compose[5]}{\traduction[5]}{type=\format}{option=\option_reaccent}
256
\answer{\rep_compose[6]}{\traduction[6]}{type=\format}{option=\option_reaccent}
257
\answer{\rep_compose[7]}{\traduction[7]}{type=\format}{option=\option_reaccent}
258
\answer{\rep_compose[8]}{\traduction[8]}{type=\format}{option=\option_reaccent}
259
\answer{\rep_compose[9]}{\traduction[9]}{type=\format}{option=\option_reaccent}
260
\answer{\rep_compose[10]}{\traduction[10]}{type=\format}{option=\option_reaccent}
261
\answer{\rep_compose[11]}{\traduction[11]}{type=\format}{option=\option_reaccent}
262
\answer{\rep_compose[12]}{\traduction[12]}{type=\format}{option=\option_reaccent}
263
\answer{\rep_compose[13]}{\traduction[13]}{type=\format}{option=\option_reaccent}
264
\answer{\rep_compose[14]}{\traduction[14]}{type=\format}{option=\option_reaccent}
265
\answer{\rep_compose[15]}{\traduction[15]}{type=\format}{option=\option_reaccent}
266
\answer{\rep_compose[16]}{\traduction[16]}{type=\format}{option=\option_reaccent}
267
\answer{\rep_compose[17]}{\traduction[17]}{type=\format}{option=\option_reaccent}
268
\answer{\rep_compose[18]}{\traduction[18]}{type=\format}{option=\option_reaccent}
269
\answer{\rep_compose[19]}{\traduction[19]}{type=\format}{option=\option_reaccent}
270
\answer{\rep_compose[20]}{\traduction[20]}{type=\format}{option=\option_reaccent}