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
13715 obado 2
textarea="data instruction instruction2"
3
iEdit="instruction instruction2"
4688 bpr 4
 
13477 obado 5
:Mark a word, then give a piece of information about that word
6
In the first step, it is asked to mark words; in the second step,
7
a question is asked about these words (text to answer).
4688 bpr 8
 
6069 bpr 9
<div class="small">
13477 obado 10
This exercise can easily be transformed to be included in an OEF module
11
 if you want to put the data into an auxiliary file.
12
To do this, simply fill in the \text{file=...} field
13
by putting the name of the file (once the exercise has been
14
 transferred to an OEF module of a Modtool account).
15
<p>nb: A more complete exercise of the same type exists in Quicktool.</p>
6069 bpr 16
</div>
13477 obado 17
<p class="wims_credits">
15179 lemaire 18
Author of the model: <a href="mailto:bernadette.m.riou@orange.fr">Bernadette Perrin-Riou</a>
13477 obado 19
</p>
4688 bpr 20
:%%%%%%%%%%%%%%%%%      ATTENTION      %%%%%%%%%%%%%%%%%%%%
21
 
11544 obado 22
Remove the above header if you destroy the model tags! (The lines starting
23
with a ':'.) Otherwise the exercise might not be taken back by Createxo.
4688 bpr 24
 
11544 obado 25
:%%%%%%%% Sample parameters to be redefined %%%%%%%%%%%%%%%%%
4688 bpr 26
 
13477 obado 27
:\title{Questions about words to select first}
5724 bpr 28
:\author{Bernadette, Perrin-Riou}
29
:\email{bpr@math.u-psud.fr}
30
:\credits{}
4688 bpr 31
 
13477 obado 32
:Instructions for the first question
33
\text{instruction=Mark the conjugated verbs.}
4688 bpr 34
 
13477 obado 35
:Instructions for the second question
36
\text{instruction2=What are their infinitives?}
37
 
38
:Analysis of the answers to the second question
39
The possibilities are <span class="tt">case</span> (sensitive), <span class="tt">nocase</span> (not case sensitive).
40
If nothing is completed, there is no second question asked.
4688 bpr 41
\text{format=case}
13477 obado 42
 
43
:Number of displayed lines
4688 bpr 44
\text{M=3}
13477 obado 45
 
46
:Size of the answer fields for the second question
4688 bpr 47
\text{size=15}
48
 
13477 obado 49
:Data
50
One sentence per line. We put between double question marks the word to mark
51
followed by the text to answer the second question, separated by the symbol
5907 bpr 52
<span class="tt wims_code_words">|</span>.
5797 bpr 53
$embraced_randitem
4688 bpr 54
 
13477 obado 55
\text{data= The cat ??eats|to eat?? the mouse.
56
We ??are turning|to turn?? the pages of the book one by one.
57
Hikers ??{will make,are making}|to make?? a fire.
4688 bpr 58
}
59
 
11544 obado 60
:Embraced random items
5797 bpr 61
$embraced_randitem
11544 obado 62
\text{accolade=item(1,1 yes,
63
2 no)}
64
:%%%%%%%%%%%%%% Nothing to modify until statement %%%%%%%%%%%%%%%%
7993 bpr 65
 
5797 bpr 66
\text{accolade=wims(word 1 of \accolade)}
67
 
4688 bpr 68
\text{file=}
69
\text{partialscore=split}
70
 
71
\text{first_step=1}
72
\text{alea=yes}
13714 obado 73
\css{<style>
13739 bpr 74
  .reponse {border-left-color: var(--wims_ref_color)}
13725 obado 75
  .verbe{color:blue;font-size:large;}
76
</style>}
4688 bpr 77
\text{paste=yes}
78
\text{pos_rep=outside}
6069 bpr 79
\text{second_step=\format notsametext ? yes:no}
4688 bpr 80
#####################
81
 
82
 
83
\text{format0=mark}
84
 
85
\if{\file notsametext}{
86
  \text{file0=randitem(\file)}
87
  \integer{cnt_question= wims(recordcnt \file0)}
6069 bpr 88
  \text{battage=\alea issametext yes ? shuffle(\cnt_question):
4688 bpr 89
wims(makelist x for x = 1 to \cnt_question)}
13739 bpr 90
  \text{texte=wims(record \battage[1] of \file0)}
91
}{
4688 bpr 92
  \integer{cnt_question=rows(\data)}
93
  \integer{N=min(\cnt_question,\M)}
94
  \integer{N=min(\N,10)}
95
  \text{liste=shuffle(\cnt_question)}
96
  \text{liste=\liste[1..\N]}
97
  \matrix{data=\data}
98
  \text{texte=\data[\liste;]}
17175 bpr 99
  \text{texte=wims(replace internal ; by  <br> in \texte)}
4688 bpr 100
}
101
 
