Rev 13714 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
13714 | obado | 1 | type=numbers gapfill |
23 | reyssat | 2 | textarea="data" |
3 | |||
13704 | obado | 4 | :Digital response questions embedded in a random text |
23 | reyssat | 5 | |
13704 | obado | 6 | This exercise presents texts with "holes", |
7 | each to be filled with a number. |
||
23 | reyssat | 8 | <p> |
13704 | obado | 9 | To build an exercise with this model, just enter the texts. |
10 | An easy syntax allows you to specify the holes |
||
11 | and the correct number that it accepts. |
||
13477 | obado | 12 | </p><p class="wims_credits"> |
15179 | lemaire | 13 | Author of the model: <a href="mailto:qualite@wimsedu.info">Gang Xiao</a> |
13477 | obado | 14 | </p> |
23 | reyssat | 15 | :%%%%%%%%%%%%%%%%% ATTENTION %%%%%%%%%%%%%%%%%%%% |
16 | |||
17 | Remove the above header if you destroy the model tags! (The lines starting |
||
18 | with a ':'.) Otherwise the exercise might not be taken back by Createxo. |
||
19 | |||
20 | :%%%%%%%% Example parameters to be redefined %%%%%%%%%%%%%%%%% |
||
21 | |||
13704 | obado | 22 | :\title{Numerical questions} |
5724 | bpr | 23 | :\author{XIAO, Gang} |
8002 | bpr | 24 | :\email{qualite@wimsedu.info} |
5724 | bpr | 25 | :\credits{} |
23 | reyssat | 26 | |
11544 | obado | 27 | :Embraced random items |
8512 | bpr | 28 | $embraced_randitem |
11544 | obado | 29 | \text{accolade=item(1,1 yes, |
30 | 2 no)} |
||
8512 | bpr | 31 | |
23 | reyssat | 32 | :Main data. |
13704 | obado | 33 | Define one question per line, and separate the lines with a semicolon. (Donc les textes eux-mêmes ne peuvent pas contenir |
23 | reyssat | 34 | des point-virgules.) <p> |
8002 | bpr | 35 | La donnée numérique à poser comme question doit être entre une paire de |
23 | reyssat | 36 | double-point d'interrogation "??". |
13704 | obado | 37 | You can ask up to 6 questions in one sentence. |
23 | reyssat | 38 | $embraced_randitem |
39 | \text{data= |
||
13705 | obado | 40 | The last emperor Pu Yi |
41 | of the last Chinese dynasty Qing, was destituted by |
||
42 | a military uprising in |
||
43 | ??1911??. |
||
44 | He died of a disease in |
||
45 | ??1967?? in Beijing. |
||
46 | ; |
||
47 | After a ferocious battle, the Japanese invaded Shanghai in |
||
48 | ??1937?? which had an western "common" concession in that time. |
||
49 | They partially respected the neutrality of the concession |
||
50 | during their occupation up to ??1941??. |
||
51 | The abolition of the concession was first pronounced by the |
||
52 | puppet government in ??1943??. |
||
53 | ; |
||
23 | reyssat | 54 | } |
55 | |||
56 | :%%%%%%%%%%%%%% Nothing to modify before the statement %%%%%%%%%%%%%%%% |
||
8512 | bpr | 57 | \text{accolade=wims(word 1 of \accolade)} |
23 | reyssat | 58 | |
59 | \text{data=wims(singlespace \data)} |
||
60 | \text{data=wims(nonempty rows \data)} |
||
61 | \text{data=randomrow(\data)} |
||
8512 | bpr | 62 | \text{data=\accolade=1 ? wims(embraced randitem \data)} |
23 | reyssat | 63 | \text{data=slib(text/cutchoice2 \data)} |
64 | \integer{qs=floor(rows(\data)/2)} |
||
65 | \text{len=} |
||
13714 | obado | 66 | \text{latextext= \data[1;]} |
67 | \text{latexsol=\data[1;]} |
||
23 | reyssat | 68 | \for{i=1 to \qs}{ |
13714 | obado | 69 | \text{d=wims(trim \data[2*\i;])} |
70 | \integer{l=wims(charcnt \d) + 2} |
||
71 | \text{len=\len \l,} |
||
72 | \real{taille=ceil(\l/3-1)} |
||
73 | \text{latextext=\latextext \underline{\hspace{\taille cm}} \data[2*\i+1;]} |
||
74 | \text{latexsol=\latexsol \goodchoice{\data[2*\i;]} \data[2*\i+1;]} |
||
23 | reyssat | 75 | } |
76 | |||
77 | \text{qlist=wims(makelist reply x for x=1 to \qs)} |
||
78 | \steps{\qlist} |
||
79 | |||
80 | :%%%%%%%%%%%%% Now the statement in html. %%%%%%%%%%%%%%%%%%%% |
||
81 | |||
82 | ::You don't need to modify this in general. |
||
83 | |||
84 | \statement{ |
||
85 | \data[1;] |
||
86 | \for{k=1 to \qs}{ |
||
13714 | obado | 87 | \embed{r \k,\len[\k] |
88 | autocomplete="off"} \data[2*\k+1;] |
||
89 | } |
||
23 | reyssat | 90 | } |
91 | } |
||
92 | |||
93 | :%%%%%%%%%%%%% Nothing to modify after. %%%%%%%%%%%%%%%%%5 |
||
94 | |||
13704 | obado | 95 | \answer{Field 1}{\data[2;]}{type=number} |
96 | \answer{Field 2}{\data[4;]}{type=number} |
||
97 | \answer{Field 3}{\data[6;]}{type=number} |
||
98 | \answer{Field 4}{\data[8;]}{type=number} |
||
99 | \answer{Field 5}{\data[10;]}{type=number} |
||
100 | \answer{Field 6}{\data[12;]}{type=number} |
||
23 | reyssat | 101 | |
13714 | obado | 102 | \latex{ |
103 | \begin{statement} |
||
104 | \latextext |
||
105 | \end{statement} |
||
106 | \begin{solution} |
||
107 | \latexsol |
||
108 | \end{solution} |
||
109 | } |