Skip to content

Commit f0aca96

Browse files
committed
Don't delete proctor session when waiting for acting proctor confirmation.
1 parent 129631e commit f0aca96

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/WeBWorK/ContentGenerator/GatewayQuiz.pm

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,13 @@ async sub pre_header_initialize ($c) {
678678
$c->{invalidSet} = $c->maketext('This test is closed. No new test versions may be taken.');
679679
}
680680

681+
if ($c->stash->{actingConfirmation}) {
682+
# Store session while waiting for confirmation for proctored tests.
683+
$c->authen->session(acting_proctor => 1) if $c->{assignment_type} eq 'proctored_gateway';
684+
return;
685+
}
686+
delete $c->authen->session->{acting_proctor};
687+
681688
# If the proctor session key does not have a set version id, then add it. This occurs when a student
682689
# initially enters a proctored test, since the version id is not determined until just above.
683690
if ($c->authen->session('proctor_authorization_granted')
@@ -687,13 +694,6 @@ async sub pre_header_initialize ($c) {
687694
else { delete $c->authen->session->{proctor_authorization_granted}; }
688695
}
689696

690-
if ($c->stash->{actingConfirmation}) {
691-
# Store session while waiting for confirmation for proctored tests.
692-
$c->authen->session(acting_proctor => 1) if $c->{assignment_type} eq 'proctored_gateway';
693-
return;
694-
}
695-
delete $c->authen->session->{acting_proctor};
696-
697697
# If the set is invalid, then delete any proctor session keys and return.
698698
if ($c->{invalidSet} || $c->{actingCreationError}) {
699699
if (defined $c->{assignment_type} && $c->{assignment_type} eq 'proctored_gateway') {

0 commit comments

Comments
 (0)