Skip to content

Commit

Permalink
Merge pull request openwebwork#1050 from drgrice1/fix-library-browser…
Browse files Browse the repository at this point in the history
…-with-prob-rand

Fix trying library problems when problem randomization is enabled.
  • Loading branch information
mgage authored Dec 31, 2019
2 parents 6b8137b + 6dd09d1 commit 083a6a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/WeBWorK/ContentGenerator/Problem.pm
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ sub pre_header_initialize {
$problem->{problem_seed} = ($problem->{problem_seed} + $problem->num_correct + $problem->num_incorrect) % 10000;
$problem->{prCount} = 0;
}
$db->putUserProblem($problem);
$db->putUserProblem($problem) if $problem->{prCount} > -1;
}

# final values for options
Expand Down
2 changes: 1 addition & 1 deletion lib/WeBWorK/Utils/Tasks.pm
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ sub fake_problem {
$problem->last_answer("");
$problem->num_correct(1000);
$problem->num_incorrect(1000);
$problem->prCount(0);
$problem->prCount(-10); # Negative to detect fake problems and disable problem randomization.

#for my $key (keys(%{$problem})){
# my $value = '####UNDEF###';
Expand Down

0 comments on commit 083a6a0

Please sign in to comment.