WG: [LON-CAPA-users] Option Response hints

Susanne Bellmer lon-capa-users@mail.lon-capa.org
Tue, 18 Nov 2008 08:47:15 +0100


> Does anyone want to offer some advice on the optionhint tag?


In the code the type of optionresponse for concept groups is partially
used, but there are no concept groups used. This is caused by the
parameter concept="Foil2" and others like that.

To use optionhint for a simple optionresponse-problem the principle is
as follows:
If a hint should show up only when the answer for one special foil is
incorrect, the name of the foil and the incorrect answer has to be
written in the parameter answer (look example below).
If a hint should show up when a special combination of wrong answers is
given, both foils and their wrong answers have to be written in the
parameter answer (also look at example below).

I have taken your code and modified it a bit and I add the code to this
To explain the principle:
The hints Wrong1, Wrong2 and Wrong3 show up, when only the answer for
Foil1, Foil2 or Foil3 are wrong, respectively.
The hint Wrong23 shows up, when the answers for Foil2 a n d Foil3 are wrong.

I hope, this helps you.

Best regards,
Susanne Bellmer



<startouttext />Type Question Here.<endouttext />

<optionresponse max="10" randomize="yes" TeXlayout="horizontal">
    <foilgroup options="('True','False')">
<foil name="Foil1" value="True" location="random">
<startouttext />This is foil One. It is currently set to
"True."<endouttext />
<foil name="Foil2" value="False" location="random">
<startouttext />This is foil Two. It is currently set to
"False."<endouttext />
<foil name="Foil3" value="True" location="random">
<startouttext />This is foil Three. It is currently set to
"True."<endouttext />

    <hintgroup showoncorrect="no"><startouttext /><endouttext />

<optionhint name="Wrong1" answer="('Foil1'=>'False')" >
<optionhint name="Wrong2" answer="('Foil2'=>'True')">
<optionhint name="Wrong3" answer="('Foil3'=>'False')">
<optionhint name="Wrong23" answer="('Foil2'=>'True','Foil3'=>'False')">

<hintpart on="Wrong1">
    <startouttext />You got Foil1 wrong - it should be True.
<br/><endouttext />
<hintpart on="Wrong2">
    <startouttext />You got Foil2 wrong - it should be False.
<br/><endouttext />
<hintpart on="Wrong3">
    <startouttext />You got Foil3 wrong - it should be True.
<br/><endouttext />
<hintpart on="Wrong23">
    <startouttext />You got Foil2 and Foil3 wrong - they should be True
and False, respectively.
<br/><endouttext />
<hintpart on="default">
<startouttext/> Generic Hint<endouttext/>