Skip to content

Commit

Permalink
Don't delete proctor session when waiting for acting proctor confirma…
Browse files Browse the repository at this point in the history
…tion.
  • Loading branch information
somiaj committed Dec 13, 2024
1 parent 129631e commit f0aca96
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/WeBWorK/ContentGenerator/GatewayQuiz.pm
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,13 @@ async sub pre_header_initialize ($c) {
$c->{invalidSet} = $c->maketext('This test is closed. No new test versions may be taken.');
}

if ($c->stash->{actingConfirmation}) {
# Store session while waiting for confirmation for proctored tests.
$c->authen->session(acting_proctor => 1) if $c->{assignment_type} eq 'proctored_gateway';
return;
}
delete $c->authen->session->{acting_proctor};

# If the proctor session key does not have a set version id, then add it. This occurs when a student
# initially enters a proctored test, since the version id is not determined until just above.
if ($c->authen->session('proctor_authorization_granted')
Expand All @@ -687,13 +694,6 @@ async sub pre_header_initialize ($c) {
else { delete $c->authen->session->{proctor_authorization_granted}; }
}

if ($c->stash->{actingConfirmation}) {
# Store session while waiting for confirmation for proctored tests.
$c->authen->session(acting_proctor => 1) if $c->{assignment_type} eq 'proctored_gateway';
return;
}
delete $c->authen->session->{acting_proctor};

# If the set is invalid, then delete any proctor session keys and return.
if ($c->{invalidSet} || $c->{actingCreationError}) {
if (defined $c->{assignment_type} && $c->{assignment_type} eq 'proctored_gateway') {
Expand Down

0 comments on commit f0aca96

Please sign in to comment.