From f0aca962a1c34a7efca64af211040ba5f55f170c Mon Sep 17 00:00:00 2001 From: Jaimos Skriletz Date: Thu, 12 Dec 2024 17:08:54 -0700 Subject: [PATCH] Don't delete proctor session when waiting for acting proctor confirmation. --- lib/WeBWorK/ContentGenerator/GatewayQuiz.pm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/WeBWorK/ContentGenerator/GatewayQuiz.pm b/lib/WeBWorK/ContentGenerator/GatewayQuiz.pm index 1171fe745d..9dfa6f5c65 100644 --- a/lib/WeBWorK/ContentGenerator/GatewayQuiz.pm +++ b/lib/WeBWorK/ContentGenerator/GatewayQuiz.pm @@ -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') @@ -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') {