Skip to content

Make sure that a proctored test becomes unproctored when graded by instructor.#2969

Open
drgrice1 wants to merge 1 commit intoopenwebwork:WeBWorK-2.21from
drgrice1:fix-grading-overtime-proctored-test
Open

Make sure that a proctored test becomes unproctored when graded by instructor.#2969
drgrice1 wants to merge 1 commit intoopenwebwork:WeBWorK-2.21from
drgrice1:fix-grading-overtime-proctored-test

Conversation

@drgrice1
Copy link
Copy Markdown
Member

@drgrice1 drgrice1 commented May 6, 2026

When an instructor uses the "Grade Test for" button and the test is on its final submission, currently the grading occurs, but the test is still set as a proctored test.

To fix this the condition that determines if the assignment type should be changed needs to check the $can{recordAnswers} value in the case that the $userID and $effectiveUserID are different. In that case $can{recordAnswers} is the result of the can_recordAnswers method which will be true if either the user has the
record_answers_when_acting_as_student permission or the user can grade an unsubmitted test.

This fixes issue #2962.

The GatewayQuiz.pm module is really so convoluted at this point that it is really becoming impossible to do anything with, and is in desperate need of a complete overhaul and rewrite. Any time any new feature is added to the module or change is made to the module it is almost impossible to go through all of the possibilities and ensure you haven't broken something.

Note that to test this make sure you have the test set with a Proctor Authorization Type of Only Start. This will work if the type is Both Start and Grade, but you will need #2968 to test that.

…structor.

When an instructor uses the "Grade Test for" button and the test is on
its final submission, currently the grading occurs, but the test is
still set as a proctored test.

To fix this the condition that determines if the assignment type should
be changed needs to check the `$can{recordAnswers}` value in the case
that the `$userID` and `$effectiveUserID` are different.  In that case
`$can{recordAnswers}` is the result of the `can_recordAnswers` method
which will be true if either the user has the
`record_answers_when_acting_as_student` permission or the user can grade
an unsubmitted test.

This fixes issue openwebwork#2962.

The `GatewayQuiz.pm` module is really so convoluted at this point that
it is really becoming impossible to do anything with, and is in
desperate need of a complete overhaul and rewrite. Any time any new
feature is added to the module or change is made to the module it is
almost impossible to go through all of the possibilities and ensure you
haven't broken something.
@drgrice1 drgrice1 force-pushed the fix-grading-overtime-proctored-test branch from 2c347f8 to fbb186f Compare May 6, 2026 12:50
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.

1 participant