Subversion Repositories wimsdev

Rev

Rev 13477 | 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=question
23 reyssat 2
textarea="datatrue datafalse explain"
3
 
6376 bpr 4
:Choose the true sentence from a list.
13704 obado 5
A number of sentences are picked from a list.
6
We must identify and note those that are true.
7
Good and bad sentences are selected randomly from respective lists.
8
The number of good sentences in each presentation is not necessarily fixed.
23 reyssat 9
<p>
13704 obado 10
The more data (sentences) are abundant,
11
 the more the exercise is random and repeatable.
12
But you can also do exercises with just the right phrases but no more.
13
It will be in this case a multiple choice with several good choices.
13477 obado 14
</p>
15
<p class="wims_credits">Author of the model: Gang Xiao <qualite@wimsedu.info></p>
23 reyssat 16
 
17
:%%%%%%%%%%%%%%%%%      ATTENTION      %%%%%%%%%%%%%%%%%%%%
18
 
19
Remove the above header if you destroy the model tags! (The lines starting
20
with a ':'.) Otherwise the exercise might not be taken back by Createxo.
21
 
22
:%%%%%%%% Example parameters to be redefined %%%%%%%%%%%%%%%%%
23
 
6376 bpr 24
:\title{Multiple true-false}
5608 bpr 25
:\author{XIAO, Gang}
8002 bpr 26
:\email{qualite@wimsedu.info}
5724 bpr 27
:\credits{}
23 reyssat 28
 
5608 bpr 29
:Number of sentences to present.
23 reyssat 30
\integer{tot=4}
31
 
13704 obado 32
:Minimum of true sentences in each exercise. At least 1.
23 reyssat 33
\integer{mintrue=1}
34
 
13704 obado 35
:Minimum of false sentences in each exercise. At least 1.
23 reyssat 36
\integer{minfalse=1}
37
 
13704 obado 38
:True sentences. One sentence per line, semi-colon not allowed.
13477 obado 39
Avoid long sentences!
23 reyssat 40
$embraced_randitem
41
\matrix{datatrue=
13704 obado 42
At equal voltage, the electric current passing through a resistor is inversely proportional to its resistance.
43
At equal current, the voltage on a resistor is proportional to its resistance.
44
The current flowing through a resistor is proportional to the applied voltage.
45
The power dissipated by a resistor is proportional to the square of the applied voltage.
46
The power dissipated by a resistor is proportional to the square of the current.
23 reyssat 47
}
48
 
13704 obado 49
:False sentences. One sentence per line, semi-colon not allowed.
13477 obado 50
Avoid long sentences!
23 reyssat 51
$embraced_randitem
52
\matrix{datafalse=
13704 obado 53
At equal voltage, the current flowing through a resistor is proportional to its resistance.
54
At equal voltage, the current flowing through a resistor is independent of its resistance.
55
The current passing through a diode is proportional to the applied voltage.
56
The power dissipated by a resistor is proportional to the applied voltage.
57
The power dissipated by a resistor is proportional to the current.
23 reyssat 58
}
59
 
13704 obado 60
:Option
61
Add the word <span class="tt wims_code_words">split</span> if you want to give a
62
partial score for partially correct answers.
23 reyssat 63
\text{option=split}
64
 
13704 obado 65
:Instructions
23 reyssat 66
$embraced_randitem
13704 obado 67
\text{explain=Which of the following statements are true? Check them.}
23 reyssat 68
 
11544 obado 69
:Embraced random items
8512 bpr 70
$embraced_randitem
11544 obado 71
\text{accolade=item(1,1 yes,
72
2 no)}
8512 bpr 73
 
23 reyssat 74
:%%%%%%%%%%%%%% Nothing to modify before the statement %%%%%%%%%%%%%%%%
75
 
8512 bpr 76
\text{accolade=wims(word 1 of \accolade)}
23 reyssat 77
\text{datatrue=wims(nonempty rows \datatrue)}
78
\text{datafalse=wims(nonempty rows \datafalse)}
79
\integer{truecnt=rows(\datatrue)}
80
\integer{falsecnt=rows(\datafalse)}
81
\integer{tot=\tot > min(\truecnt,\falsecnt)?min(\truecnt,\falsecnt)}
82
\integer{mintrue=\mintrue<1?1}
83
\integer{minfalse=\minfalse<1?1}
84
\integer{mintrue=\mintrue>\tot-1?\tot-1}
85
\integer{minfalse=\minfalse>\tot-1?\tot-1}
86
\integer{tot<\mintrue+\minfalse?\mintrue+\minfalse}
87
\text{tsh=shuffle(\truecnt)}
88
\text{fsh=shuffle(\falsecnt)}
89
\text{true=row(\tsh,\datatrue)}
90
\text{false=row(\fsh,\datafalse)}
91
\integer{truepick=randint(\mintrue..\tot-\minfalse)}
92
\text{pick=row(1..\truepick,\true);row(1..\tot-\truepick,\false)}
93
\text{ind=wims(makelist 1 for x=1 to \truepick),wims(makelist 0 for x=1 to \tot-\truepick)}
94
 
95
\text{sh=shuffle(\tot)}
96
\text{ind=item(\sh,\ind)}
97
\text{pick=row(\sh,\pick)}
8512 bpr 98
\text{pick=\accolade=1 ? wims(embraced randitem \pick)}
23 reyssat 99
\text{ans=positionof(1,\ind)}
100
\text{list=wims(values x for x=1 to \tot)}
8512 bpr 101
\text{explain=\accolade=1 ? wims(embraced randitem \explain)}
23 reyssat 102
 
103
:%%%%%%%%%%%%% Now the statement in html. %%%%%%%%%%%%%%%%%%%%
104
 
105
::You don't need to modify this in general.
106
 
8512 bpr 107
\statement{
108
<div class="instruction">
109
\explain
110
</div>
111
<ul style="list-style-type:none">
23 reyssat 112
\for{i=1 to \tot}{
8512 bpr 113
 <li>
114
  \embed{reply 1,\i}. &nbsp;\pick[\i;]
115
  </li>
23 reyssat 116
}
8512 bpr 117
</ul>
23 reyssat 118
}
119
 
8512 bpr 120
:%%%%%%%%%%%%% Nothing to modify after. %%%%%%%%%%%%%%%%%
23 reyssat 121
 
122
\answer{The reply}{\ans;\list}{type=checkbox}{option=\option}