Forum archive 2000-2006

Andy Wildenberg - custom answer tutorial

Andy Wildenberg - custom answer tutorial

by Arnold Pizer -
Number of replies: 0
inactiveTopiccustom answer tutorial topic started 2/21/2001; 3:39:36 PM
last post 2/22/2001; 7:30:19 AM
userAndy Wildenberg - custom answer tutorial  blueArrow
2/21/2001; 3:39:36 PM (reads: 884, responses: 1)
Are their any pointers for writing new answer parsers? For example, I would like to ask students to show a repeating decimal is a rational number by providing the fraction. To do this, I was going to have 2 separate boxes, one for the numerator and one for the denominator, and then decide if they got the points based on evaluating both (checking both are integers and that their ratio is the original number). Also, I'd like to write a question that involves them factoring integers, and I would have to then write a parser to check they got all the correct factors and none that aren't correct.

<| Post or View Comments |>


userMichael Gage - Re: custom answer tutorial  blueArrow
2/22/2001; 7:30:19 AM (reads: 1077, responses: 0)
Hi,

Unfortunately the text at http://webhost.math.rochester.edu/webworkdocs/docs/pglanguage/answerevaluators is obsolete. and a replacement for it hasn't been written yet.

Your best bet is to look at the code in PGanswermacros.pl. The code in AnswerHash.pm is also relevant. I most recently rewrote the answer evaluators fun_cmp and FUNCTON_CMP so that they follow a "filter" model, that is, the student's answer comes in and then passes through a series of filters to perform the evaluation. The hope is that this will make it easier to reuse and recombine filters to form new answer evaluators. The num_cmp and str_cmp haven't been rewritten in this paradigm yet, and even the fun_cmp development is somewhat incomplete.

Sorry that I can't give you more concrete information right at the moment. Better documentation of the answer macros, particularly how to construct them, is badly needed at the moment.

Take care,

Mike

<| Post or View Comments |>