Subversion Repositories wimsdev

Rev

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