Define "pi" as a variable in the expression, but evaluate it at only
one value, equal to the Perl variable "$pi".
Example:
<problem>
<startouttext />
<p>What is the area of a circle w.r.t. the radius, r.</p>
<endouttext />
<formularesponse samples="pi,r@$pi,.1:$pi,5.#1,10" answer="pi*r^2">
<responseparam name="tol" type="tolerance" default="0.01"
description="Numerical Tolerance" />
<textline readonly="no" size="25" />
<hintgroup showoncorrect="no">
<startouttext />You need to include π in your response.<br />
Try "pi".<endouttext />
</hintgroup>
</formularesponse>
</problem>
See the online contextual help for formularesponse in CSTR Edit mode
for the syntax of the argument 'samples'.batchelo@sfu.ca |