Subversion Repositories wimsdev

Rev

Rev 2455 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
23 reyssat 1
type=datalist
2
textarea="data"
3
 
4
:Questions mixtes incorporées dans un texte aléatoire.
5
 
6
Cet exercice présente des textes où des champs à réponse sont insérés.
7
<p>
8
Pour construire un exercice avec ce modèle, il suffit d'entrer les textes.
9
Une syntaxe facile permet d'incorporer les champs de choix multiples et les
10
réponses libres dans les textes.
11
<p>
12
Auteur du modèle : Gang Xiao <xiao@unice.fr>
13
 
14
:%%%%%%%%%%%%%%%%%      ATTENTION      %%%%%%%%%%%%%%%%%%%%
15
 
16
Enlevez l'entete ci-dessus si vous détruisez les balises pour le modèle !
17
(Ce sont les lignes qui commencent par un ':'.)
18
Sinon l'exercice risque de ne pas pouvoir repasser sous Createxo.
19
 
20
:%%%%%%%% Paramètres d'exemples à redéfinir %%%%%%%%%%%%%%%%%
21
 
22
:\title{Textes à trous généralisés}
23
:\author{XIAO Gang}
24
:\email{xiao@unice.fr}
25
 
26
:Données principales.
27
Définir une question par ligne, et séparer les lignes
28
par un point-virgule. (Donc les textes eux-memes ne peuvent pas contenir
29
des point-virgules.) <p>
30
Les questions à poser doivent être mises entre une paire de 
31
double-point d'interrogation "??".
32
<p>
33
La question est un choix multiple s'il contient plusieurs objets séparés
34
par des virgules. Sinon c'est une réponse libre, numérique s'il s'agit d'un
35
nombre, ou textuel sinon. Dans ce dernier cas, l'analyse se fait par symtext
36
si la réponse donnée contient un trait vertical '|'.
37
<p>
38
On peut poser plusieurs questions dans une même phrase (jusqu'à 20).
39
Si un choix multiple accepte plusieurs réponses correctes possibles, mettez
40
toutes les bonnes réponses (synonymes) séparées par un trait vertical '|'.
41
<p>
42
$embraced_randitem
43
\text{data=
44
Le début officiel de la Seconde Guerre Mondiale est marqué par
45
??la déclaration de guerre,l'offensif?? de
46
??la Grande Bretagne et la France,la France,la Grande Bretagne,
47
l'Allemagne,l'Union Soviétique??
48
contre ??l'Allemagne,La pologne,l'Union Soviétique,la France??.;
49
 
50
La Seconde Guerre Mondiale s'est déroulée entre ??1939?? et
51
??1945??.;
52
 
53
??La Grande Bretagne et la France ont,La France a,La Grande Bretagne a,
54
Les Etats-Unis ont,L'Union Soviétique a?? déclaré la guerre
55
contre l'Allemagne en ??1939?? à la suite de l'envahissement de
56
??la Pologne?? par cette dernière.;
57
 
58
Pendant la Seconde Guerre Mondiale, l'Espagne sous
59
??Francisco Franco|[F.|Francisco|] Franco?? est un pays
60
??neutre,axe,allié,envahi??.;
61
 
62
??Après avoir battu,Avant d'attaquer?? la France,
63
{l'Allemagne,Hitler,l'Allemagne Nazi}
64
a lancé une attaque surprise contre l'USSR en
65
??décembre,{novembre,octobre},{septembre,août,juillet},{juin,mai,avril},{mars,février,janvier}??
66
??1940??, sous le nom {du plan,de l'opération} ??Barbarossa??.
67
}
68
 
69
:Texte affiché avant la question. Balises html admises. Peut être vide.
70
$embraced_randitem
71
\text{pre=Remplissez les cases : <p>}
72
 
73
:Texte affiché après la question. Balises html admises. Peut être vide.
74
$embraced_randitem
75
\text{post=}
76
 
77
:%%%%%%%%%%%%%% Rien à modifier avant l'énoncé %%%%%%%%%%%%%%%%
78
 
79
\precision{10000}
80
\text{data=wims(singlespace \data)}
81
\text{data=wims(nonempty rows \data)}
82
\text{data=randomrow(\data)}
83
\text{data=wims(embraced randitem \data)}
84
\text{data=slib(text/cutchoice2 \data)}
85
\integer{qs=min(20,floor(rows(\data)/2))}
86
\text{types=}
87
\text{options=}
88
\text{lengths=}
89
 
90
\text{good=}
91
\text{field=}
92
\for{i=1 to \qs}{
93
 \text{f=\data[2*\i;]}
94
 \integer{test=items(\f)}
95
 \if{\test>1}{
96
  \text{g=\f[1]}
97
  \text{f=wims(sort items \f)}
98
  \text{g=positionof(\g,\f)}
99
  \text{good=\good\g;,}
100
  \text{field=\field\f;}
101
  \text{types=\types[]menu,}
102
  \text{lengths=\lengths,}
103
 }{
104
  \text{good=\good\f,}
105
  \integer{c=wims(charcnt \f)}
106
  \text{field=\field;}
107
  \real{test=\f}
108
  \if{\test issametext NaN}{
109
   \text{test=wims(translate internal | to , in \f)}
110
   \integer{c=wims(charcnt \test[1])}
111
   \integer{c=min(50,max(6,\c+6))}
112
   \text{lengths=\lengths\c,}
113
   \text{types=\types[]atext,}
114
   \text{options=| isin \f?\options[]symtext}
115
  }{
116
   \integer{c=max(5,\c+2)}
117
   \text{lengths=\lengths\c,}
118
   \text{f1=wims(nospace \f)}
119
   \text{test=wims(text select -0123456789 in \f)}
120
   \text{types=\test issametext \f1 and abs(\f)<4000?\types[]numexp,:\types[]number,}
121
  }
122
 }
123
 \text{options=\options,}
124
}
125
 
126
\text{pre=wims(embraced randitem \pre)}
127
\text{post=wims(embraced randitem \post)}
128
\text{qlist=wims(makelist reply x for x=1 to \qs)}
129
\steps{\qlist}
130
 
131
:%%%%%%%%%%%%% Maintenant l'énoncé en code html. %%%%%%%%%%%%%%%%%%%%
132
 
133
::Vous n'avez pas besoin de modifier ceci en général.
134
 
135
\statement{\pre
136
\data[1;]
137
\for{k=1 to \qs}{
138
\embed{r \k,\lengths[\k]} \data[2*\k+1;]
139
}
140
\post
141
}
142
 
143
:%%%%%%%%%%%%% Rien à modifier ci-après. %%%%%%%%%%%%%%%%%5
144
 
145
\answer{Champ 1}{\good[1]\field[1;]}{type=\types[1]}{option=\options[1]}
146
\answer{Champ 2}{\good[2]\field[2;]}{type=\types[2]}{option=\options[2]}
147
\answer{Champ 3}{\good[3]\field[3;]}{type=\types[3]}{option=\options[3]}
148
\answer{Champ 4}{\good[4]\field[4;]}{type=\types[4]}{option=\options[4]}
149
\answer{Champ 5}{\good[5]\field[5;]}{type=\types[5]}{option=\options[5]}
150
\answer{Champ 6}{\good[6]\field[6;]}{type=\types[6]}{option=\options[6]}
151
\answer{Champ 7}{\good[7]\field[7;]}{type=\types[7]}{option=\options[7]}
152
\answer{Champ 8}{\good[8]\field[8;]}{type=\types[8]}{option=\options[8]}
153
\answer{Champ 9}{\good[9]\field[9;]}{type=\types[9]}{option=\options[9]}
154
\answer{Champ 10}{\good[10]\field[10;]}{type=\types[10]}{option=\options[10]}
155
\answer{Champ 11}{\good[11]\field[11;]}{type=\types[11]}{option=\options[11]}
156
\answer{Champ 12}{\good[12]\field[12;]}{type=\types[12]}{option=\options[12]}
157
\answer{Champ 13}{\good[13]\field[13;]}{type=\types[13]}{option=\options[13]}
158
\answer{Champ 14}{\good[14]\field[14;]}{type=\types[14]}{option=\options[14]}
159
\answer{Champ 15}{\good[15]\field[15;]}{type=\types[15]}{option=\options[15]}
160
\answer{Champ 16}{\good[16]\field[16;]}{type=\types[16]}{option=\options[16]}
161
\answer{Champ 17}{\good[17]\field[17;]}{type=\types[17]}{option=\options[17]}
162
\answer{Champ 18}{\good[18]\field[18;]}{type=\types[18]}{option=\options[18]}
163
\answer{Champ 19}{\good[19]\field[19;]}{type=\types[19]}{option=\options[19]}
164
\answer{Champ 20}{\good[20]\field[20;]}{type=\types[20]}{option=\options[20]}
165