Forum archive 2000-2006

David Baur - Partial credit evaluators and the "correct answer" banner

by Arnold Pizer -
Number of replies: 0
 Partial credit evaluators and the "correct answer" banner topic started 6/28/2006; 5:46:13 PMlast post 6/29/2006; 12:29:28 PM
 David Baur - Partial credit evaluators and the "correct answer" banner  6/28/2006; 5:46:13 PM (reads: 309, responses: 4) Hi, I am currently working on writing an answer evaluator for webwork that grades Java code and returns a score with partial credit. Webwork accepts the score and records it just fine, but I am concerned about the green highlighted "The above answer is correct." banner. I would not want to encourage a student to move on from a problem on which they only earned 10%, however this green banner will consider a problem correct if there is any credit earned on it at all. In the hopes of finding a variable that could be passed somewhere that would allow me to customize the banner, I looked through lib/WeBWorK/ContentGenerator/Problem.pm and found the code that picks and generates the banner message. By my interpretation it looks like the only way for me to change the way that this works is to modify Problem.pm itself, and I'd rather leave it untouched. I just wanted to ask and make sure that there isn't a feature that I'm missing that would solve my problem. Thanks. -David PS I'm using ww2.0 if that makes a difference. <| Post or View Comments |>

 Michael Gage - Re: Partial credit evaluators and the  6/28/2006; 6:15:39 PM (reads: 361, responses: 0) Hi David, The relevant code is in attemptResults() in Problem.pm as I think you've found. It looks to me that if your grader or answer evaluator returns a value between 0 and 1 it will be multiplied by 100 and then reported as a certain percent correct, not completely correct. If you have been returning a score out of 100 try dividing by 100 and seeing how that works. If this doesn't address your problem I'll be glad to look at your answer evaluator and see if I can help. We can modify Problem.pm if absolutely necessary (the code probably needs an overhaul by now anyway) but I'd prefer not to rush into it. Sounds like you have an interesting project. I'm looking forward to hearing how it works out. Take care, Mike <| Post or View Comments |>

 Michael Gage - Re: Partial credit evaluators and the  6/28/2006; 8:33:15 PM (reads: 373, responses: 0) Here is a minimal answer evaluator which always gives a score of 10% -- no matter what answer is entered.  # Load whatever macros you need for the problemloadMacros("PG.pl", "PGbasicmacros.pl", "PGanswermacros.pl", );$showPartialCorrectAnswers = 1;TEXT(beginproblem());my$ans_eval = new AnswerEvaluator();$ans_eval->install_post_filter( sub {my$rh_ans = shift; $rh_ans->{correct_ans} = 'foo';$rh_ans->{score}=0.1; $rh_ans;} );BEGIN_TEXTEnter a value for $$pi$$\{ans_rule()\}END_TEXTANS($ans_eval);ENDDOCUMENT(); The response from WeBWorK is  ANSWERS ONLY CHECKED -- ANSWERS NOT RECORDEDEntered Answer Preview Correct Result90 foo 10% correctThe answer above is NOT completely correct. which seems to be pretty close to what you are looking for. Take care, Mike <| Post or View Comments |>

 Davide P. Cervone - Re: Partial credit evaluators and the "correct answer" banner  6/29/2006; 9:20:53 AM (reads: 359, responses: 0) I'm not sure the partial credit support was in WW2.0: it looks like it was added in v1.162 of Problem.pm (21 months ago), which I think was after the 2.0 release. It might have been in the 2.0-patches update, though. If you are really running WW2.0, you might need to do some updating of your WW installation before you will be able to use partial credit properly. In any case, the functionality you want is available in the current version of Problem.pm. Davide <| Post or View Comments |>

 David Baur - Re: Partial credit evaluators and the  6/29/2006; 12:29:28 PM (reads: 348, responses: 0) Thanks for the help. I'm using Problem.pm v1.156, so it looks like an upgrade should set things straight. -David <| Post or View Comments |>