[LON-CAPA-users] not printing choices in an option response

ciskep lon-capa-users@mail.lon-capa.org
Mon, 06 Feb 2006 13:42:11 -0500


I am working on a stoichiometry problem where the student will place units from
a dropdown menu into conversion factors.  (I have copied the code below.)  The
problem is that when I try to print it, the print out says something like
"choose from options ..." and lists the options.  My option response is built
into a table and this really messes up the format of the problem.  Is there a
way to stop this from happening?

I would like to tell the problem to not display the options when printed. 
Thanks for your help.

Paul Ciske

The problem code is:

<problem>

<script type="loncapa/perl">

$m=&random(12,50,.1);
$index=&random(1,4,1);
$start=&choose($index,"g HCl","mol HCl","g Ca(OH)2","mol Ca(OH)2","g CaCl2");
$first=&choose($index,"mol HCl","mol H2O","mol Ca(OH)2","mol H2O","mol CaCl2");
$second=&choose($index,"mol H2O","g H2O","mol H2O","g H2O","mol H2O");
$third=&choose($index,"g H2O","N/A","g H2O","N/A");
$fourth=$start;
$fifth=$first;
$sixth=&choose($index,"mol H2O","N/A","mol H2O","N/A");


</script><startouttext />

In the problem below, place the correct labels in the conversion factors needed
to solve the problem.  If a conversion factor is not used, select N/A from the
dropdown list.
<br />
In the reaction <chem>2HCl + Ca(OH)2 -> CaCl2 + 2H2O </chem> , if $m
<chem>$start</chem> is reacted, what mass of <chem>H2O</chem> is produced?
<br /><br /><endouttext />
<table border="0">
<tr><td></td><td></td>
<td>

<optionresponse max="10" randomize="yes" TeXlayout="horizontal">
    <foilgroup options="('g HCl','g Ca(OH)2','g CaCl2','g H2O','mol HCl','mol
Ca(OH)2','mol CaCl2','mol H2O','N/A')">
      <foil location="random" value="$first" name="first">
      </foil>
    </foilgroup>
</optionresponse></td>

<td></td>
<td>

<optionresponse max="10" randomize="yes" TeXlayout="horizontal">
    <foilgroup options="('g HCl','g Ca(OH)2','g CaCl2','g H2O','mol HCl','mol
Ca(OH)2','mol CaCl2','mol H2O','N/A')">
      <foil location="random" value="$second" name="second">
      </foil>
    </foilgroup>
</optionresponse></td>
<td></td>
<td>

<optionresponse max="10" randomize="yes" TeXlayout="horizontal">
    <foilgroup options="('g HCl','g Ca(OH)2','g CaCl2','g H2O','mol HCl','mol
Ca(OH)2','mol CaCl2','mol H2O','N/A')">
      <foil location="random" value="$third" name="third">
      </foil>
    </foilgroup>

</optionresponse>
</td>

<td></td>
<tr><td>$m <chem>$start</chem>
</td><td>X</td><td>------------------</td><td>X</td><td>------------------</td><td>X</td><td>------------------</td>
<td>

= g <chem>H2O</chem>

</td>
 </tr>
<tr>
<td></td>
<td></td>
    <td>

<optionresponse max="10" randomize="yes" TeXlayout="horizontal">
    <foilgroup options="('g HCl','g Ca(OH)2','g CaCl2','g H2O','mol HCl','mol
Ca(OH)2','mol CaCl2','mol H2O','N/A')">
      <foil location="random" value="$fourth" name="fourth">
      </foil>
    </foilgroup>

</optionresponse>
</td><td></td>
<td>

<optionresponse max="10" randomize="yes" TeXlayout="horizontal">
    <foilgroup options="('g HCl','g Ca(OH)2','g CaCl2','g H2O','mol HCl','mol
Ca(OH)2','mol CaCl2','mol H2O','N/A')">
      <foil location="random" value="$fifth" name="fifth">
      </foil>
    </foilgroup>

</optionresponse>
</td><td></td>
<td>


<optionresponse max="10" randomize="yes" TeXlayout="horizontal">
    <foilgroup options="('g HCl','g Ca(OH)2','g CaCl2','g H2O','mol HCl','mol
Ca(OH)2','mol CaCl2','mol H2O','N/A')">
      <foil location="random" value="$sixth" name="sixth">
      </foil>
    </foilgroup>

</optionresponse>
</td></tr></tr>
</table>

</problem>