<center><h3>Feedback according to answers</h3></center> <p>
You may
define conditions
(on the values of user answers
) under which a
message will be printed on the page of results. A common use of this feature
will be to give warnings when a typical error to the exercise is detected.
<p>
An arbitrary number of feedbacks can be added, on any kind of replies
(freestyle or multiple choice). The syntax is as follows.
<p><tt>
\feedback{CONDITION}{MESSAGE}
</tt> <p>
The line can be put into the field of parameters (under guided mode) or
anywhere in the source (under raw mode).
<p>
When <tt>CONDITION</tt> is met,
<tt>MESSAGE</tt> will be shown to the user in the result page. Values of
user replies can be put into both via the variables <tt>\reply1</tt>,
<tt>\reply2</tt>,... (for freestyle replies), <tt>\choice1</tt>,
<tt>\choice2</tt>,... (for multiple choices). The order in the variables
is the order of their appearance in the source (or in the form under the
guided mode).
<p>
<tt>MESSAGE</tt> is a free text, accepting embedded html tags and
mathematical symbols.
<p>$table_header
<caption>Examples of conditions
<small>
!href target
=wims_mhelp cmd
=help
&special_parm
=if complete
list
</small>
</caption>
$table_hdtr<th>condition<th>when it is met
$table_tr<td><tt>\reply1=5<td>first freestyle reply is exactly equal to 5
$table_tr<td><tt>\reply1>\reply2+2<td>first freestyle reply is > second one plus 2
$table_tr<td><tt>\choice1=Yes and \choice2=No
<td>first multiple choice is Yes and second is No (<b>attention</b> the
comparison in multiple choices is case-sensitive!)
$table_tr<td><tt>\reply1<5 or \reply1>8
<td
>first reply is outside the
range from
5 to
8.
$table_tr<td><tt>3 isitemof \reply1
<td>the first reply, of type "set" or "vector", contains a component "3".
$table_end
<p>
<b>Known-bug</b>. You should avoid mixing <tt>\reply</tt> and
<tt>\choice</tt> within one same condition. Otherwise the result will be
unpredictable.