Subversion Repositories wimsdev

Rev

Rev 14235 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
11375 bpr 1
type=gapfill
13715 obado 2
textarea="data pre post"
3
iEdit="pre post"
4821 czzmrn 4
 
5638 czzmrn 5
:Domande miste incorporate in un testo scelto a caso (cloze).
4821 czzmrn 6
 
7
Questo esercizio presenta un testo contenente campi in cui inserire le risposte.
8
<p>
8002 bpr 9
Per costruire un esercizio secondo questo modello è sufficiente inserire i
4821 czzmrn 10
testi. Una sintassi semplificata permette di incorporare in questo testo campi
11
per domande a scelta multipla o domande a risposta libera.
13479 obado 12
</p><p class="wims_credits">
15179 lemaire 13
  Autore del modello: <a href="mailto:qualite@wimsedu.info">Gang Xiao</a></p>
4821 czzmrn 14
 
15
:%%%%%%%%%%%%%%%%%      ATTENZIONE      %%%%%%%%%%%%%%%%%%%%
16
 
17
Se si rimuovono le indicazioni del modulo modelli (le righe che
18
cominciano con ':') è necessario rimuovere tutta questa parte
19
introduttiva del file. Altrimenti Createxo potrebbe non accettare il
20
codice dell'esercizio.
21
 
22
:%%%%%%%% Parametri che possono essere ridefiniti %%%%%%%%%%%%%%%%%
23
 
24
:\title{Completa il testo (generalizzato)}
5147 bpr 25
:\author{XIAO, Gang}
8002 bpr 26
:\email{qualite@wimsedu.info}
5724 bpr 27
:\credits{}
4821 czzmrn 28
 
