Subversion Repositories wimsdev

Rev

Rev 13725 | Rev 14910 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 13725 Rev 13739
Line 78... Line 78...
78
\text{partialscore=split}
78
\text{partialscore=split}
79
 
79
 
80
\text{first_step=1}
80
\text{first_step=1}
81
\text{alea=yes}
81
\text{alea=yes}
82
\css{<style>
82
\css{<style>
83
  .reponse {border-left-color: #FFCC99;}
83
  .reponse {border-left-color: var(--wims_ref_color)}
84
  .verbe{color:blue;font-size:large;}
84
  .verbe{color:blue;font-size:large;}
85
</style>}
85
</style>}
86
\text{paste=yes}
86
\text{paste=yes}
87
\text{pos_rep=outside}
87
\text{pos_rep=outside}
88
\text{second_step=\format notsametext ? yes:no}
88
\text{second_step=\format notsametext ? yes:no}
Line 94... Line 94...
94
\if{\file notsametext}{
94
\if{\file notsametext}{
95
  \text{file0=randitem(\file)}
95
  \text{file0=randitem(\file)}
96
  \integer{cnt_question= wims(recordcnt \file0)}
96
  \integer{cnt_question= wims(recordcnt \file0)}
97
  \text{battage=\alea issametext yes ? shuffle(\cnt_question):
97
  \text{battage=\alea issametext yes ? shuffle(\cnt_question):
98
wims(makelist x for x = 1 to \cnt_question)}
98
wims(makelist x for x = 1 to \cnt_question)}
99
\text{texte=wims(record \battage[1] of \file0)}
99
  \text{texte=wims(record \battage[1] of \file0)}
100
   }{
100
}{
101
  \integer{cnt_question=rows(\data)}
101
  \integer{cnt_question=rows(\data)}
102
  \integer{N=min(\cnt_question,\M)}
102
  \integer{N=min(\cnt_question,\M)}
103
  \integer{N=min(\N,10)}
103
  \integer{N=min(\N,10)}
104
  \text{liste=shuffle(\cnt_question)}
104
  \text{liste=shuffle(\cnt_question)}
105
  \text{liste=\liste[1..\N]}
105
  \text{liste=\liste[1..\N]}
Line 134... Line 134...
134
\text{cnt = items(\texte)}
134
\text{cnt = items(\texte)}
135
\text{Texte=wims(items2words \texte)}
135
\text{Texte=wims(items2words \texte)}
136
 
136
 
137
\text{rep_compose = }
137
\text{rep_compose = }
138
\for{ i = 1 to \cnt_mot}{
138
\for{ i = 1 to \cnt_mot}{
139
 \text{nom_compose= \texte[\numero[\i;]]}
139
  \text{nom_compose= \texte[\numero[\i;]]}
140
 \text{nom_compose =wims(items2words \nom_compose)}
140
  \text{nom_compose =wims(items2words \nom_compose)}
141
\text{rep_compose = \rep_compose,\nom_compose}
141
  \text{rep_compose = \rep_compose,\nom_compose}
142
}
142
}
143
\text{rep_compose= wims(nonempty items \rep_compose)}
143
\text{rep_compose= wims(nonempty items \rep_compose)}
144
 
144
 
145
\text{STEP = wims(makelist r x for x = 2 to \cnt_mot+1)}
145
\text{STEP = wims(makelist r x for x = 2 to \cnt_mot+1)}
146
\text{labels = wims(makelist x for x = 2 to \cnt_mot+1)}
146
\text{labels = wims(makelist x for x = 2 to \cnt_mot+1)}
Line 169... Line 169...
169
\integer{quo=(\cnt-\reste)/\coupure}
169
\integer{quo=(\cnt-\reste)/\coupure}
170
\integer{quo=\reste=0? \quo-1}
170
\integer{quo=\reste=0? \quo-1}
171
\text{nombre=wims(makelist x for x = 1 to \cnt)}
171
\text{nombre=wims(makelist x for x = 1 to \cnt)}
172
%%%%%%%%%%%
172
%%%%%%%%%%%
173
 
173
 
-
 
174
\statement{
174
\statement{\nopaste <div class="instruction">\instruction</div>
175
  \nopaste <div class="instruction">\instruction</div>
175
\preliminaire
176
  \preliminaire
176
  \if{\reading notsametext }{\special{help reading,[à lire]}}
177
  \if{\reading notsametext }{\special{help reading,[à lire]}}
177
  \if{\image notsametext }{\special{help image,[à regarder]}}
178
  \if{\image notsametext }{\special{help image,[à regarder]}}
178
  \audio\video
179
  \audio\video
179
  \if{\step=\first_step}{
180
  \if{\step=\first_step}{
180
    <div class="oef_question">
181
    <div class="wims_question">
181
   \if{\format iswordof flashcard}{
182
      \if{\format iswordof flashcard}{
182
     <p> \for{h=1 to \cnt}{\texte[\h] }</p>}
183
        <p> \for{h=1 to \cnt}{\texte[\h] }</p>}
183
    \for{h=1 to \cnt}{
184
      \for{h=1 to \cnt}{
184
      \embed{reply 1,\h}
185
        \embed{reply 1,\h}
185
    }
-
 
186
    </div>
-
 
187
   }
-
 
188
 \if{\step >=1+\first_step}{
-
 
189
   \if{\pos_rep=outside}{
-
 
190
     <div class="oef_question reponse">
-
 
191
     \for{s = 1 to \cnt}{
-
 
192
      \if{\s notitemof \Numero}{\texte[\s]}{
-
 
193
      \if{\s isitemof \Numero}{
-
 
194
      <span class="verbe">\texte[\s]</span>}
-
 
195
      }
186
      }
196
    }
-
 
197
    </div>
187
    </div>
-
 
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>
198
     <p>\instruction2</p>
202
      <p>\instruction2</p>
199
    <div class="oef_question">
203
      <div class="wims_question">
200
   \for{s= 1 to \cnt_mot}{
204
          \for{s= 1 to \cnt_mot}{
201
         <div class="field">
205
            <div class="field">
202
          <label for="reply\labels[\s]">\rep_compose[\s] :</label>
206
              <label for="reply\labels[\s]">\rep_compose[\s] :</label>
203
          \embed{\STEP[\s],\size
207
              \embed{\STEP[\s],\size
204
            \autocompletion}
208
                \autocompletion}
205
         </div>
209
            </div>
206
   }
210
          }
207
   </div>
211
      </div>
208
 }
212
    }
209
 \if{\pos_rep=inside}{
213
    \if{\pos_rep=inside}{
210
    <p>\instruction2</p>
214
      <p>\instruction2</p>
211
    <div class="oef_question">
215
      <div class="wims_question">
212
    \for{s = 1 to \cnt}{
216
        \for{s = 1 to \cnt}{
213
      \if{\s notitemof \Numero}{\texte[\s]}{
217
          \if{\s notitemof \Numero}{
-
 
218
            \texte[\s]
-
 
219
          }{
214
      \if{\s isitemof \prem_numero}{
220
            \if{\s isitemof \prem_numero}{
215
      \embed{\STEP[\position[\s]], \size
221
              \embed{\STEP[\position[\s]], \size
216
      \autocompletion}
222
                \autocompletion}
217
      }
223
            }
218
      <span class="smaller" style="color:blue;">\texte[\s]</span>}
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
            }
-
 
252
            </tr><tr><td colspan="\coupure"><hr /></td></tr>
-
 
253
          </table>
-
 
254
        }
-
 
255
      </div>
219
    }
256
    }
220
   </div>
-
 
221
  }
257
  }
222
  \if{\pos_rep=under}{
-
 
223
    <div class="oef_question">
-
 
224
    \for{u = 0 to \quo}{<table style="border:none">
-
 
225
    <tr>
-
 
226
    \for{ v = 1 to \coupure}{<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]}{&nbsp;}
-
 
230
          \if{\nombre[\coupure*\u+\v] isitemof \Numero}{</span>}
-
 
231
       </td>
-
 
232
      }
-
 
233
     </tr><tr>
-
 
234
     \for{ v = 1 to \coupure}{
-
 
235
        <td style="text-align:center">
-
 
236
      \if{\nombre[\coupure*\u+\v] isitemof \prem_numero}{
-
 
237
         \embed{\STEP[\position[\nombre[\coupure*\u+\v]]], \size
-
 
238
         \autocompletion}
-
 
239
      }{&nbsp;}
-
 
240
      </td>
-
 
241
     }
-
 
242
    </tr><tr><td colspan="\coupure"><hr /></td></tr>
-
 
243
       </table> }
-
 
244
 
-
 
245
   </div>
-
 
246
  }
-
 
247
 }
-
 
248
}
258
}
249
 
259
 
250
\answer{}{\Numero;\texte}{type=\format0}{option=\partialscore \option}
260
\answer{}{\Numero;\texte}{type=\format0}{option=\partialscore \option}
251
\answer{\rep_compose[1]}{\traduction[1];\choix}{type=\format}
261
\answer{\rep_compose[1]}{\traduction[1];\choix}{type=\format}
252
\answer{\rep_compose[2]}{\traduction[2]}{type=\format}{option=\option_reaccent}
262
\answer{\rep_compose[2]}{\traduction[2]}{type=\format}{option=\option_reaccent}