[Lon-capa-users] numericalhint

Ray Batchelor lon-capa-users@mail.lon-capa.org
Sat, 9 Feb 2002 13:49:10 -0800


Hi all,
Can someone explain what I should do to make the following conditional 
hint work such that a response within $tolTKwrongans of $TKwrongans 
triggers the conditional hint?  Currently the conditional hint text 
only appears when the response it exactly $TKwongans to as many decimal 
places as the computer calculates.  (Apparently the responseparam does 
not work the way I assumed it would...?)

<numericalresponse answer="$ans" unit="J/g/K" format="1E">
<hintgroup>
<numericalhint answer="$TKwrongans" unit="J/g/K" format="1E" 
name="TKwrong">
    <responseparam name="tolTKwrong" type="tolerance" 
description="tolerance on answer to trigger numerical hint" 
default="$tolTKwrongans" />
</numericalhint>
<hintpart on="TKwrong">
    <startouttext />The conditional hint text would go here. 
<endouttext />
</hintpart>
</hintgroup>

	<responseparam name="tol" type="tolerance" description="Numerical 
Tolerance" default="$tolans" />
	<responseparam name="sig" type="int_range,0-16" default="0,15" 
description="Significant Figures" />
	<textline />
	<hintgroup>
		<startouttext />The general hint text goes here.
	<endouttext />
	</hintgroup>
</numericalresponse>

Thanks,
Ray

PS Yes, all variables were defined.