6946 bpr 102
\text{autocompletion=\format iswordof case ? autocomplete="off"}
4688 bpr 103
\integer{first_step=\first_step notwordof 0 ? 1}
104
\text{option_reaccent=\reaccent!=yes ? noreaccent:}
105
\text{nopaste=\paste issametext no ? slib(utilities/nopaste )}
106
 
107
\text{size=\format iswordof dragfill clickfill ? \size x 1}
108
 
109
\text{texte=wims(\texte)}
5797 bpr 110
\text{texte=\accolade=1 ?wims(embraced randitem \texte)}
4688 bpr 111
\text{texte=wims(replace internal ??| by ??&nbsp;| in \texte)}
112
\text{texte=wims(replace internal ?? | by ??&nbsp;| in \texte)}
17175 bpr 113
\text{texte = wims(replace internal <br> by <br> _newline_  in \texte)}
13739 bpr 114
 
4688 bpr 115
\matrix{texte=slib(text/markgroup \texte)}
116
\matrix{numero=\texte[1..-4;]}
117
\text{traduction=\texte[-2;]}
118
\text{traduction=wims(replace internal || by | in \traduction)}
119
\text{cnt_mot = rows(\numero)}
120
\text{Numero = wims(rows2lines \numero)}
121
\text{Numero = wims(lines2items \Numero)}
122
\text{prem_numero=wims(column 1 of \numero)}
123
\text{texte = \texte[-3;]}
13477 obado 124
\text{texte = wims(replace internal _newline_ by  in \texte)}
4688 bpr 125
\text{cnt = items(\texte)}
126
\text{Texte=wims(items2words \texte)}
7093 bpr 127
 
4688 bpr 128
\text{rep_compose = }
129
\for{ i = 1 to \cnt_mot}{
13739 bpr 130
  \text{nom_compose= \texte[\numero[\i;]]}
131
  \text{nom_compose =wims(items2words \nom_compose)}
132
  \text{rep_compose = \rep_compose,\nom_compose}
4688 bpr 133
}
134
\text{rep_compose= wims(nonempty items \rep_compose)}
135
 
136
\text{STEP = wims(makelist r x for x = 2 to \cnt_mot+1)}
13477 obado 137
\text{labels = wims(makelist x for x = 2 to \cnt_mot+1)}
13739 bpr 138
 
4688 bpr 139
\text{position=}
140
\integer{a=0}
141
\for{t = 1 to \cnt}{
142
  \if{\t isitemof \prem_numero}{
143
    \integer{a =\a+1}
144
    \text{position=\position,\a}
145
  }{
146
    \text{position=\position,0}
147
  }
148
 }
149
\text{position=wims(nonempty items \position)}
150
 
151
\text{STEP1=\first_step=1?r1}
152
\text{STEP1=\second_step issametext yes ? \STEP1
153
\STEP
154
}
155
 
156
\steps{\STEP1}
157
 
158
 
159
\integer{reste=\cnt%\coupure}
160
\integer{quo=(\cnt-\reste)/\coupure}
161
\integer{quo=\reste=0? \quo-1}
162
\text{nombre=wims(makelist x for x = 1 to \cnt)}
13739 bpr 163
%%%%%%%%%%%
4688 bpr 164
 
