[LON-CAPA-users] Displaying answer in TeX for questions that use Maxima

Seema Ali sali at vsb.bc.ca
Sun May 20 19:54:36 EDT 2012

The questions that I created that use Maxima to check if the answer is correct, I can't seem to get the answer to show up in the answer key of the TeX version.  I placed the solution in the answer display part of the problem and it still isn't showing up.

Print Options that I used:
Print Answer: With Answers
Problem Type: Exam Problem

Any ideas how to do that?  Below is an example of a problem.  Thanks.

>From Seema.

<script type="loncapa/perl">$index = &random(1,4,1);

$original = &choose($index,'upsideDownHat.png',          'upsideDownHat.png',       'upsideDownHat.png',          'upsideDownHat.png');
$original = '/res/sfu/sd39author/images/'.$original;

$filename = &choose($index,'upsideDownHat--2x.png', 'upsideDownHat--2xPLUS1.png', 'upsideDownHat--HALFx-1.png', 'upsideDownHat--HALFx.png');
$filename = '/res/sfu/sd39author/images/'.$filename;
$function = &choose($index,"f(2*x)", "f(2*x+1)", "f(0.5*x-1)", "f(0.5*x)");</script><startouttext /><instructions></instructions><endouttext /><startouttext />Given the graph of the function <m>$y = f(x)$</m>, determine the equation of the function <m>$y = g(x)$</m> in terms of <m>$f(x)$</m>.
<br /><endouttext />
    <img src="$original" alt="y = f(x)" TeXwrap="none" encrypturl="yes" width="796" height="295" />
    <img src="$filename" alt="y = g(x)" TeXwrap="none" encrypturl="yes" width="796" height="295" /><startouttext /><br />
Place your answer in terms of <m>$f(x)$</m>. <br />
<m>$g(x) = $</m><endouttext />
<mathresponse cas="maxima" args="$function" answerdisplay="$function">
    <answer>topreventflukeskweieksewiwaa(x) := LONCAPALIST[1];
yesiamparanoidlkwelwiweajxww(x) := RESPONSE[1];

    <textline readonly="no" />


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.lon-capa.org/pipermail/lon-capa-users/attachments/20120520/0a6100b9/attachment-0001.html>

More information about the LON-CAPA-users mailing list