[LON-CAPA-users] Preprocessor vs. Custom Response
bond13 at purdue.edu
Fri Dec 4 13:16:49 EST 2015
>If this is really a static answer format, then it should indeed be a stringresponse. Note that stringresponses also take >regular expressions, so you can do
>to do “or” - you don’t need a preprocessor. LON-CAPA also has an explicit “or”, I think there’s a template for it. It >may be “or” for numerical, but you can replace numerical by string.
>In general, for things that are numerical (and not “static” like the above), the main decision criterion for >preprocessor versus customresponse is whether you need the luxuries of numericalresponse:
>* significant digits
>* automated bubblesheet production
>* easy printout of correct solution after answer date
>If you can benefit from those luxuries, use numericalresponse and preprocessor. If not, or if those things are in the >way, use customresponse.
>Sorry, I need to run for a meeting. Hope this helps,
It is not a static answer. I was not aware of the regular expression option, this is promising and I think I could do either substitution ($frac =~ s/\//\\\//;) or split (@fracarray = split('/', $frac);) and concatenate strings into the desired regular expression.
Also, I have attempted using an <answergroup> under a <stringresponse> and it just doesn't recognize it.
More information about the LON-CAPA-users