diff --git a/lib/WeBWorK/ContentGenerator/Hardcopy.pm b/lib/WeBWorK/ContentGenerator/Hardcopy.pm index 61f7d215e3..7f8513799c 100644 --- a/lib/WeBWorK/ContentGenerator/Hardcopy.pm +++ b/lib/WeBWorK/ContentGenerator/Hardcopy.pm @@ -407,7 +407,8 @@ sub display_form ($c) { my $the_set_id = $1; my $the_set_version = $2; $mergedSet = $db->getMergedSetVersion($user_id, $the_set_id, $the_set_version); - my $mergedProblem = $db->getMergedProblemVersion($user_id, $the_set_id, $the_set_version, 1); + my $mergedProblem = $db->getMergedProblemVersion($user_id, $the_set_id, $the_set_version, + ($db->listUserProblems($user_id, $the_set_id))[0]); # Get the parameters needed to determine if correct answers may be shown. my $maxAttempts = $mergedSet->attempts_per_version() || 0; diff --git a/lib/WeBWorK/ContentGenerator/LoginProctor.pm b/lib/WeBWorK/ContentGenerator/LoginProctor.pm index 3e305c8063..6efa84e745 100644 --- a/lib/WeBWorK/ContentGenerator/LoginProctor.pm +++ b/lib/WeBWorK/ContentGenerator/LoginProctor.pm @@ -71,7 +71,10 @@ async sub initialize ($c) { $db->getPermissionLevel($userID), $c->{effectiveUser}, $c->stash->{userSet}, - $db->getMergedProblemVersion($effectiveUserID, $c->stash->{setID}, $versionNum, 1) + $db->getMergedProblemVersion( + $effectiveUserID, $c->stash->{setID}, + $versionNum, ($db->listUserProblems($effectiveUserID, $c->stash->{setID}))[0] + ) )) { $c->stash->{userSet}->version_last_attempt_time(int($c->submitTime));