Subversion Repositories wimsdev

Rev

Rev 5912 | Rev 6250 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5912 Rev 6133
Line 40... Line 40...
40
 
40
 
41
 
41
 
42
!set namelist=Basic types, Specific or advanced types
42
!set namelist=Basic types, Specific or advanced types
43
!set symtextlist=text atext raw compose
43
!set symtextlist=text atext raw compose
44
 
44
 
45
<center><h3>User replies to an exercise</h3></center> <p>
45
<h3>User replies to an exercise</h3>
46
 
46
 
47
There are two basic ways in which an OEF exercise accepts user replies:
47
There are two basic ways in which an OEF exercise accepts user replies:
48
multiple choices and freestyle replies. User answers will be analyzed
48
multiple choices and freestyle replies. User answers will be analyzed
49
according to the nature of the types. It is also possible to show
49
according to the nature of the types. It is also possible to show
50
!href cmd=help&special_parm=feedback feedbacks
50
!href cmd=help&special_parm=feedback feedbacks
51
 to the user when the answer meeds a specified condition (usually to warn a
51
 to the user when the answer meeds a specified condition (usually to warn a
52
typical error).
52
typical error).
53
 
53
 
54
<p><h4>Multiple choices</h4> <p>
54
<h4>Multiple choices</h4>
55
A multiple choice is defined by giving a list of good choices (one or
55
A multiple choice is defined by giving a list of good choices (one or
56
several) and another list of bad choices. <p>
56
several) and another list of bad choices. <p>
57
Up to $choicelim simultaneous multiple choice questions can be asked for
57
Up to $choicelim simultaneous multiple choice questions can be asked for
58
one exercise, under the current implementation. The number of good and bad
58
one exercise, under the current implementation. The number of good and bad
59
choices within one multiple choice question is unlimited (except a limit on
59
choices within one multiple choice question is unlimited (except a limit on
Line 62... Line 62...
62
See
62
See
63
!href cmd=help&special_parm=oef help on OEF format
63
!href cmd=help&special_parm=oef help on OEF format
64
 for the syntax to define a multiple choice.
64
 for the syntax to define a multiple choice.
65
 
65
 
66
<a id="freestyle"></a>
66
<a id="freestyle"></a>
67
<p><h4>Freestyle answers</h4> <p>
67
<h4>Freestyle answers</h4>
68
A freestyle answer is one which is typed by the user.
68
A freestyle answer is one which is typed by the user.
69
Up to $answerlim simultaneous freestyle answers can be asked for one
69
Up to $answerlim simultaneous freestyle answers can be asked for one
70
exercise, under the current implementation. <p>
70
exercise, under the current implementation. <p>
71
The syntax is as follows:
71
The syntax is as follows:
72
<pre>
72
<pre>
73
\answer{Texte}{\reponse}{type=...}{option=...}{weight=...}
73
\answer{Texte}{\reponse}{type=...}{option=...}{weight=...}
74
</pre>
74
</pre>
75
(The last 3 fields are optional.)
75
(The last 3 fields are optional.)
-
 
76
 
-
 
77
<h3>The parameter <span class="tt wims_code_words">type</span></h3>
76
<p>
78
<p>
77
<h5>The parameter <span class="tt wims_code_words">type</span></h5>
-
 
78
Each freestyle answer can independently take one of the following types.
79
Each freestyle answer can independently take one of the following types.
79
 
80
</p>
80
!for i=1 to 2
81
!for i=1 to 2
81
 <p><b>$(namelist[$i])</b>
82
 <span class="bold">$(namelist[$i])</span>
82
 !set n=!linecnt $(typelist$i)
83
 !set n=!linecnt $(typelist$i)
83
 <ul>
84
 <ul>
84
 !for j=1 to $n
85
 !for j=1 to $n
85
  !set l=!line $j of $(typelist$i)
86
  !set l=!line $j of $(typelist$i)
86
  !distribute item $l into name,title
87
  !distribute item $l into name,title
Line 88... Line 89...
88
  !set name=!replace internal | by , in $name
89
  !set name=!replace internal | by , in $name
89
  !set name1=!item 2 to -1 of $name
90
  !set name1=!item 2 to -1 of $name
90
  !set name=!item 1 of $name
91
  !set name=!item 1 of $name
91
  !default name1=$name
92
  !default name1=$name
92
  !if $name isitemof $special_parm or all isitemof $special_parm
93
  !if $name isitemof $special_parm or all isitemof $special_parm
93
   <li><p><a id="_$name"></a>
94
   <li><a id="_$name"></a>
94
   !read help/anstype/$name.phtml
95
   !read help/anstype/$name.phtml
95
   !if $name iswordof $symtextlist
96
   !if $name iswordof $symtextlist
96
    <p>
97
    <p>
97
    <b>Remark</b>.
98
    <b>Remark</b>.
98
    This type of reply accepts the symtext option. If the word
99
    This type of reply accepts the symtext option. If the word
99
    <span class="tt wims_code_words">symtext</span> is declared in the option of the reply, the analysis of
100
    <span class="tt wims_code_words">symtext</span> is declared in the option of the reply, the analysis of
100
    the reply will be exactly as for
101
    the reply will be exactly as for
101
    !href cmd=help&special_parm=reply,symtext#_symtext symtext
102
    !href cmd=help&special_parm=reply,symtext#_symtext symtext
102
, in particular with no preliminary processing of the texts. And all the
103
, in particular with no preliminary processing of the texts. And all the
103
symtext options will be understood in this case.
104
symtext options will be understood in this case.
-
 
105
    </p>
104
   !endif
106
   !endif
105
   <p>
-
 
106
  !else
107
  !else
107
   <li>
108
   </li><li>
108
   !href cmd=help&special_parm=reply,$name#_$name $title
109
   !href cmd=help&special_parm=reply,$name#_$name $title
109
   (<span class="tt wims_code_words">$name1</span>) $desc.
110
   (<span class="tt wims_code_words">$name1</span>) $desc.
110
  !endif
111
  !endif
-
 
112
  </li>
111
 !next j
113
 !next j
112
 </ul>
114
 </ul>
113
!next i
115
!next i
114
 
116
 
115
!read help/$lang/embedans.phtml
117
!read help/$lang/embedans.phtml
116
 
118
 
117
<h4>The optional parameter <span class="tt wims_code_words">weight</span></h4>
119
<h3>The optional parameter <span class="tt wims_code_words">weight</span></h3>
118
<a id="weight"></a>
120
<a id="weight"></a>
119
It is possible to give a weight to answers.
121
It is possible to give a weight to answers.
120
<p>
122
<p>
121
Example :
123
Example :
-
 
124
</p>
122
<pre>\answer{}{1}{type=numeric}{weight=8}
125
<pre>\answer{}{1}{type=numeric}{weight=8}
123
\answer{}{1}{type=numeric}{weight=2}
126
\answer{}{1}{type=numeric}{weight=2}
124
</pre>
127
</pre>
125
 
128
<p>
126
Le niveau de sévérité  sera aussi pris en compte lors du
129
Le niveau de sévérité  sera aussi pris en compte lors du
127
calcul fait et le pourcentage sera pris sur un pourcentage fixé
130
calcul fait et le pourcentage sera pris sur un pourcentage fixé
128
par le niveau de sévérité.
131
par le niveau de sévérité.
129
 
132
</p><p>
130
One can put variables in <span class="tt wims_code_words">weight</span>
133
One can put variables in <span class="tt wims_code_words">weight</span>
131
if they are defined before <span class="tt wims_code_variable">\statement</span>.
134
if they are defined before <span class="tt wims_code_variable">\statement</span>.
-
 
135
 
132
<p>
136
<p>
133
Example :
137
Example :
-
 
138
</p>
134
<pre>
139
<pre>
135
\text{w = \t = 1 ? 1 : 2}
140
\text{w = \t = 1 ? 1 : 2}
136
\answer{}{1}{type=numeric}{weight=\w}
141
\answer{}{1}{type=numeric}{weight=\w}
137
\answer{}{1}{type=numeric}{weight=3}
142
\answer{}{1}{type=numeric}{weight=3}
138
</pre>
143
</pre>
139
 
144
 
140
<h4>Le paramètre optionnel <span class="tt wims_code_words">option</span></h4>
145
<h3>Le paramètre optionnel <span class="tt wims_code_words">option</span></h3>
141
 <a id="option"></a>
146
 <a id="option"></a>
142
 Dans le cas de plusieurs options, elles sont séparées par des espaces.
147
 Dans le cas de plusieurs options, elles sont séparées par des espaces.
143
 For example, <span class="tt wims_code_words">option=default noanalyzeprint</span>
148
 For example, <span class="tt wims_code_words">option=default noanalyzeprint</span>
144
 
149
 
145
Les options possibles à la suite d'une instruction <span class="tt wims_code_variable">answer</span>
150
Les options possibles à la suite d'une instruction <span class="tt wims_code_variable">answer</span>
Line 147... Line 152...
147
<ul>
152
<ul>
148
<li><span class="tt wims_code_words">option=default</span> : The option <span class="tt wims_code_words">default</span> is common for all free answers :
153
<li><span class="tt wims_code_words">option=default</span> : The option <span class="tt wims_code_words">default</span> is common for all free answers :
149
This option can take
154
This option can take
150
the form <span class="tt wims_code_words">default="default_value"</span>. If the
155
the form <span class="tt wims_code_words">default="default_value"</span>. If the
151
user gives an empty reply, it is the default_value that will take place.
156
user gives an empty reply, it is the default_value that will take place.
152
</li>
157
</li>
153
<li>
158
<li>
154
<span class="tt wims_code_words">option=split</span> : In case of type <span class="tt wims_code_words">correspond</span>, <span class="tt wims_code_words">checkbox</span> or <span class="tt wims_code_words">mark</span>,
159
<span class="tt wims_code_words">option=split</span> : In case of type <span class="tt wims_code_words">correspond</span>, <span class="tt wims_code_words">checkbox</span> or <span class="tt wims_code_words">mark</span>,
155
there will be partial score.
160
there will be partial score.
156
</li>
161
</li>
157
<li>
162
<li>
Line 167... Line 172...
167
<span class="tt wims_code_words">option=hide</span> :The condition is used to analyze the
172
<span class="tt wims_code_words">option=hide</span> :The condition is used to analyze the
168
answer but will not be printed.
173
answer but will not be printed.
169
</li>
174
</li>
170
</ul>
175
</ul>
171
D'autres options peuvent être utilisables dans des types particuliers de réponses.
176
D'autres options peuvent être utilisables dans des types particuliers de réponses.
172
<p>
-
 
173
 
177
 
174
<p><h4>Testing conditions</h4> <p>
178
<h3>Testing conditions</h3>
-
 
179
<p>
175
Under certain circumstances, it is desired that freestyle answers be tested
180
Under certain circumstances, it is desired that freestyle answers be tested
176
by special conditions (questions with multiple good answers, exercises
181
by special conditions (questions with multiple good answers, exercises
177
asking for examples, answers determined by inequalities, etc). This can be
182
asking for examples, answers determined by inequalities, etc). This can be
178
done in the following way. <p>
183
done in the following way. <p>
179
If the good answer to a freestyle question is an undefined variable, the
184
If the good answer to a freestyle question is an undefined variable, the
180
answer to this question will be fed into this variable. The latter can then
185
answer to this question will be fed into this variable. The latter can then
181
be used to implement testing conditions. The score given to the exercise is
186
be used to implement testing conditions. The score given to the exercise is
182
then determined by the number of testing conditions which are met, rather
187
then determined by the number of testing conditions which are met, rather
183
than the number of answers which meet the good answers.
188
than the number of answers which meet the good answers.
184
<p>
189
</p><p>
185
Up to $condlim simultaneous conditions can be defined for one
190
Up to $condlim simultaneous conditions can be defined for one
186
exercise, under the current implementation. The syntax is as follows.
191
exercise, under the current implementation. The syntax is as follows.
187
<pre>
192
</p><pre>
188
\condition{prompt text}{testing conditions}{weight=...}
193
\condition{prompt text}{testing conditions}{weight=...}
189
</pre>
194
</pre>
190
(The last field is optional.)
195
(The last field is optional.)
191
<p>
196
<p>
192
Here are some examples of testing conditions. (<span class="tt wims_code_variable">ans1</span> and
197
Here are some examples of testing conditions. (<span class="tt wims_code_variable">ans1</span> and
193
<span class="tt wims_code_variable">ans2</span> are undefined variables appearing in freestyle answers, as
198
<span class="tt wims_code_variable">ans2</span> are undefined variables appearing in freestyle answers, as
194
described above.)
199
described above.)
195
<small>
200
 
196
!href target=wims_mhelp cmd=help&special_parm=if Complete list of relations
201
!href target=wims_mhelp cmd=help&special_parm=if Complete list of relations
197
</small>
202
 
198
<p>
203
</p>
199
$table_header
204
$table_header
200
$table_hdtr<th>Condition</th><th>meaning</th></tr>
205
$table_hdtr<th>Condition</th><th>meaning</th></tr>
201
$table_tr<td><tt class="wims_code_variable">ans1>=0 and \ans1<=1</tt></td>
206
$table_tr<td><tt class="wims_code_variable">ans1>=0 and \ans1<=1</tt></td>
202
    <td>Good if <span class="tt wims_code_words">ans1</span> is within the interval [0,1].</td></tr>
207
    <td>Good if <span class="tt wims_code_words">ans1</span> is within the interval [0,1].</td></tr>
203
$table_tr<td><span class="tt wims_code_variable">ans1=1 or \ans1=3 or \ans1=5</span></td>
208
$table_tr<td class="tt wims_code_variable">ans1=1 or \ans1=3 or \ans1=5</td>
204
    <td>Good if <span class="tt wims_code_words">ans1</span> is 1, 3 or 5.</td></tr>
209
    <td>Good if <span class="tt wims_code_words">ans1</span> is 1, 3 or 5.</td></tr>
205
$table_tr<td><span class="tt wims_code_words">(\ans1)*(\ans2)=6 and (\ans1)+(\ans2)=5</span></td>
210
$table_tr<td class="tt wims_code_words">(\ans1)*(\ans2)=6 and (\ans1)+(\ans2)=5</td>
206
    <td>Good if <span class="tt wims_code_words">ans1</span> and <span class="tt wims_code_words">ans2</span> are the two
211
    <td>Good if <span class="tt wims_code_words">ans1</span> and <span class="tt wims_code_words">ans2</span> are the two
207
    roots of the polynomial x<sup>2</sup>-5x+6.</td></tr>
212
    roots of the polynomial x<sup>2</sup>-5x+6.</td></tr>
208
$table_tr<td><span class="tt wims_code_words">sin(\ans1)=0</span></td>
213
$table_tr<td class="tt wims_code_words">sin(\ans1)=0</td>
209
    <td>Good if <span class="tt wims_code_words">ans1</span> is a multiple of $m_pi.</td></tr>
214
    <td>Good if <span class="tt wims_code_words">ans1</span> is a multiple of $m_pi.</td></tr>
210
$table_end <p>
215
$table_end
211
See
216
See
212
!href cmd=help&special_parm=oef help on oef format
217
!href cmd=help&special_parm=oef help on oef format
213
 for the syntax for defining replies.
218
 for the syntax for defining replies.
214
 
219