[LON-CAPA-users] mulitple correct answers in a numerical

Guy Albertelli II lon-capa-users@mail.lon-capa.org
Mon, 14 Nov 2005 16:16:38 -0500 (EST)


Hi Donnell,

> I asked a week ago and haven't received a response yet
> 
> Sorry to ask again, but this has come up in our authoring questions

Well the answer is for 2.0, not really (there is an incredibly ugly
way with <stringresponse> with type Re and eval style regexp, but It'd
be really fragile and hard to write, debug or understand.)

It is an outstanding bug:
http://bugs.loncapa.org/show_bug.cgi?id=33

And the design of what it'll look like is done, it just hasn't gotten
implemented yet though.

(For 2.1 we will have a <customresponse> that will allow instructors
to write scripts to parse and grade a users response.

A (simple a not very good) Example:

<problem>
  <customresponse answerdisplay="something near 90 or -90">
    <answer type="loncapa/perl">

if (abs(90 - abs($submission)) < 0.001) {
  return 'EXACT_ANS';
}
return 'INCORRECT';

    </answer>
    <textline readonly="yes"></textline>
  </customresponse>
</problem>

> 
> Let's say in a numerical response I would like to accept both answers of
> -90 and 90 degrees.
> 
> How do I do this?
> 
> I looked in the FAQ and they have how to accept this type of answer in a
> string response type question, but I tried something similar for
> numerical response and it does not work.
> 
> Thanks
> 
> Donnell
> 
> 
> _______________________________________________
> LON-CAPA-users mailing list
> LON-CAPA-users@mail.lon-capa.org
> http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
> 
> 
> 
> _______________________________________________
> 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-2-0-27,137