13739 bpr 165
\statement{
166
  \nopaste <div class="instruction">\instruction</div>
167
  \preliminaire
4688 bpr 168
  \if{\reading notsametext }{\special{help reading,[à lire]}}
169
  \if{\image notsametext }{\special{help image,[à regarder]}}
170
  \audio\video
171
  \if{\step=\first_step}{
13739 bpr 172
    <div class="wims_question">
173
      \if{\format iswordof flashcard}{
174
        <p> \for{h=1 to \cnt}{\texte[\h] }</p>}
175
      \for{h=1 to \cnt}{
176
        \embed{reply 1,\h}
4688 bpr 177
      }
178
    </div>
13739 bpr 179
  }
180
  \if{\step >=1+\first_step}{
181
    \if{\pos_rep=outside}{
182
      <div class="wims_question reponse">
183
        \for{s = 1 to \cnt}{
184
          \if{\s notitemof \Numero}{
185
            \texte[\s]
186
          }{
187
            \if{\s isitemof \Numero}{
188
              <span class="verbe">\texte[\s]</span>
189
            }
190
          }
191
        }
13477 obado 192
      </div>
13739 bpr 193
      <p>\instruction2</p>
194
      <div class="wims_question">
195
          \for{s= 1 to \cnt_mot}{
196
            <div class="field">
197
              <label for="reply\labels[\s]">\rep_compose[\s] :</label>
198
              \embed{\STEP[\s],\size
199
                \autocompletion}
200
            </div>
201
          }
202
      </div>
4688 bpr 203
    }
13739 bpr 204
    \if{\pos_rep=inside}{
205
      <p>\instruction2</p>
206
      <div class="wims_question">
207
        \for{s = 1 to \cnt}{
208
          \if{\s notitemof \Numero}{
209
            \texte[\s]
210
          }{
211
            \if{\s isitemof \prem_numero}{
212
              \embed{\STEP[\position[\s]], \size
213
                \autocompletion}
214
            }
215
            <span class="smaller" style="color:blue;">\texte[\s]</span>
216
          }
217
        }
218
      </div>
219
    }
220
    \if{\pos_rep=under}{
221
      <div class="wims_question">
222
        \for{u = 0 to \quo}{
223
          <table style="border:none">
224
            <tr>
225
            \for{ v = 1 to \coupure}{
226
              <td style="text-align:center">
227
                \if{\coupure*\u+\v <= \cnt}{
228
                  \if{\nombre[\coupure*\u+\v] isitemof \Numero}{<span style="color:blue;">}
229
                  \texte[\coupure*\u+\v]
230
                }{&nbsp;}
231
                \if{\nombre[\coupure*\u+\v] isitemof \Numero}{</span>}
232
              </td>
233
            }
234
            </tr><tr>
235
            \for{ v = 1 to \coupure}{
236
              <td style="text-align:center">
237
                \if{\nombre[\coupure*\u+\v] isitemof \prem_numero}{
238
                  \embed{\STEP[\position[\nombre[\coupure*\u+\v]]], \size
239
                         \autocompletion}
240
                }{&nbsp;}
241
              </td>
242
            }
17175 bpr 243
            </tr><tr><td colspan="\coupure"><hr></td></tr>
13739 bpr 244
          </table>
245
        }
246
      </div>
247
    }
4688 bpr 248
  }
249
}
250
 
251
\answer{}{\Numero;\texte}{type=\format0}{option=\partialscore \option}
14910 bpr 252
\answer{\rep_compose[1]}{\traduction[1]}{type=\format}{option=\option_reaccent}
4688 bpr 253
\answer{\rep_compose[2]}{\traduction[2]}{type=\format}{option=\option_reaccent}
254
\answer{\rep_compose[3]}{\traduction[3]}{type=\format}{option=\option_reaccent}
255
\answer{\rep_compose[4]}{\traduction[4]}{type=\format}{option=\option_reaccent}
256
\answer{\rep_compose[5]}{\traduction[5]}{type=\format}{option=\option_reaccent}
257
\answer{\rep_compose[6]}{\traduction[6]}{type=\format}{option=\option_reaccent}
258
\answer{\rep_compose[7]}{\traduction[7]}{type=\format}{option=\option_reaccent}
259
\answer{\rep_compose[8]}{\traduction[8]}{type=\format}{option=\option_reaccent}
260
\answer{\rep_compose[9]}{\traduction[9]}{type=\format}{option=\option_reaccent}
261
\answer{\rep_compose[10]}{\traduction[10]}{type=\format}{option=\option_reaccent}
262
\answer{\rep_compose[11]}{\traduction[11]}{type=\format}{option=\option_reaccent}
263
\answer{\rep_compose[12]}{\traduction[12]}{type=\format}{option=\option_reaccent}
264
\answer{\rep_compose[13]}{\traduction[13]}{type=\format}{option=\option_reaccent}
265
\answer{\rep_compose[14]}{\traduction[14]}{type=\format}{option=\option_reaccent}
266
\answer{\rep_compose[15]}{\traduction[15]}{type=\format}{option=\option_reaccent}
267
\answer{\rep_compose[16]}{\traduction[16]}{type=\format}{option=\option_reaccent}
268
\answer{\rep_compose[17]}{\traduction[17]}{type=\format}{option=\option_reaccent}
269
\answer{\rep_compose[18]}{\traduction[18]}{type=\format}{option=\option_reaccent}
270
\answer{\rep_compose[19]}{\traduction[19]}{type=\format}{option=\option_reaccent}
271
\answer{\rep_compose[20]}{\traduction[20]}{type=\format}{option=\option_reaccent}