Subversion Repositories wimsdev

Rev

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