Make sure that a proctored test becomes unproctored when graded by instructor.#2969
Open
drgrice1 wants to merge 1 commit intoopenwebwork:WeBWorK-2.21from
Open
Make sure that a proctored test becomes unproctored when graded by instructor.#2969drgrice1 wants to merge 1 commit intoopenwebwork:WeBWorK-2.21from
drgrice1 wants to merge 1 commit intoopenwebwork:WeBWorK-2.21from
Conversation
…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.
2c347f8 to
fbb186f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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$userIDand$effectiveUserIDare different. In that case$can{recordAnswers}is the result of thecan_recordAnswersmethod which will be true if either the user has therecord_answers_when_acting_as_studentpermission or the user can grade an unsubmitted test.This fixes issue #2962.
The
GatewayQuiz.pmmodule 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 TypeofOnly Start. This will work if the type isBoth Start and Grade, but you will need #2968 to test that.