Rev 8512 | Rev 11375 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
3788 | bpr | 1 | type=datalist |
2 | textarea="data" |
||
3 | |||
4416 | bpr | 4 | :Classify the items according to their properties by filling in a table. |
3788 | bpr | 5 | |
8512 | bpr | 6 | A list of items with various properties is presented. |
4416 | bpr | 7 | The table has to be filled in by filling on the relevant boxes for each item. |
3788 | bpr | 8 | |
9 | <p> |
||
4416 | bpr | 10 | To make an exercise with this model, type the list of items and a list of properties. |
11 | If an item has a property write 1, if it does not, write 0 in the same order as the list of properties. |
||
12 | The properties should be separated by a comma. |
||
3788 | bpr | 13 | <p> |
8512 | bpr | 14 | This exercise can easily be modified if it is intended to be included in an OEF module and you wish to |
4416 | bpr | 15 | include the data in a separate file. |
3788 | bpr | 16 | <p> |
4416 | bpr | 17 | Author of the model: Bernadette Perrin-Riou <bpr@math.u-psud.fr> |
3788 | bpr | 18 | |
19 | :%%%%%%%%%%%%%%%%% ATTENTION %%%%%%%%%%%%%%%%%%%% |
||
20 | |||
4416 | bpr | 21 | Remove the above header if you destroy the model tags i.e. the lines starting |
22 | with a ':'. Otherwise the exercise might not be recognised by Createxo. |
||
3788 | bpr | 23 | |
4416 | bpr | 24 | :%%%%%%%% Example parameters to be redefined %%%%%%%%%%%%%%%%% |
3788 | bpr | 25 | |
4416 | bpr | 26 | :\title{Classification (table to fill)} |
5147 | bpr | 27 | :\author{Csilla, Ducrocq} |
4416 | bpr | 28 | :\email{csilla.ducrocq@u-psud.fr} |
5724 | bpr | 29 | :\credits{} |
3788 | bpr | 30 | :Instruction |
4416 | bpr | 31 | \text{instruction=Fill in the table.} |
3788 | bpr | 32 | |
4416 | bpr | 33 | :Number of items chosen randomly |
3788 | bpr | 34 | \integer{N=3} |
4416 | bpr | 35 | |
36 | :Name of the data file |
||
37 | Only enter a name if you wish to create a separate data file |
||
4425 | bpr | 38 | (in an OEF module) |
4416 | bpr | 39 | of the following type |
4049 | bpr | 40 | <pre> |
4416 | bpr | 41 | fur,feathers,four legs,wings |
6582 | bpr | 42 | :magpie,0,1,1,1 |
43 | :cow,1,0,1,0 |
||
44 | </pre> |
||
8512 | bpr | 45 | Dans ce cas, les données suivantes ne seront pas prises en compte. |
4049 | bpr | 46 | Sinon, remplissez les données. |
3788 | bpr | 47 | |
6582 | bpr | 48 | \text{file=} |
3788 | bpr | 49 | :Liste des attributs |
50 | \text{attribut=poils,plumes,quatre membres,ailes} |
||
51 | :Données |
||
52 | une ligne par objets. |
||
53 | \text{data=pie,0,1,1,1 |
||
54 | boeuf,1,0,1,0 |
||
55 | chat,1,0,1,0 |
||
56 | moustique,0,0,0,1} |
||
57 | :Textes pour la réponse |
||
3791 | bpr | 58 | mettre les textes correspondant aux nombres 0,1, ... dans les données des attributs |
3788 | bpr | 59 | \text{nonoui=--,X} |
60 | |||
4416 | bpr | 61 | :%%%%%%%%%%%%%% Nothing to modify before the statement%%%%%%%%%%%%%%%% |
62 | maximum 40 cases |
||
3788 | bpr | 63 | \integer{w=\size[1]+10} |
64 | |||
65 | \css{<style type="text/css"> |
||
66 | .question {background-color: #FFFFCC;margin: 2% 2%;padding: 1%;} |
||
6582 | bpr | 67 | table.tableau {border:solid 1px;margin-left:auto;margin-right:auto; |
68 | border-collapse:collapse;} |
||
69 | table.tableau td, th {text-align:center;border:solid 1px;min-width:50px;} |
||
3788 | bpr | 70 | ol li {list-style: upper-alpha; } |
71 | table.tableau th { background-color:#CCCFFF;} |
||
72 | </style>} |
||
73 | \if{\file notsametext}{ |
||
4416 | bpr | 74 | \text{file=randitem(\file)} |
3788 | bpr | 75 | \text{attribut=wims(record 0 of \file)} |
76 | \integer{datacnt=wims(recordcnt \file)} |
||
77 | \integer{N=min(\N,\datacnt)} |
||
78 | \text{choix=shuffle(\datacnt)} |
||
79 | \text{choix=\choix[1..\N]} |
||
80 | \text{data=} |
||
81 | \for{s in \choix}{ |
||
82 | \text{data=\data |
||
83 | wims(record \s of \file)} |
||
4416 | bpr | 84 | } |
85 | \matrix{data=\data} |
||
86 | \text{data=wims(replace internal ;; by ; in \data)} |
||
87 | }{ |
||
3788 | bpr | 88 | \text{objet_cnt=rows(\data)} |
89 | \integer{N=min(\N,\objet_cnt)} |
||
4416 | bpr | 90 | \text{bat=shuffle(\objet_cnt)} |
91 | \text{bat=\bat[1..\N]} |
||
92 | \matrix{data=\data} |
||
93 | \matrix{data=\data[\bat;]} |
||
3788 | bpr | 94 | } |
95 | \integer{attribut_cnt=items(\attribut)} |
||
96 | \integer{ch_cnt=items(\nonoui)} |
||
97 | \text{Data=} |
||
98 | \text{STEP=} |
||
99 | \for{u=1 to \N}{ |
||
100 | \text{STEP=\STEP |
||
101 | wims(makelist r x for x = (\u-1)*\attribut_cnt + 1 to (\u)*\attribut_cnt)} |
||
102 | \text{Data=wims(append item \data[\u;2..-1] to \Data)} |
||
6582 | bpr | 103 | \for{c=0 to \ch_cnt-1}{ |
5147 | bpr | 104 | \text{Data=wims(replace internal \c by \nonoui[\c+1] in \Data)} |
6582 | bpr | 105 | } |
5147 | bpr | 106 | } |
3788 | bpr | 107 | \matrix{STEP=\STEP} |
108 | \text{STEP1=wims(replace internal ; by , in \STEP)} |
||
109 | \text{STEP1=wims(nonempty items \STEP1)} |
||
110 | \steps{\STEP1} |
||
4416 | bpr | 111 | \statement{<div class="question">\instruction |
6132 | bpr | 112 | |
5147 | bpr | 113 | <table class="tableau"><tr><th></th> |
3788 | bpr | 114 | \for{k=1 to \attribut_cnt}{<th>\attribut[\k]</th>} |
11310 | bpr | 115 | </tr> |
8512 | bpr | 116 | \for{j=1 to \N}{ |
3788 | bpr | 117 | <tr><th>\data[\j;1]</th> |
118 | \for{k=1 to \attribut_cnt}{ |
||
119 | <td>\embed{\STEP[\j;\k], \size[1] x \size[2]}</td> |
||
120 | } |
||
121 | </tr> |
||
122 | } |
||
123 | </table> |
||
6132 | bpr | 124 | |
3788 | bpr | 125 | </div> |
126 | } |
||
127 | \answer{}{\Data[1]}{type=clickfill} |
||
128 | \answer{}{\Data[2]}{type=clickfill} |
||
129 | \answer{}{\Data[3]}{type=clickfill} |
||
130 | \answer{}{\Data[4]}{type=clickfill} |
||
131 | \answer{}{\Data[5]}{type=clickfill} |
||
132 | \answer{}{\Data[6]}{type=clickfill} |
||
133 | \answer{}{\Data[7]}{type=clickfill} |
||
134 | \answer{}{\Data[8]}{type=clickfill} |
||
135 | \answer{}{\Data[9]}{type=clickfill} |
||
136 | \answer{}{\Data[10]}{type=clickfill} |
||
137 | \answer{}{\Data[11]}{type=clickfill} |
||
138 | \answer{}{\Data[12]}{type=clickfill} |
||
139 | \answer{}{\Data[13]}{type=clickfill} |
||
140 | \answer{}{\Data[14]}{type=clickfill} |
||
141 | \answer{}{\Data[15]}{type=clickfill} |
||
142 | \answer{}{\Data[16]}{type=clickfill} |
||
143 | \answer{}{\Data[17]}{type=clickfill} |
||
144 | \answer{}{\Data[18]}{type=clickfill} |
||
145 | \answer{}{\Data[19]}{type=clickfill} |
||
146 | \answer{}{\Data[20]}{type=clickfill} |
||
147 | \answer{}{\Data[21]}{type=clickfill} |
||
148 | \answer{}{\Data[22]}{type=clickfill} |
||
149 | \answer{}{\Data[23]}{type=clickfill} |
||
150 | \answer{}{\Data[24]}{type=clickfill} |
||
151 | \answer{}{\Data[25]}{type=clickfill} |
||
152 | \answer{}{\Data[26]}{type=clickfill} |
||
153 | \answer{}{\Data[27]}{type=clickfill} |
||
154 | \answer{}{\Data[28]}{type=clickfill} |
||
155 | \answer{}{\Data[30]}{type=clickfill} |
||
156 | \answer{}{\Data[31]}{type=clickfill} |
||
157 | \answer{}{\Data[32]}{type=clickfill} |
||
158 | \answer{}{\Data[33]}{type=clickfill} |
||
159 | \answer{}{\Data[34]}{type=clickfill} |
||
160 | \answer{}{\Data[35]}{type=clickfill} |
||
161 | \answer{}{\Data[36]}{type=clickfill} |
||
162 | \answer{}{\Data[37]}{type=clickfill} |
||
163 | \answer{}{\Data[38]}{type=clickfill} |
||
164 | \answer{}{\Data[39]}{type=clickfill} |
||
165 | \answer{}{\Data[40]}{type=clickfill} |
||
166 |