WeBWorK Problems

Scoring based only on problemPanic.pl hints

Re: Scoring based only on problemPanic.pl hints

by Davide Cervone -
Number of replies: 0
Try adding
install_problem_grader(sub {
  return ({score=> 1, recorded_score => 0, type=>'always_right'},
          {num_of_correct_ans => 0, num_of_incorrect_ans => 0});
});
just after the
TEXT(beginproblem());
and see if that doesn't do it. This should provide a normal score of 1, (without the penalty) and .25 if the panic button was pressed.

If you want 0 unless the panic button was pressed, then use

install_problem_grader(sub {
  return ({score=> ($main::panicked ? .25 : 0), recorded_score => 0, type=>'always_right'},
          {num_of_correct_ans => 0, num_of_incorrect_ans => 0});
});
Again, the panicked score is .25, but you can change that to 1 if you prefer:
install_problem_grader(sub {
  return ({score=> ($main::panicked ? 1 : 0), recorded_score => 0, type=>'always_right'},
          {num_of_correct_ans => 0, num_of_incorrect_ans => 0});
});
Hope that works for you.

Davide