Rev 23 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
23 | reyssat | 1 | ## identifiants de l'exercice: titre, auteur, format |
2 | \title{ |
||
3 | \\\toef_var1 |
||
4 | } |
||
5 | \author{ |
||
6 | \\\toef_var2 |
||
7 | } |
||
8 | \email{ |
||
9 | \\\toef_var3 |
||
10 | } |
||
11 | \langage{fr} |
||
12 | \format{html} |
||
13 | |||
14 | ## type qcm de l'exo |
||
15 | \integer{ |
||
16 | exo= |
||
17 | \\\toef_var4 |
||
18 | } |
||
19 | |||
20 | ## la liste des objets mathématiques |
||
21 | \matrix{ |
||
22 | obsList= |
||
23 | \\\toef_var5 |
||
24 | } |
||
25 | \integer{obsnb=wims(rowcnt \obsList)} |
||
26 | |||
27 | ## la liste des proriétés éventuelles |
||
28 | \matrix{ |
||
29 | propsList= |
||
30 | \\\toef_var6 |
||
31 | } |
||
32 | \integer{propsnb=wims(rowcnt \propsList)-1} |
||
33 | |||
34 | ## liste des bonnes réponses par objet |
||
35 | \matrix{ |
||
36 | propsrepList= |
||
37 | \\\toef_var7 |
||
38 | } |
||
39 | |||
40 | ## nombre de possibilités à afficher |
||
41 | \integer{ |
||
42 | ckchnb= |
||
43 | \\\toef_var8 |
||
44 | } |
||
45 | \integer{ |
||
46 | fixchnb= |
||
47 | \\\toef_var9 |
||
48 | } |
||
49 | \integer{ |
||
50 | borng= |
||
51 | \\\toef_var10 |
||
52 | } |
||
53 | \integer{ |
||
54 | bornd= |
||
55 | \\\toef_var11 |
||
56 | } |
||
57 | \integer{ |
||
58 | chnb= |
||
59 | \\\toef_var12 |
||
60 | } |
||
61 | |||
62 | ## couleurs de fond |
||
63 | \text{bg=lavender,wheat,turquoise} |
||
64 | |||
65 | ## nombre de lignes pour l'affichage de 2 colonnes de la liste des propriétés |
||
66 | \integer{rowsnb=floor((\chnb+1)/2)} |
||
67 | \integer{extrarow=((\chnb+1)%2)} |
||
68 | |||
69 | ## choix aléatoire d'un objet |
||
70 | \integer{objn=random(1..\obsnb)} |
||
71 | \text{obj=\obsList[\objn;]} |
||
72 | |||
73 | ## la bonne réponse initiale |
||
74 | \text{props=\propsrepList[\objn;]} |
||
75 | |||
76 | ## génération de la liste des propriétés à afficher |
||
77 | \text{pafnbs=shuffle(\propsnb)} |
||
78 | \text{pafnbs=wims(item 1 to \chnb of \pafnbs)} |
||
79 | \text{pafnbs=wims(sort numeric item \pafnbs)} |
||
80 | \integer{nbp=\propsnb+1} |
||
81 | \text{pafnbs=wims(append item \nbp to \pafnbs)} |
||
82 | |||
83 | \text{paf=} |
||
84 | \for{i in \pafnbs}{ |
||
85 | \text{paf=wims(append line \propsList[\i;] to \paf)} |
||
86 | } |
||
87 | \matrix{paf=\paf} |
||
88 | |||
89 | \integer{chnbp=\chnb+1} |
||
90 | \text{propsorder=wims(values i for i=1 to \chnbp)} |
||
91 | |||
92 | ## ce qu'il faudra choisir pour avoir juste |
||
93 | \text{brep=wims(listintersect \props and \pafnbs)} |
||
94 | \integer{brepnb=wims(itemcnt \brep)} |
||
95 | |||
96 | \if{\brepnb=0}{ |
||
97 | \text{ansrep=\chnbp}}{ |
||
98 | \text{ansrep=} |
||
99 | \for{i in \brep}{ |
||
100 | \text{situ=position(\i,\pafnbs)} |
||
101 | \text{ansrep=wims(append item \situ to \ansrep)} |
||
102 | } |
||
103 | } |
||
104 | \text{rep=Les propriétés de \obj} |
||
105 | |||
106 | ## numérotation des éléments des colonnes |
||
107 | \text{c1=wims(values i for i=1 to \rowsnb)} |
||
108 | \text{c2=wims(values \rowsnb+i for i=1 to \rowsnb)} |
||
109 | |||
110 | ## énoncé saisi en ligne |
||
111 | \text{ |
||
112 | enonceR= |
||
113 | \\\toef_var13 |
||
114 | } |
||
115 | |||
116 | ## ici on donne l'énoncé de l'exercice |
||
117 | \statement{ |
||
118 | \enonceR |
||
119 | <br> |
||
120 | <br> |
||
121 | <center> |
||
122 | <table bgcolor=darkcyan> |
||
123 | \for{k=1 to \rowsnb}{ |
||
124 | <tr> |
||
3049 | bpr | 125 | <td bgcolor=\bg[(2*\k-1)%3+1] align="left"> |
23 | reyssat | 126 | <table> |
127 | <tr> |
||
128 | <td bgcolor=steelblue> |
||
129 | \embed{reply 1,\c1[\k]} |
||
130 | </td> |
||
3049 | bpr | 131 | <td align="center"> |
23 | reyssat | 132 | \paf[\k;] |
133 | </td> |
||
134 | </tr> |
||
135 | </table> |
||
136 | </td> |
||
3049 | bpr | 137 | <td bgcolor=\bg[(2*\k)%3+1] align="left"> |
23 | reyssat | 138 | <table> |
139 | <tr> |
||
140 | <td bgcolor=steelblue> |
||
141 | \embed{reply 1,\c2[\k]} |
||
142 | </td> |
||
3049 | bpr | 143 | <td align="center"> |
23 | reyssat | 144 | \paf[(\k+\rowsnb);] |
145 | </td> |
||
146 | </tr> |
||
147 | </table> |
||
148 | </td> |
||
149 | </tr> |
||
150 | } |
||
151 | \if{\extrarow<>0}{ |
||
152 | <tr> |
||
3049 | bpr | 153 | <td align="center" bgcolor=\bg[\chnbp%3+1] colspan=2> |
23 | reyssat | 154 | <table> |
155 | <tr> |
||
156 | <td bgcolor=steelblue> |
||
157 | \embed{reply 1,\chnbp} |
||
158 | </td> |
||
3049 | bpr | 159 | <td align="center"> |
23 | reyssat | 160 | \paf[\chnbp;] |
161 | </td> |
||
162 | </tr> |
||
163 | </table> |
||
164 | </td> |
||
165 | </tr> |
||
166 | } |
||
167 | </table> |
||
168 | </center> |
||
169 | } |
||
170 | |||
171 | ## champ de soumission et analyse de la réponse |
||
172 | \reply{\rep}{\ansrep;\propsorder}{type=checkbox} |