[LON-CAPA-users] formula response with more complex variable labels
Jay Sullivan
lon-capa-users@mail.lon-capa.org
Thu, 21 Jun 2007 12:54:23 -0400
------=_Part_14194_31714423.1182444863967
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Ok, then this should work for us when the VCU server gets updated.
Thanks
Jay
On 6/21/07, Peter Riegler <p.riegler@fh-wolfenbuettel.de> wrote:
>
> Hi Jay,
>
> both flavors of formula response seem to work on my machine (running
> 2.4.1), see below. The problems by themselves are meaningless. I have
> used the templates and made T1-T2 the correct answer.
>
> Hope that helps
>
> Peter
>
> <problem>
> <script type=3D"loncapa/perl">
> $k=3D&random(3,6,1);
> $formula=3D"a*x^$k";
> $m=3D$k-1;
> $derivative=3D"T1-T2";
> </script>
>
> <startouttext />
> What is the derivative of <tt>$formula</tt> with respect to x?
> <endouttext />
>
> <formularesponse samples=3D"T1,T2@-3,-3:3,3#4" answer=3D"$derivative=
">
> <responseparam description=3D"Numerical Tolerance"
> type=3D"tolerance" default=3D"0.00001" name=3D"tol" />
> <textline size=3D"25" />
> </formularesponse>
>
> </problem>
>
> <problem>
> <script type=3D"loncapa/perl">
> $k=3D&random(3,6,1);
> $formula=3D"a*x^$k";
> $m=3D$k-1;
> $derivative=3D"T1-T2";
> </script>
>
> <startouttext />
> What is the derivative of <tt>$formula</tt> with respect to x?
> <endouttext />
>
> <formularesponse answer=3D"$derivative">
> <textline size=3D"25" />
> </formularesponse>
>
> </problem>
>
>
> Jay Sullivan wrote:
>
> > Is is possible to do formula response with more complicated variables?
> >
> > For example, let's suppose the students should enter "T1 - T2" for thei=
r
> > answer.
> > It seems for now that formula response can't handle variable names that
> > contain numbers.
> >
> > Jay
> >
> >
>
> --
> Peter Riegler
> Fachhochschule Braunschweig/Wolfenb=FCttel
> Salzdahlumer Str. 46/48, 38302 Wolfenb=FCttel
> Tel. +49 5331 939 6314, Fax. +49 5331 939 6002
> email: p.riegler@fh-wolfenbuettel.de
> http://public.rz.fh-wolfenbuettel.de/~riegler
> _______________________________________________
> LON-CAPA-users mailing list
> LON-CAPA-users@mail.lon-capa.org
> http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
>
------=_Part_14194_31714423.1182444863967
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Ok, then this should work for us when the VCU server gets updated.<br><br>T=
hanks<br>Jay<br><br><div><span class=3D"gmail_quote">On 6/21/07, <b class=
=3D"gmail_sendername">Peter Riegler</b> <<a href=3D"mailto:p.riegler@fh-=
wolfenbuettel.de">
p.riegler@fh-wolfenbuettel.de</a>> wrote:</span><blockquote class=3D"gma=
il_quote" style=3D"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0=
pt 0pt 0.8ex; padding-left: 1ex;">Hi Jay,<br><br>both flavors of formula re=
sponse seem to work on my machine (running
<br>2.4.1), see below. The problems by themselves are meaningless. I have<b=
r>used the templates and made T1-T2 the correct answer.<br><br>Hope that he=
lps<br><br>Peter<br><br><problem><br> <scr=
ipt type=3D"loncapa/perl">
<br>$k=3D&random(3,6,1);<br>$formula=3D"a*x^$k";<br>$m=3D$k-1=
;<br>$derivative=3D"T1-T2";<br> </scri=
pt><br><br> <startouttext /><br>What is th=
e derivative of <tt>$formula</tt> with respect to x?
<br> <endouttext /><br><br> =
<formularesponse samples=3D"T1,T2@-3,-3:3,3#4" answer=
=3D"$derivative"><br>  =
; <responseparam description=3D"Numerical Tolerance"<br>=
type=3D"tolerance" default=3D"
0.00001" name=3D"tol" /><br>  =
; <textline size=3D"25" /><br>  =
; </formularesponse><br><br></problem><br><br><p=
roblem><br> <script type=3D"loncapa/perl=
">
<br>$k=3D&random(3,6,1);<br>$formula=3D"a*x^$k";<br>$m=3D$k-1=
;<br>$derivative=3D"T1-T2";<br> </scri=
pt><br><br> <startouttext /><br>What is th=
e derivative of <tt>$formula</tt> with respect to x?
<br> <endouttext /><br><br> =
<formularesponse answer=3D"$derivative"><br> &n=
bsp; <textline size=3D"25"=
/><br> </formularesponse><br><br></pro=
blem><br><br><br>Jay Sullivan wrote:
<br><br>> Is is possible to do formula response with more complicated va=
riables?<br>><br>> For example, let's suppose the students should=
enter "T1 - T2" for their<br>> answer.<br>> It seems for n=
ow that formula response can't handle variable names that
<br>> contain numbers.<br>><br>> Jay<br>><br>><br><br>--<br>=
Peter Riegler<br>Fachhochschule Braunschweig/Wolfenb=FCttel<br>Salzdahlumer=
Str. 46/48, 38302 Wolfenb=FCttel<br>Tel. +49 5331 939 6314, Fax. +49 5331 =
939 6002
<br>email: <a href=3D"mailto:p.riegler@fh-wolfenbuettel.de">p.riegler@fh-wo=
lfenbuettel.de</a><br><a href=3D"http://public.rz.fh-wolfenbuettel.de/~rieg=
ler">http://public.rz.fh-wolfenbuettel.de/~riegler</a><br>_________________=
______________________________
<br>LON-CAPA-users mailing list<br><a href=3D"mailto:LON-CAPA-users@mail.lo=
n-capa.org">LON-CAPA-users@mail.lon-capa.org</a><br><a href=3D"http://mail.=
lon-capa.org/mailman/listinfo/lon-capa-users">http://mail.lon-capa.org/mail=
man/listinfo/lon-capa-users
</a><br></blockquote></div><br>
------=_Part_14194_31714423.1182444863967--