WeBWorK Main Forum

Overall score discrepancies across WeBWorK instances

Overall score discrepancies across WeBWorK instances

by Bob Carmichael -
Number of replies: 2
We are in the process of bringing up a new WW instance and are seeing a slight difference in an API result that it returns. We are using RenderProblem per below:

my $pg = WebworkWebservice::RenderProblem->new(
$ce,
$effectiveUser,
$key,
$setRecord,
$problemRecord,
$setRecord->psvn,
$formFields,
$translationOptions,
);

From our original server, when the student gets the problem correct or partially correct, we see $pg->{results} showing the right overall score. Something like this:

{"score"=>0.5, "msg"=>"You can earn partial credit on this problem.", "errors"=>"", "type"=>nil}

From our new server with the same problem (well, for any problem), we always get 0 for the score. The individual answer scores for each answer_name do show the right scores though.

{"errors"=>"", "msg"=>"You can earn partial credit on this problem.", "type"=>nil, "score"=>0}

We've verified we believe that our Webwork version (2.13), PG (2.14), and configuration files are identical on both servers, but clearly we are missing something.

Does this ring any obvious bells? Any suggestions would be most appreciated.
In reply to Bob Carmichael

Re: Overall score discrepancies across WeBWorK instances

by Alex Jordan -
Hi Bob,

I'm not sure I can directly help explain what you are seeing. It does raise a flag that your WW version and PG version are different. Ideally, that would be OK. But the two things are still interconnected in certain ways, and it's common for a feature or edit to bring in contemporaneous commits into the two repos. At some point it would be great to have the repos be cleanly separated, but until then we always advise that you have matching versions.

Sorry my reply is so late. This post and a few other recent WW forum posts ended up in my spam filter. Has the situation resolved itself?

Alex
In reply to Alex Jordan

Re: Overall score discrepancies across WeBWorK instances

by Bob Carmichael -
Thank you, not yet. I've since tested this using 2.14 for both with no luck. Clearly, something is different in our environment (as part of our integration), but I've yet to track it down.

I discovered that if I modified the PG code to take the (default) grader out of the safe compartment (as seen in original form below), it actually returns the correct values. Do you know how I can get error/log messages to bubble up out of the safe compartment?

($self->{rh_problem_result},$self->{rh_problem_state}) =
$self->{safe}->reval('&{$rf_grader}($rh_answers,$rh_state,%rf_options)');

I haven't dug any further yet.