Subversion Repositories wimsdev

Rev

Rev 2901 | 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 à choix multiples incorporées dans un texte aléatoire.
5
 
6
Cet exercice présente des textes où des champs à choix multiples 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 dans les textes.
10
<p>
4706 bpr 11
Auteur du modèle : Gang Xiao <xiao@unice.fr> modifié par Bernadette Perrin-Riou
12
(ajout de l'option clickfill)
23 reyssat 13
 
14
:%%%%%%%%%%%%%%%%%      ATTENTION      %%%%%%%%%%%%%%%%%%%%
15
 
2880 bpr 16
Enlevez l'en-tête ci-dessus si vous détruisez les balises pour le modèle !
23 reyssat 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{Choix dans des textes}
23
:\author{XIAO Gang}
24
:\email{xiao@unice.fr}
25
 
4706 bpr 26
:Format des réponses
27
Possibilité : menu, clickfill
28
\text{format=menu}
29
 
30
:
31
\text{len=150 x 25}
23 reyssat 32
:Données principales.
33
Définir une question par ligne, et séparer les lignes
34
par un point-virgule. (Donc les textes eux-memes ne peuvent pas contenir
35
des point-virgules.) <p>
36
La question à poser doit être mise entre une paire de 
37
double-point d'interrogation "??".
38
On peut poser plusieurs questions dans une même phrase (jusqu'à 20).
4248 bpr 39
 
23 reyssat 40
$embraced_randitem
41
\text{data=
42
Le dernier empereur ??Pu Yi, Pu Jie, Ci Xi, Yuan Shikai??
43
de la dernière dynastie chinoise ??Qing,Ming,Song,Tang??, fut destitué par
44
??une révolte militaire,les envahisseurs japonais,l'armée Rouge soviétique,
45
les communistes?? en
46
??1911,1917,1937,1945,1949??. Il
47
??est décédé par maladie,a été exécuté,s'est suicidé?? en
48
??1967,1911,1918,1945,1950,1960?? à Beijing.;
49
 
50
Après une bataille ??féroce,facile??, les japonais ont envahi Shanghai en
51
??1937,1932,1938,1940,1941,1942?? qui comptait une concession
52
occidentale "commune" à l'époque. Ils ont
53
??partiellement,totalement,nullement?? respecté la neutralité de la concession
54
pendant l'occupation jusqu'en ??1941,1939,1942,1945??. L'abolition de la
55
concession fut prononcée pour la première fois par le gouvernement
56
??fantoche,nationaliste,communiste??
57
en ??1943,1945,1949,1960??.;
58
 
59
La première guerre de l'opium a été déclenchée par
3885 reyssat 60
??la Grande Bretagne,la France, les Etats-Unis, plusieurs pays occidentaux??
61
contre ??la Chine, l'Inde?? en ??1839,{1739,1741,1756},1841,1856??, dans le but
62
??de protéger,d'interdire?? le trafic de drogue (opium). Cette guerre s'est
23 reyssat 63
soldée par la capitulation du gouvernement ??chinois,indien?? 
64
??3,2,4,5,8?? ans après, avec la signature du traité de
65
??Nankin,Pekin,Canton,Maguan,Taiping,Tianjin??.;
66
}
67
 
68
:Texte affiché avant la question. Balises html admises. Peut être vide.
69
$embraced_randitem
70
\text{pre=Remplissez les cases : <p>}
71
 
72
:Texte affiché après la question. Balises html admises. Peut être vide.
73
$embraced_randitem
74
\text{post=}
75
 
76
:%%%%%%%%%%%%%% Rien à modifier avant l'énoncé %%%%%%%%%%%%%%%%
77
 
78
\text{data=wims(singlespace \data)}
79
\text{data=wims(nonempty rows \data)}
80
\text{data=randomrow(\data)}
81
\text{data=wims(embraced randitem \data)}
82
\text{data=slib(text/cutchoice2 \data)}
83
\integer{qs=min(20,floor(rows(\data)/2))}
84
 
85
\text{good=}
86
\text{field=}
87
\for{i=1 to \qs}{
88
 \text{f=\data[2*\i;]}
89
 \text{g=\f[1]}
90
 \text{f=wims(sort items \f)}
4706 bpr 91
 \text{g1=positionof(\g,\f)}
4736 bpr 92
 \text{good=\format issametext clickfill ?\good\g,:\good\g1,}
23 reyssat 93
 \text{field=\field\f;}
94
}
95
 
96
\text{pre=wims(embraced randitem \pre)}
97
\text{post=wims(embraced randitem \post)}
98
\text{qlist=wims(makelist reply x for x=1 to \qs)}
99
\steps{\qlist}
100
 
101
:%%%%%%%%%%%%% Maintenant l'énoncé en code html. %%%%%%%%%%%%%%%%%%%%
102
 
103
::Vous n'avez pas besoin de modifier ceci en général.
104
 
105
\statement{\pre
106
\data[1;]
107
\for{k=1 to \qs}{
108
\embed{r \k,\len} \data[2*\k+1;]
109
}
110
\post
111
}
112
 
113
:%%%%%%%%%%%%% Rien à modifier ci-après. %%%%%%%%%%%%%%%%%5
114
 
4706 bpr 115
\answer{Champ 1}{\good[1];\field[1;]}{type=\format}
116
\answer{Champ 2}{\good[2];\field[2;]}{type=\format}
117
\answer{Champ 3}{\good[3];\field[3;]}{type=\format}
118
\answer{Champ 4}{\good[4];\field[4;]}{type=\format}
119
\answer{Champ 5}{\good[5];\field[5;]}{type=\format}
120
\answer{Champ 6}{\good[6];\field[6;]}{type=\format}
121
\answer{Champ 7}{\good[7];\field[7;]}{type=\format}
122
\answer{Champ 8}{\good[8];\field[8;]}{type=\format}
123
\answer{Champ 9}{\good[9];\field[9;]}{type=\format}
124
\answer{Champ 10}{\good[10];\field[10;]}{type=\format}
125
\answer{Champ 11}{\good[11];\field[11;]}{type=\format}
126
\answer{Champ 12}{\good[12];\field[12;]}{type=\format}
127
\answer{Champ 13}{\good[13];\field[13;]}{type=\format}
128
\answer{Champ 14}{\good[14];\field[14;]}{type=\format}
129
\answer{Champ 15}{\good[15];\field[15;]}{type=\format}
130
\answer{Champ 16}{\good[16];\field[16;]}{type=\format}
131
\answer{Champ 17}{\good[17];\field[17;]}{type=\format}
132
\answer{Champ 18}{\good[18];\field[18;]}{type=\format}
133
\answer{Champ 19}{\good[19];\field[19;]}{type=\format}
134
\answer{Champ 20}{\good[20];\field[20;]}{type=\format}
23 reyssat 135