Rev 15119 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 15119 | Rev 15176 | ||
---|---|---|---|
Line 10... | Line 10... | ||
10 | To make an exercise with this model, type the list of |
10 | To make an exercise with this model, type the list of |
11 | items and their properties. |
11 | items and their properties. |
12 | </p><p> |
12 | </p><p> |
13 | With a slight modification, a variant of this model can accept images as items. |
13 | With a slight modification, a variant of this model can accept images as items. |
14 | </p><p class="wims_credits"> |
14 | </p><p class="wims_credits"> |
15 | Author of the model: |
15 | Author of the model: <a href="mailto:qualite@wimsedu.info">Gang Xiao</a> |
16 | </p> |
16 | </p> |
17 | :%%%%%%%%%%%%%%%%% ATTENTION %%%%%%%%%%%%%%%%%%%% |
17 | :%%%%%%%%%%%%%%%%% ATTENTION %%%%%%%%%%%%%%%%%%%% |
18 | 18 | ||
19 | Remove the above header if you destroy the model tags i.e. the lines starting |
19 | Remove the above header if you destroy the model tags i.e. the lines starting |
20 | with a ':'. Otherwise the exercise might not be recognised by Createxo. |
20 | with a ':'. Otherwise the exercise might not be recognised by Createxo. |
Line 131... | Line 131... | ||
131 | Add the word "list" to display objects as a bulleted list (instead of linear) |
131 | Add the word "list" to display objects as a bulleted list (instead of linear) |
132 | \text{presentation=} |
132 | \text{presentation=} |
133 | 133 | ||
134 | :Embraced random items |
134 | :Embraced random items |
135 | $embraced_randitem |
135 | $embraced_randitem |
136 | \text{accolade=item(1,1 yes, |
136 | \text{accolade=item(1,1. yes, |
137 | 2 no)} |
137 | 2. no)} |
138 | 138 | ||
139 | 139 | ||
140 | :%%%%%%%%%%%%%% Nothing to modify before the statement %%%%%%%%%%%%%%%% |
140 | :%%%%%%%%%%%%%% Nothing to modify before the statement %%%%%%%%%%%%%%%% |
141 | 141 | ||
142 | \text{prop=randitem(\prop)} |
142 | \text{prop=randitem(\prop)} |
Line 159... | Line 159... | ||
159 | \text{list=wims(values x for x=1 to \tot)} |
159 | \text{list=wims(values x for x=1 to \tot)} |
160 | \text{sh=shuffle(\list)} |
160 | \text{sh=shuffle(\list)} |
161 | \text{all=item(\sh,\all)} |
161 | \text{all=item(\sh,\all)} |
162 | \text{ind=item(\sh,\ind)} |
162 | \text{ind=item(\sh,\ind)} |
163 | \text{tomark=positionof(1,\ind)} |
163 | \text{tomark=positionof(1,\ind)} |
- | 164 | \integer{nbtomark=items(\tomark)} |
|
164 | 165 | ||
165 | :%% Display type : linear (default), ou as a bulleted list. |
166 | :%% Display type : linear (default), ou as a bulleted list. |
166 | \if{list iswordof \presentation} |
167 | \if{list iswordof \presentation} |
167 | { |
168 | { |
168 | \text{pre=<ul>} |
169 | \text{pre=<ul>} |
169 | \text{separatorL=<li>} |
170 | \text{separatorL=<li>} |
170 | \text{separatorR=</li>} |
171 | \text{separatorR=</li>} |
171 | \text{post=</ul>} |
172 | \text{post=</ul>} |
- | 173 | }{ |
|
- | 174 | \text{pre=<div>} |
|
- | 175 | \text{separatorL=<span>} |
|
- | 176 | \text{separatorR=</span>} |
|
- | 177 | \text{post=</div>} |
|
172 | } |
178 | } |
173 | { |
- | |
174 | \text{pre=<div>} |
- | |
175 | \text{separatorL=<span>} |
- | |
176 | \text{separatorR=</span>} |
- | |
177 | \text{post=</div>} |
- | |
178 | } |
- | |
179 | 179 | ||
180 | :%%%%%%%%%%%%% Now the statement in html. %%%%%%%%%%%%%%%%%%%% |
180 | :%%%%%%%%%%%%% Now the statement in html. %%%%%%%%%%%%%%%%%%%% |
181 | 181 | ||
182 | :Text to explain what should be done. |
182 | :Text to explain what should be done. |
183 | Write <span class="tt">\prop</span> for the randomly drawn property. |
183 | Write <span class="tt">\prop</span> for the randomly drawn property. |
184 | $embraced_randitem |
184 | $embraced_randitem |
185 | \text{explain= |
185 | \text{explain= |
186 | Among the players here below, who have participated to the World Football Cup 2006, |
186 | Among the players here below, who have participated to the World Football Cup 2006, |
187 | please select those in the \prop team. |
187 | please select those in the \prop team. |
188 | } |
188 | } |
189 | 189 | ||
190 | :%% Computations; do not modify |
190 | :%% Computations; do not modify |
191 | \text{accolade=wims(word 1 of \accolade)} |
191 | \text{accolade=wims(word 1 of \accolade)} |
192 | 192 | ||
193 | \text{explain=\accolade=1 ?wims(embraced randitem \explain)} |
193 | \text{explain=\accolade=1. ?wims(embraced randitem \explain)} |
- | 194 | :%% Pour la version latex de l'énonce |
|
- | 195 | \if{liste iswordof \presentation}{ |
|
- | 196 | \text{latextext=\begin{checkbox}} |
|
- | 197 | \for{ll=1 to \tot}{ |
|
- | 198 | \text{latextext=\latextext |
|
- | 199 | \item \all[\ll] } |
|
- | 200 | } |
|
- | 201 | \text{latextext=\latextext \end{checkbox}} |
|
- | 202 | }{ |
|
- | 203 | \text{latextext=\begin{quote}} |
|
- | 204 | \for{ll=1 to \tot-1}{ |
|
- | 205 | \text{latextext=\latextext \all[\ll], } |
|
- | 206 | } |
|
- | 207 | \text{latextext=\latextext \all[\tot]. |
|
- | 208 | \end{quote} } |
|
- | 209 | } |
|
- | 210 | \if{liste iswordof \presentation}{ |
|
- | 211 | \text{latexans=\begin{itemize}} |
|
- | 212 | \for{kls=1 to \nbtomark}{ |
|
- | 213 | \text{latexans=\latexans |
|
- | 214 | \item \all[\tomark[\kls]] } |
|
- | 215 | } |
|
- | 216 | \text{latexans=\latexans |
|
- | 217 | \end{itemize}} |
|
- | 218 | }{ |
|
- | 219 | \text{latexans=\begin{quote}} |
|
- | 220 | \for{lls=1 to \nbtomark-1}{ |
|
- | 221 | \text{latexans=\latexans \all[\tomark[\lls]], } |
|
- | 222 | } |
|
- | 223 | \text{latexans=\latexans \all[\tomark[\lls]]. |
|
- | 224 | \end{quote} } |
|
- | 225 | } |
|
194 | 226 | ||
195 | ::You don't need to modify this in general. |
227 | ::You don't need to modify this in general. |
196 | 228 | ||
197 | \statement{ |
229 | \statement{ |
198 | <p>\explain</p> |
230 | <p>\explain</p> |
199 | \pre |
231 | \pre |
200 | \for{k=1 to \tot-1 |
232 | \for{k=1 to \tot-1}{\separatorL \embed{r1,\k}, \separatorR } |
201 | \separatorL \embed{r1,\tot}.\separatorR |
233 | \separatorL \embed{r1,\tot}.\separatorR |
202 | \post |
234 | \post |
203 | } |
235 | } |
204 | 236 | ||
205 | :%%%%%%%%%%%%% Nothing to modify after. |
237 | :%%%%%%%%%%%%% Nothing to modify after. %%%%%%%%%%%%%%%%% |
206 | 238 | ||
207 | \answer{The marking}{\tomark;\all}{type=mark}{option=\option} |
239 | \answer{The marking}{\tomark;\all}{type=mark}{option=\option} |
- | 240 | \latex{ |
|
- | 241 | \begin{statement} |
|
- | 242 | \explain |
|
- | 243 | \latextext |
|
- | 244 | \end{statement} |
|
- | 245 | \begin{answer}\ |
|
- | 246 | \latexans |
|
- | 247 | \end{answer} |
|
- | 248 | } |
|
208 | 249 |