Subversion Repositories wimsdev

Rev

Rev 5724 | Rev 6582 | 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
 
4416 bpr 6
A list of items with various properties is presented. 
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>
4416 bpr 14
This exercise can easily be modified if it is intended to be included in an OEF module and  you wish to 
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
42
:magpie,0,1,1,1
43
:cow,1,0,1,0
4425 bpr 44
\text{file=}
4049 bpr 45
Dans ce cas, les données suivantes ne seront pas prises en compte. 
46
Sinon, remplissez les données.
3788 bpr 47
 
48
:Liste des attributs
49
\text{attribut=poils,plumes,quatre membres,ailes}
50
:Données
51
une ligne par objets.
52
\text{data=pie,0,1,1,1
53
boeuf,1,0,1,0
54
chat,1,0,1,0
55
moustique,0,0,0,1}
56
:Textes pour la réponse
3791 bpr 57
mettre les textes correspondant aux nombres 0,1, ... dans les données des attributs
3788 bpr 58
\text{nonoui=--,X}
59
 
4416 bpr 60
:%%%%%%%%%%%%%% Nothing to modify before the statement%%%%%%%%%%%%%%%%
61
maximum 40 cases
3788 bpr 62
\integer{w=\size[1]+10}
63
 
64
\css{<style type="text/css">
65
   .question {background-color: #FFFFCC;margin: 2% 2%;padding: 1%;}
66
   table.tableau {border:solid 1px;
6132 bpr 67
    border-collapse:collapse;margin-left:auto;margin-right:auto;}
3788 bpr 68
    table.tableau td, th {text-align:center;border:solid 1px;width:55px;}
69
   ol li {list-style: upper-alpha; }
70
    table.tableau th { background-color:#CCCFFF;}
71
 </style>}
72
\if{\file notsametext}{
4416 bpr 73
  \text{file=randitem(\file)}
3788 bpr 74
  \text{attribut=wims(record 0 of \file)}
75
  \integer{datacnt=wims(recordcnt \file)}
76
  \integer{N=min(\N,\datacnt)}
77
  \text{choix=shuffle(\datacnt)}
78
  \text{choix=\choix[1..\N]}
79
  \text{data=}
80
  \for{s in \choix}{
81
    \text{data=\data
82
wims(record \s of \file)}
4416 bpr 83
  }
84
  \matrix{data=\data}
85
  \text{data=wims(replace internal ;; by ; in \data)}
86
}{
3788 bpr 87
  \text{objet_cnt=rows(\data)}
88
  \integer{N=min(\N,\objet_cnt)}
4416 bpr 89
  \text{bat=shuffle(\objet_cnt)}
90
  \text{bat=\bat[1..\N]}
91
  \matrix{data=\data}
92
  \matrix{data=\data[\bat;]}
3788 bpr 93
}
94
\integer{attribut_cnt=items(\attribut)}
95
\integer{ch_cnt=items(\nonoui)}
96
\text{Data=}
97
\text{STEP=}
98
\for{u=1 to \N}{
99
  \text{STEP=\STEP
100
   wims(makelist r x for x = (\u-1)*\attribut_cnt + 1  to  (\u)*\attribut_cnt)}
101
  \text{Data=wims(append item \data[\u;2..-1] to \Data)}
5147 bpr 102
  \text{Data=wims(replace internal \c by \nonoui[\c+1] in \Data)}
103
}
3788 bpr 104
\matrix{STEP=\STEP}
105
\text{STEP1=wims(replace internal ; by , in \STEP)}
106
\text{STEP1=wims(nonempty items \STEP1)}
107
\steps{\STEP1}
4416 bpr 108
\statement{<div class="question">\instruction
6132 bpr 109
 
5147 bpr 110
<table class="tableau"><tr><th></th>
3788 bpr 111
\for{k=1 to \attribut_cnt}{<th>\attribut[\k]</th>}
112
<tr>
113
\for{j=1 to \N}{ 
114
  <tr><th>\data[\j;1]</th>
115
   \for{k=1 to \attribut_cnt}{
116
     <td>\embed{\STEP[\j;\k], \size[1] x \size[2]}</td>
117
    }
118
  </tr>
119
}
120
</table>
6132 bpr 121
 
3788 bpr 122
</div>
123
}
124
\answer{}{\Data[1]}{type=clickfill}
125
\answer{}{\Data[2]}{type=clickfill}
126
\answer{}{\Data[3]}{type=clickfill}
127
\answer{}{\Data[4]}{type=clickfill}
128
\answer{}{\Data[5]}{type=clickfill}
129
\answer{}{\Data[6]}{type=clickfill}
130
\answer{}{\Data[7]}{type=clickfill}
131
\answer{}{\Data[8]}{type=clickfill}
132
\answer{}{\Data[9]}{type=clickfill}
133
\answer{}{\Data[10]}{type=clickfill}
134
\answer{}{\Data[11]}{type=clickfill}
135
\answer{}{\Data[12]}{type=clickfill}
136
\answer{}{\Data[13]}{type=clickfill}
137
\answer{}{\Data[14]}{type=clickfill}
138
\answer{}{\Data[15]}{type=clickfill}
139
\answer{}{\Data[16]}{type=clickfill}
140
\answer{}{\Data[17]}{type=clickfill}
141
\answer{}{\Data[18]}{type=clickfill}
142
\answer{}{\Data[19]}{type=clickfill}
143
\answer{}{\Data[20]}{type=clickfill}
144
\answer{}{\Data[21]}{type=clickfill}
145
\answer{}{\Data[22]}{type=clickfill}
146
\answer{}{\Data[23]}{type=clickfill}
147
\answer{}{\Data[24]}{type=clickfill}
148
\answer{}{\Data[25]}{type=clickfill}
149
\answer{}{\Data[26]}{type=clickfill}
150
\answer{}{\Data[27]}{type=clickfill}
151
\answer{}{\Data[28]}{type=clickfill}
152
\answer{}{\Data[30]}{type=clickfill}
153
\answer{}{\Data[31]}{type=clickfill}
154
\answer{}{\Data[32]}{type=clickfill}
155
\answer{}{\Data[33]}{type=clickfill}
156
\answer{}{\Data[34]}{type=clickfill}
157
\answer{}{\Data[35]}{type=clickfill}
158
\answer{}{\Data[36]}{type=clickfill}
159
\answer{}{\Data[37]}{type=clickfill}
160
\answer{}{\Data[38]}{type=clickfill}
161
\answer{}{\Data[39]}{type=clickfill}
162
\answer{}{\Data[40]}{type=clickfill}
163