[LON-CAPA-users] formula response with more complex variable labels
Jay Sullivan
lon-capa-users@mail.lon-capa.org
Fri, 22 Jun 2007 16:55:24 -0400
------=_Part_15902_26165747.1182545724226
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Hi Guy,
No, the first example does _not_ work (nor does the 2nd one obviously). I
get the tell-tell "Computer's answer is incorrect ("T1-T2")"
Also, entering T1 - T2 in the submission box returns a "Unable to understand
formula"
VCU is running 2.3.0
Both versions work as expected on the educog server.
Best,
Jay
On 6/22/07, Guy Albertelli II <guy@albertelli.com> wrote:
>
> Hi Jay,
>
> > Ok, then this should work for us when the VCU server gets updated.
>
> The first example below should work on any lon-capa server, does it
> not on yours?
>
>
> >
> > 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="loncapa/perl">
> > > $k=&random(3,6,1);
> > > $formula="a*x^$k";
> > > $m=$k-1;
> > > $derivative="T1-T2";
> > > </script>
> > >
> > > <startouttext />
> > > What is the derivative of <tt>$formula</tt> with respect to x?
> > > <endouttext />
> > >
> > > <formularesponse samples="T1,T2@-3,-3:3,3#4"
> answer="$derivative">
> > > <responseparam description="Numerical Tolerance"
> > > type="tolerance" default="0.00001" name="tol" />
> > > <textline size="25" />
> > > </formularesponse>
> > >
> > > </problem>
> > >
> > > <problem>
> > > <script type="loncapa/perl">
> > > $k=&random(3,6,1);
> > > $formula="a*x^$k";
> > > $m=$k-1;
> > > $derivative="T1-T2";
> > > </script>
> > >
> > > <startouttext />
> > > What is the derivative of <tt>$formula</tt> with respect to x?
> > > <endouttext />
> > >
> > > <formularesponse answer="$derivative">
> > > <textline size="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
> their
> > > > answer.
> > > > It seems for now that formula response can't handle variable names
> that
> > > > contain numbers.
> > > >
> > > > Jay
> > > >
> > > >
> > >
> > > --
> > > Peter Riegler
> > > Fachhochschule Braunschweig/Wolfenb?ttel
> > > Salzdahlumer Str. 46/48, 38302 Wolfenb?ttel
> > > 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
> > >
>
> --
> guy@albertelli.com 0-7-0-9-27,137
> _______________________________________________
> LON-CAPA-users mailing list
> LON-CAPA-users@mail.lon-capa.org
> http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
>
------=_Part_15902_26165747.1182545724226
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Hi Guy,<br><br>No, the first example does _not_ work (nor does the 2nd one obviously). I get the tell-tell "Computer's answer is incorrect ("T1-T2")"<br>Also, entering T1 - T2 in the submission box returns a "Unable to understand formula"
<br><br>VCU is running 2.3.0<br><br><br><br>Both versions work as expected on the educog server.<br><br>Best,<br>Jay<br><br><br><div><span class="gmail_quote">On 6/22/07, <b class="gmail_sendername">Guy Albertelli II</b> <
<a href="mailto:guy@albertelli.com">guy@albertelli.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Jay,<br><br>> Ok, then this should work for us when the VCU server gets updated.
<br><br>The first example below should work on any lon-capa server, does it<br>not on yours?<br><br><br>><br>> Thanks<br>> Jay<br>><br>> On 6/21/07, Peter Riegler <<a href="mailto:p.riegler@fh-wolfenbuettel.de">
p.riegler@fh-wolfenbuettel.de</a>> wrote:<br>> ><br>> > Hi Jay,<br>> ><br>> > both flavors of formula response seem to work on my machine (running<br>> > 2.4.1), see below. The problems by themselves are meaningless. I have
<br>> > used the templates and made T1-T2 the correct answer.<br>> ><br>> > Hope that helps<br>> ><br>> > Peter<br>> ><br>> > <problem><br>> > <script type="loncapa/perl">
<br>> > $k=&random(3,6,1);<br>> > $formula="a*x^$k";<br>> > $m=$k-1;<br>> > $derivative="T1-T2";<br>> > </script><br>> ><br>> > <startouttext />
<br>> > What is the derivative of <tt>$formula</tt> with respect to x?<br>> > <endouttext /><br>> ><br>> > <formularesponse samples="T1,T2@-3,-3:3,3#4" answer="$derivative">
<br>> > <responseparam description="Numerical Tolerance"<br>> > type="tolerance" default="0.00001" name="tol" /><br>> > <textline size="25" />
<br>> > </formularesponse><br>> ><br>> > </problem><br>> ><br>> > <problem><br>> > <script type="loncapa/perl"><br>> > $k=&random(3,6,1);
<br>> > $formula="a*x^$k";<br>> > $m=$k-1;<br>> > $derivative="T1-T2";<br>> > </script><br>> ><br>> > <startouttext /><br>> > What is the derivative of <tt>$formula</tt> with respect to x?
<br>> > <endouttext /><br>> ><br>> > <formularesponse answer="$derivative"><br>> > <textline size="25" /><br>> > </formularesponse>
<br>> ><br>> > </problem><br>> ><br>> ><br>> > Jay Sullivan wrote:<br>> ><br>> > > Is is possible to do formula response with more complicated variables?<br>> > >
<br>> > > For example, let's suppose the students should enter "T1 - T2" for their<br>> > > answer.<br>> > > It seems for now 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?ttel
<br>> > Salzdahlumer Str. 46/48, 38302 Wolfenb?ttel<br>> > Tel. +49 5331 939 6314, Fax. +49 5331 939 6002<br>> > email: <a href="mailto:p.riegler@fh-wolfenbuettel.de">p.riegler@fh-wolfenbuettel.de</a><br>
> > <a href="http://public.rz.fh-wolfenbuettel.de/~riegler">http://public.rz.fh-wolfenbuettel.de/~riegler</a><br>> > _______________________________________________<br>> > LON-CAPA-users mailing list<br>
> > <a href="mailto:LON-CAPA-users@mail.lon-capa.org">LON-CAPA-users@mail.lon-capa.org</a><br>> > <a href="http://mail.lon-capa.org/mailman/listinfo/lon-capa-users">http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
</a><br>> ><br><br>--<br><a href="mailto:guy@albertelli.com">guy@albertelli.com</a> 0-7-0-9-27,137<br>_______________________________________________<br>LON-CAPA-users mailing list<br><a href="mailto:LON-CAPA-users@mail.lon-capa.org">
LON-CAPA-users@mail.lon-capa.org</a><br><a href="http://mail.lon-capa.org/mailman/listinfo/lon-capa-users">http://mail.lon-capa.org/mailman/listinfo/lon-capa-users</a><br></blockquote></div><br>
------=_Part_15902_26165747.1182545724226--