Skip to content

Determine when a proctored test version is complete instead of changing its type. - #3240

Open
drgrice1 wants to merge 1 commit into
openwebwork:developfrom
drgrice1:test-proctor-no-type-change
Open

drgrice1 wants to merge 1 commit into
openwebwork:developfrom
drgrice1:test-proctor-no-type-change

Conversation

@drgrice1

Copy link
Copy Markdown
Member

Previously a proctored test version was converted to an unproctored test when the last allowed submission was made so that it could be reviewed without proctor authorization. If time expired before all submissions were used, the version remained proctored and could not be reviewed without proctor authorization (issue #3239). Furthermore, once converted, a version whose close date was extended or that was given more attempts could be submitted without proctor authorization.

Now the assignment type of a proctored test version is never changed. Instead, a version is considered complete if at least one submission has been recorded and the student can no longer record answers for the version because all attempts have been used or time has expired. Proctor authorization is not required to view a complete version. Since this is determined from the current data for the version, a complete version that is extended or given more attempts requires proctor authorization again.

The version_last_attempt_time is now only used in place of the current time to determine if answers can be recorded or checked for a proctored test when answers are being submitted, so that a complete version that is viewed is not treated as if it can still be submitted.

Determining if a version is complete is done so as to add as little database work as possible to requests. The number of recorded attempts is only obtained if the result depends on it, and pages that already have a problem for the version (the set version list and the grades page) pass it in. The proctor authentication result is saved for the request, since it is checked both during authentication and by Authz::checkSet, and the set version obtained is saved in the Authz merged set cache so that it is not obtained again. The set version list links complete proctored versions to the unproctored route so that the proctor authentication module is not called during authentication for those.

Fixes #3239.

…ng its type.

Previously a proctored test version was converted to an unproctored test when
the last allowed submission was made so that it could be reviewed without
proctor authorization.  If time expired before all submissions were used, the
version remained proctored and could not be reviewed without proctor
authorization (issue openwebwork#3239).  Furthermore, once converted, a version whose
close date was extended or that was given more attempts could be submitted
without proctor authorization.

Now the assignment type of a proctored test version is never changed.
Instead, a version is considered complete if at least one submission has been
recorded and the student can no longer record answers for the version because
all attempts have been used or time has expired.  Proctor authorization is not
required to view a complete version.  Since this is determined from the current
data for the version, a complete version that is extended or given more
attempts requires proctor authorization again.

The version_last_attempt_time is now only used in place of the current time to
determine if answers can be recorded or checked for a proctored test when
answers are being submitted, so that a complete version that is viewed is not
treated as if it can still be submitted.

Determining if a version is complete is done so as to add as little database
work as possible to requests.  The number of recorded attempts is only
obtained if the result depends on it, and pages that already have a problem
for the version (the set version list and the grades page) pass it in.  The
proctor authentication result is saved for the request, since it is checked
both during authentication and by Authz::checkSet, and the set version obtained
is saved in the Authz merged set cache so that it is not obtained again.  The
set version list links complete proctored versions to the unproctored route so
that the proctor authentication module is not called during authentication for
those.

Fixes openwebwork#3239.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@drgrice1
drgrice1 force-pushed the test-proctor-no-type-change branch from 64fe94c to 5fc4df3 Compare October 20, 2026 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

proctored tests with multiple attempts per version may be inaccessible to students

1 participant