29
:Contenuto effettivo dell'esercizio.
30
Definire un testo per riga, separando le righe con un punto-e-virgola
31
(di conseguenza i testi non possono contenere punti-e-virgola).<p>
32
In questi testi, le domande devono essere messe tra due coppie di doppi
33
punti di domanda "??".
13556 czzmrn 34
</p><p>
4821 czzmrn 35
La domanda è interpretata come una scelta multipla se contiene più
5779 czzmrn 36
elementi separati da virgole, ritenendo risposta corretta il primo elemento. Altrimenti se contiene un solo elemento è interpretata come una domanda
8002 bpr 37
a risposta libera e il tipo di risposta (numero o testo)
38
è determinato dal dato inserito.
13479 obado 39
</p><p>
5779 czzmrn 40
In uno stesso testo si possono inserire fino a 20 domande.
4821 czzmrn 41
Se in una risposta libera sono possibili più risposte corrette, separarle
5907 bpr 42
con una barra verticale <span class="tt wims_code_words">|</span>
5779 czzmrn 43
(per gli esperti: in questo caso il tipo di risposta è symtext).
13479 obado 44
</p>
4821 czzmrn 45
$embraced_randitem
46
\text{data=
47
Le début officiel de la Seconde Guerre Mondiale est marqué par
48
??la déclaration de guerre,l'offensive?? de
49
??la Grande Bretagne et la France,la France,la Grande Bretagne,
50
l'Allemagne,l'Union Soviétique??
51
contre ??l'Allemagne,La Pologne,l'Union Soviétique,la France??.;
52
 
53
La Seconde Guerre Mondiale s'est déroulée entre ??1939?? et
54
??1945??.;
55
 
56
??La Grande Bretagne et la France ont,La France a,La Grande Bretagne a,
57
Les Etats-Unis ont,L'Union Soviétique a?? déclaré la guerre
58
contre l'Allemagne en ??1939?? à la suite de l'invasion de
59
??la Pologne?? par cette dernière.;
60
 
61
Pendant la Seconde Guerre Mondiale, l'Espagne sous
62
??Francisco Franco|[F.|Francisco|] Franco?? est un pays
63
??neutre,axe,allié,envahi??.;
64
 
65
??Après avoir battu,Avant d'attaquer?? la France,
66
{l'Allemagne,Hitler,l'Allemagne Nazie}
67
a lancé une attaque surprise contre l'URSS en
68
??décembre,{novembre,octobre},{septembre,août,juillet},{juin,mai,avril},{mars,février,janvier}??
69
??1940??, sous le nom {du plan,de l'opération} ??Barbarossa??.
70
}
71
 
72
:Testo mostrato prima della domanda. Sono accettati Tag HTML. Può essere vuoto.
73
$embraced_randitem
7169 bpr 74
\text{pre=Completare il testo: }
4821 czzmrn 75
 
76
:Testo mostrato dopo la domanda. Sono accettati Tag HTML. Può essere vuoto.
77
$embraced_randitem
78
\text{post=}
79
 
13501 czzmrn 80
:Scelte casuali di elementi inseriti tra parentesi graffe
8530 czzmrn 81
$embraced_randitem
13556 czzmrn 82
\text{accolade=item(1,1 sì,
8530 czzmrn 83
2 no)}
84
 
14235 obado 85
:Tipi di analisi della risposta.
86
I tipi <span class="tt">case</span> e <span class="tt">nocase</span> sono soprattutto pensati per le
87
applicazioni linguistiche. Per tutti gli altri utilizzi è preferibile l'opzione
88
<span class="tt">atext</span>.
89
\text{type_rep=item(3,case (nessun errore tollerato),
90
  nocase (tollerate differenze maiuscole/minuscole),
91
  atext (ignorate differenze plurale/singolare e articoli))}
92
 
4821 czzmrn 93
:%%%%%%%%%%%%%% Nulla da modificare fino all'enunciato %%%%%%%%%%%%%%%%
8530 czzmrn 94
\text{accolade=wims(word 1 of \accolade)}
4821 czzmrn 95
\precision{10000}
96
\text{data=wims(singlespace \data)}
97
\text{data=wims(nonempty rows \data)}
98
\text{data=randomrow(\data)}
8530 czzmrn 99
\text{data=\accolade=1 ? wims(embraced randitem \data)}
4821 czzmrn 100
\text{data=slib(text/cutchoice2 \data)}
101
\integer{qs=min(20,floor(rows(\data)/2))}
102
\text{types=}
103
\text{options=}
104
\text{lengths=}
105
 
106
\text{good=}
107
\text{field=}
13556 czzmrn 108
\text{latextext= \data[1;]}
109
\text{latexsol=\data[1;]}
4821 czzmrn 110
\for{i=1 to \qs}{
111
 \text{f=\data[2*\i;]}
112
 \integer{test=items(\f)}
113
 \if{\test>1}{
114
  \text{g=\f[1]}
115
  \text{f=wims(sort items \f)}
116
  \text{g=positionof(\g,\f)}
117
  \text{good=\good\g;,}
118
  \text{field=\field\f;}
119
  \text{types=\types[]menu,}
120
  \text{lengths=\lengths,}
13556 czzmrn 121
  \integer{nbc = items(\f)-1}
122
  \for{ii = 1 to \nbc}{\text{latextext=\latextext \listchoice{\f[\ii]} / }}
123
  \text{latextext=\latextext \listchoice{\f[\nbc+1]} \data[2*\i+1;]}
124
  \text{latexsol=\latexsol \goodchoice{\field[\i;\g]} \data[2*\i+1;]}
4821 czzmrn 125
 }{
126
  \text{good=\good\f,}
127
  \integer{c=wims(charcnt \f)}
128
  \text{field=\field;}
129
  \real{test=\f}
130
  \if{\test issametext NaN}{
131
   \text{test=wims(translate internal | to , in \f)}
132
   \integer{c=wims(charcnt \test[1])}
133
   \integer{c=min(50,max(6,\c+6))}
134
   \text{lengths=\lengths\c,}
14235 obado 135
   \text{types=\types[]\type_rep,}
4821 czzmrn 136
   \text{options=| isin \f?\options[]symtext}
137
  }{
138
   \integer{c=max(5,\c+2)}
139
   \text{lengths=\lengths\c,}
140
   \text{f1=wims(nospace \f)}
141
   \text{test=wims(text select -0123456789 in \f)}
142
   \text{types=\test issametext \f1 and abs(\f)<4000?\types[]numexp,:\types[]number,}
143
  }
13556 czzmrn 144
    \real{taille=ceil(\lengths[\i]/3)}
145
    \text{latextext=\latextext \underline{\hspace{\taille cm}} \data[2*\i+1;]}
146
    \text{latexsol=\latexsol \goodchoice{\test[1]} \data[2*\i+1;]}
4821 czzmrn 147
 }
148
 \text{options=\options,}
149
}
150
 
8530 czzmrn 151
\text{pre=\accolade=1 ?wims(embraced randitem \pre)}
152
\text{post=\accolade=1 ?wims(embraced randitem \post)}
4821 czzmrn 153
\text{qlist=wims(makelist reply x for x=1 to \qs)}
154
\steps{\qlist}
155
 
156
:%%%%%%%%%%%%% Enunciato (in html). %%%%%%%%%%%%%%%%%%%%
157
 
158
::In questa parte non dovrebbe esserci nulla da modificare.
159
 
8530 czzmrn 160
\statement{<div class="instruction">
161
\pre
162
</div>
4821 czzmrn 163
\data[1;]
164
\for{k=1 to \qs}{
165
\embed{r \k,\lengths[\k]} \data[2*\k+1;]
166
}
167
\post
168
}
169
 
5638 czzmrn 170
:%%%%%%%%%%%%% Non modificare nulla da qui in poi. %%%%%%%%%%%%%%%%%
4821 czzmrn 171
 
172
\answer{Champ 1}{\good[1]\field[1;]}{type=\types[1]}{option=\options[1]}
173
\answer{Champ 2}{\good[2]\field[2;]}{type=\types[2]}{option=\options[2]}
174
\answer{Champ 3}{\good[3]\field[3;]}{type=\types[3]}{option=\options[3]}
175
\answer{Champ 4}{\good[4]\field[4;]}{type=\types[4]}{option=\options[4]}
176
\answer{Champ 5}{\good[5]\field[5;]}{type=\types[5]}{option=\options[5]}
177
\answer{Champ 6}{\good[6]\field[6;]}{type=\types[6]}{option=\options[6]}
178
\answer{Champ 7}{\good[7]\field[7;]}{type=\types[7]}{option=\options[7]}
179
\answer{Champ 8}{\good[8]\field[8;]}{type=\types[8]}{option=\options[8]}
180
\answer{Champ 9}{\good[9]\field[9;]}{type=\types[9]}{option=\options[9]}
181
\answer{Champ 10}{\good[10]\field[10;]}{type=\types[10]}{option=\options[10]}
182
\answer{Champ 11}{\good[11]\field[11;]}{type=\types[11]}{option=\options[11]}
183
\answer{Champ 12}{\good[12]\field[12;]}{type=\types[12]}{option=\options[12]}
184
\answer{Champ 13}{\good[13]\field[13;]}{type=\types[13]}{option=\options[13]}
185
\answer{Champ 14}{\good[14]\field[14;]}{type=\types[14]}{option=\options[14]}
186
\answer{Champ 15}{\good[15]\field[15;]}{type=\types[15]}{option=\options[15]}
187
\answer{Champ 16}{\good[16]\field[16;]}{type=\types[16]}{option=\options[16]}
188
\answer{Champ 17}{\good[17]\field[17;]}{type=\types[17]}{option=\options[17]}
189
\answer{Champ 18}{\good[18]\field[18;]}{type=\types[18]}{option=\options[18]}
190
\answer{Champ 19}{\good[19]\field[19;]}{type=\types[19]}{option=\options[19]}
191
\answer{Champ 20}{\good[20]\field[20;]}{type=\types[20]}{option=\options[20]}
192
 
13556 czzmrn 193
\latex{
194
\begin{statement}
195
\pre \newline
196
\latextext \newline
197
\post
198
\end{statement}
199
 
200
\begin{solution}
201
\latexsol
202
\end{solution}
203
}