From: John J. <jj...@as...> - 2005-12-31 16:23:57
|
Hi Gavin, Interval_cmp is now a front-end to the Parser for its answer checking. Some people (including me) are more comfortable with its semantics, so it will persist, but if you need to do something with extra complications, you should probably use the Parser directly. From the cvs updates, I can see that Davide has made some changes recently to make this work better using the Parser. Another way to go would be to think of other ways for students to input their answers here. It seems to me that the most natural interface to the student would be a column of entry text boxes, each with a drop-down list next to it (for picking from ?, max, min, neither), where the order is not important, and unused entries can be left blank. I sure the multipart checker could handle that. John P Gavin LaRose wrote: > Hi guys (esp. John), > > I have a question about the behavior of interval_cmp (from John's > extraAnswerEvaluators.pl macro file). I'm using it in a brutally > unintended way, which may explain why I am (or it is) confused. > > In a calculus problem, I want students to find critical points and > indicate if they correspond to maxima, minima, or neither. And I > don't want to give away in advance how many points there are. So I > was trying to coerce interval_cmp to do this for me by having it > evaluate a set of "intervals," viz., > interval_cmp( "(-2,min),(3,max)", 'unions'=>'no', > 'strings'=>['none','min','max','neither'] ); > > This works very well, until there is no maximum (or no minimum), in > which case > interval_cmp( "(-2,min)", 'unions'=>'no', > 'strings'=>['none','min','max','neither'] ); > has trouble: as student entering (-2,min) has her/his answer marked > wrong with the message "The parentheses for your list should be > removed." Removing the parentheses works if the interval_cmp call is > changed to > interval_cmp( "-2,min", 'unions'=>'no', > 'strings'=>['none','min','max','neither'] ); > > So I guess I have a couple of questions. Or three. > 1. Have I overlooked a better way of checking this type of problem? > 2. Is there some feature of interval_cmp that I can change to get a more > intuitive (at least from the perspective of a student) behavior? > and/or > 3. Is there an easy tweak to interval_cmp that will have the same > effect? > > Thanks, and Happy New Year, > Gavin > > p.s. I also have a problem where I want to check the answer > "(0,min),(a,max)", where a is a constant. My rather coarse solution > was to copy the interval_cmp evaluator into the problem, calling it > my_interval_cmp, and add the variable 'a' to the Parser Context. Is > there a better way of doing this? > |