Subversion Repositories wimsdev

Rev

Rev 13477 | Rev 13714 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
11375 bpr 1
type=classify
3788 bpr 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.
13477 obado 13
</p><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.
13477 obado 16
</p><p class="wims_credits">
4416 bpr 17
Author of the model: Bernadette Perrin-Riou <bpr@math.u-psud.fr>
13477 obado 18
</p>
3788 bpr 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{}
13477 obado 30
 
3788 bpr 31
:Instruction
4416 bpr 32
\text{instruction=Fill in the table.}
3788 bpr 33
 
4416 bpr 34
:Number of items chosen randomly
3788 bpr 35
\integer{N=3}
4416 bpr 36
 
37
:Name of the data file
38
Only enter a name if you wish to create a separate data file
4425 bpr 39
(in an OEF module)
4416 bpr 40
of the following type
4049 bpr 41
<pre>
4416 bpr 42
fur,feathers,four legs,wings
6582 bpr 43
 :magpie,0,1,1,1
44
 :cow,1,0,1,0
45
</pre>
8512 bpr 46
Dans ce cas, les données suivantes ne seront pas prises en compte.
4049 bpr 47
Sinon, remplissez les données.
3788 bpr 48
 
6582 bpr 49
\text{file=}
13477 obado 50
 
3788 bpr 51
:Liste des attributs
52
\text{attribut=poils,plumes,quatre membres,ailes}
13477 obado 53
 
54
:Data
3788 bpr 55
une ligne par objets.
56
\text{data=pie,0,1,1,1
57
boeuf,1,0,1,0
58
chat,1,0,1,0
59
moustique,0,0,0,1}
13477 obado 60
 
3788 bpr 61
:Textes pour la réponse
3791 bpr 62
mettre les textes correspondant aux nombres 0,1, ... dans les données des attributs
3788 bpr 63
\text{nonoui=--,X}
64
 
4416 bpr 65
:%%%%%%%%%%%%%% Nothing to modify before the statement%%%%%%%%%%%%%%%%
66
maximum 40 cases
3788 bpr 67
\integer{w=\size[1]+10}
68
 
69
\css{<style type="text/css">
13489 obado 70
   .question {margin: 2% 2%;padding: 1%;}
71
   .wimstable td, th {text-align:center;min-width:50px;}
72
</style>}
73
 
3788 bpr 74
\if{\file notsametext}{
4416 bpr 75
  \text{file=randitem(\file)}
3788 bpr 76
  \text{attribut=wims(record 0 of \file)}
77
  \integer{datacnt=wims(recordcnt \file)}
78
  \integer{N=min(\N,\datacnt)}
79
  \text{choix=shuffle(\datacnt)}
80
  \text{choix=\choix[1..\N]}
81
  \text{data=}
82
  \for{s in \choix}{
83
    \text{data=\data
84
wims(record \s of \file)}
4416 bpr 85
  }
86
  \matrix{data=\data}
87
  \text{data=wims(replace internal ;; by ; in \data)}
88
}{
3788 bpr 89
  \text{objet_cnt=rows(\data)}
90
  \integer{N=min(\N,\objet_cnt)}
4416 bpr 91
  \text{bat=shuffle(\objet_cnt)}
92
  \text{bat=\bat[1..\N]}
93
  \matrix{data=\data}
94
  \matrix{data=\data[\bat;]}
3788 bpr 95
}
96
\integer{attribut_cnt=items(\attribut)}
97
\integer{ch_cnt=items(\nonoui)}
98
\text{Data=}
99
\text{STEP=}
100
\for{u=1 to \N}{
101
  \text{STEP=\STEP
102
   wims(makelist r x for x = (\u-1)*\attribut_cnt + 1  to  (\u)*\attribut_cnt)}
103
  \text{Data=wims(append item \data[\u;2..-1] to \Data)}
6582 bpr 104
  \for{c=0 to \ch_cnt-1}{
5147 bpr 105
  \text{Data=wims(replace internal \c by \nonoui[\c+1] in \Data)}
6582 bpr 106
  }
5147 bpr 107
}
3788 bpr 108
\matrix{STEP=\STEP}
109
\text{STEP1=wims(replace internal ; by , in \STEP)}
110
\text{STEP1=wims(nonempty items \STEP1)}
111
\steps{\STEP1}
6132 bpr 112
 
13489 obado 113
\statement{
114
  <div class="question">
115
    <div class="instruction">\instruction</div>
116
    <table class="wimstable">
117
      <tr>
118
        <th></th>
119
        \for{k=1 to \attribut_cnt}{<th>\attribut[\k]</th>}
120
      </tr>
121
      \for{j=1 to \N}{
122
        <tr>
123
          <th>\data[\j;1]</th>
124
          \for{k=1 to \attribut_cnt}{
125
            <td>\embed{\STEP[\j;\k], \size[1] x \size[2]}</td>
126
          }
127
        </tr>
128
      }
129
    </table>
130
  </div>
3788 bpr 131
}
6132 bpr 132
 
3788 bpr 133
\answer{}{\Data[1]}{type=clickfill}
134
\answer{}{\Data[2]}{type=clickfill}
135
\answer{}{\Data[3]}{type=clickfill}
136
\answer{}{\Data[4]}{type=clickfill}
137
\answer{}{\Data[5]}{type=clickfill}
138
\answer{}{\Data[6]}{type=clickfill}
139
\answer{}{\Data[7]}{type=clickfill}
140
\answer{}{\Data[8]}{type=clickfill}
141
\answer{}{\Data[9]}{type=clickfill}
142
\answer{}{\Data[10]}{type=clickfill}
143
\answer{}{\Data[11]}{type=clickfill}
144
\answer{}{\Data[12]}{type=clickfill}
145
\answer{}{\Data[13]}{type=clickfill}
146
\answer{}{\Data[14]}{type=clickfill}
147
\answer{}{\Data[15]}{type=clickfill}
148
\answer{}{\Data[16]}{type=clickfill}
149
\answer{}{\Data[17]}{type=clickfill}
150
\answer{}{\Data[18]}{type=clickfill}
151
\answer{}{\Data[19]}{type=clickfill}
152
\answer{}{\Data[20]}{type=clickfill}
153
\answer{}{\Data[21]}{type=clickfill}
154
\answer{}{\Data[22]}{type=clickfill}
155
\answer{}{\Data[23]}{type=clickfill}
156
\answer{}{\Data[24]}{type=clickfill}
157
\answer{}{\Data[25]}{type=clickfill}
158
\answer{}{\Data[26]}{type=clickfill}
159
\answer{}{\Data[27]}{type=clickfill}
160
\answer{}{\Data[28]}{type=clickfill}
161
\answer{}{\Data[30]}{type=clickfill}
162
\answer{}{\Data[31]}{type=clickfill}
163
\answer{}{\Data[32]}{type=clickfill}
164
\answer{}{\Data[33]}{type=clickfill}
165
\answer{}{\Data[34]}{type=clickfill}
166
\answer{}{\Data[35]}{type=clickfill}
167
\answer{}{\Data[36]}{type=clickfill}
168
\answer{}{\Data[37]}{type=clickfill}
169
\answer{}{\Data[38]}{type=clickfill}
170
\answer{}{\Data[39]}{type=clickfill}
171
\answer{}{\Data[40]}{type=clickfill}
172