Rev 13704 | Rev 13715 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
11375 | bpr | 1 | type=gapfill |
23 | reyssat | 2 | textarea="data explain" |
3 | |||
13704 | obado | 4 | :Type the property of an object chosen randomly from a list |
23 | reyssat | 5 | |
6 | <p> |
||
13704 | obado | 7 | An item is randomly selected from a list and you are asked to type its property. |
5354 | obado | 8 | </p><p> |
13704 | obado | 9 | To build an exercise with this model, just give the list of objects and their properties. |
5354 | obado | 10 | </p> |
11544 | obado | 11 | <p>Author of the model: Gang Xiao <qualite@wimsedu.info></p> |
23 | reyssat | 12 | |
13 | :%%%%%%%%%%%%%%%%% ATTENTION %%%%%%%%%%%%%%%%%%%% |
||
14 | |||
11544 | obado | 15 | Remove the above header if you destroy the model tags! (The lines starting |
16 | with a ':'.) Otherwise the exercise might not be taken back by Createxo. |
||
23 | reyssat | 17 | |
11544 | obado | 18 | :%%%%%%%% Sample parameters to be redefined %%%%%%%%%%%%%%%%% |
23 | reyssat | 19 | |
13704 | obado | 20 | :\title{Typed property} |
5147 | bpr | 21 | :\author{XIAO, Gang} |
8002 | bpr | 22 | :\email{qualite@wimsedu.info} |
5724 | bpr | 23 | :\credits{} |
23 | reyssat | 24 | |
13714 | obado | 25 | :Width of the field to type |
13704 | obado | 26 | Sufficient space must be provided for the longest property. |
23 | reyssat | 27 | \integer{size=20} |
28 | |||
13477 | obado | 29 | :Main data. |
13704 | obado | 30 | <p>Define an object by line, first the name of the object to be displayed, then its property as it should be typed, separated by a comma. |
5354 | obado | 31 | </p><p> |
13704 | obado | 32 | You can declare synonyms of properties to be recognized, separated by vertical lines (example: dark|gloomy).</p> |
23 | reyssat | 33 | \matrix{data= |
13704 | obado | 34 | gift, gifts |
35 | pebble, pebbles |
||
36 | horse, horses |
||
37 | sky, skies |
||
38 | hole, holes |
||
39 | child, children |
||
40 | man, men |
||
41 | woman, women |
||
42 | mouse, mice |
||
43 | tooth, teeth |
||
44 | foot, feet |
||
23 | reyssat | 45 | } |
46 | |||
13714 | obado | 47 | :Type of response analysis |
13704 | obado | 48 | The <span class="tt">case</ span> and <span class="tt">nocase</ span> types are mostly suitable for language applications. |
49 | In other cases, prefer <span class="tt"> atext </span>. |
||
50 | \text{atype=item(1,case (no error tolerance), |
||
13714 | obado | 51 | nocase (tolerate lowercase / uppercase), |
52 | atext (ignore plural / singular and articles))} |
||
23 | reyssat | 53 | |
11544 | obado | 54 | :Embraced random items |
5797 | bpr | 55 | $embraced_randitem |
11544 | obado | 56 | \text{accolade=item(1,1 yes, |
57 | 2 no)} |
||
5797 | bpr | 58 | |
11544 | obado | 59 | :%%%%%%%%%%%%%% Nothing to modify until statement %%%%%%%%%%%%%%%% |
5797 | bpr | 60 | \text{accolade=wims(word 1 of \accolade)} |
23 | reyssat | 61 | \text{data=randomrow(\data)} |
62 | \text{name=\data[1]} |
||
63 | \text{prop=\data[2]} |
||
64 | \text{atype=wims(word 1 of \atype)} |
||
65 | |||
11544 | obado | 66 | :%%%%%%%%%%%%% Now the statement in HTML. %%%%%%%%%%%%%%%%%%%% |
23 | reyssat | 67 | |
13704 | obado | 68 | :Instructions |
69 | To evoke the picked object, write <span class="tt">\name</span>. |
||
23 | reyssat | 70 | $embraced_randitem |
71 | \text{explain= |
||
13704 | obado | 72 | Type the plural of the word <span style="color:blue;font-weight:bold;">\name</span>: |
23 | reyssat | 73 | } |
74 | |||
11544 | obado | 75 | :%% Do not modify |
5797 | bpr | 76 | \text{explain=\accolade=1 ? wims(embraced randitem \explain)} |
23 | reyssat | 77 | |
13704 | obado | 78 | ::One does not need to modify the statement directly in general. |
23 | reyssat | 79 | |
4780 | obado | 80 | \statement{ |
13714 | obado | 81 | <label for="reply1" class="oef_explain">\explain</label> |
82 | <span class="oef_input"> |
||
83 | \embed{r1,\size |
||
84 | autocomplete="off"}. |
||
85 | </span> |
||
23 | reyssat | 86 | } |
87 | |||
11544 | obado | 88 | :%%%%%%%%%%%%% Nothing to modify after. %%%%%%%%%%%%%%%%%5 |
23 | reyssat | 89 | |
13704 | obado | 90 | \answer{The answer}{\prop}{type=\atype} |
23 | reyssat | 91 |