-
-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates to grading tests for other users. #2641
base: develop
Are you sure you want to change the base?
Conversation
80c72d8
to
bdd47c6
Compare
bdd47c6
to
69ec22f
Compare
82ae48b
to
68dd4f7
Compare
When able to grade a test of another user, change the "Grade Test" button to "Grade Test for UserID" to make it clear the test is being graded for another user. Show the "Check Test" button along side the "Grade Test" button for instructor who can use the problem grader but also have the permission to submit the past due test. Allow instructors who can use the problem grader to grade unsubmitted tests for that user without needing the permission to submit test versions or answers for another user. This way if for some reason a student's test doesn't get submitted correctly (such as a user closing their browser without grading the test or after reaching a grade proctor screen), it can still be graded with their saved answers. Update the timer when acting as another user if it is being shown, just only suppress warnings about running out of time in this case. Update description of record_answers_when_acting_as_student to state that it can also start and grade test versions. Also include a warning about that permission should be disabled (set back to "nobody") after using it as it can interfere with tests, and should probably only be used temporarily.
Don't show the quiz timer for instructors who can submit student answers after the due date. Update the help language to try to better describe how dangerous it is to leave the record_answers_when_acting_as_student permission on.
Viewing an open gateway test while acting as a student with the permission to submit answers for that student is dangerous since the user's answers will be saved over the student's answers. In this case, give a warning to the user about the danger and suggest they disable the permission to submit answers as students before viewing the open test version, unless they plan to submit answers for that student. The warning will only appear when they first view the test version unless they back out of the test version loosing the hidden `submit_for_student_ok` parameter.
68dd4f7
to
10abd79
Compare
@drgrice1 I decided to test this with a proctored test and it seems that it "mostly" works in the sense that you end up having to enter in proctor information twice to start or view the test, but otherwise things work as expected. I'm unsure of the best way to make it so you don't need to authenticate twice here, so I am asking for what you think would be best. What I am seeing, is when starting or viewing a proctored test as a student with permissions to submit for them, the first page you are sent to is the proctor login, then after that is done you get the warning about starting or viewing open test versions, then after agreeing to the risks you get sent back to the proctor page, and finally after the second proctor authentication you get access to the test and can move around as expected. I don't think this behavior is new to this PR, but now it affects viewing test versions as well as starting them. |
Though maybe the issue is the fact that we are asking for a proctor authentication from a user who can authenticate themselves. Maybe something we can discuss at a meeting, should we really be asking an instructor (or other user) who has permissions to start a proctored test for a proctor login. They have already authenticated, so we don't need to ask them to authenticate again. |
I don't think it is completely new with that PR, as I didn't mess with proctor behavior directly. Users with the permission My thoughts is the warning should appear before the proctor authentication page, but unsure how to best do it. The only other way I can think of to deal with it is turn the links on the warning page to a form submit, so we can keep all the hidden fields with the proctor authentication. |
Yes, that is something to discuss. When I am acting as another user and click to continue an in progress proctored test, I am not getting the warning page at all. Also, if I do the same thing for an unproctored test, I am not getting the warning page. So something isn't working with that to begin with. In addition, in both cases there is only a "Grade Test" button. There isn't a "Grade Test for ..." button, and not a "Check Test" button. |
I can't reproduce your last comment, for both proctored and unproctored tests I get a warning when I click "Continue Open Test". Also the fact you don't see the "Grade Test for ....", are you still testing this branch? |
Unfortunately, the proctor authentication is going to have to come first. Reworking things so that the warning page can come first would be messy, and could open potential security vulnerabilities. Making the continue link on the warning page a submit button with hidden inputs may work, but better would be to use the session. Hidden inputs and a form submission may open a loop hole for entering a proctored exam. |
I am on this branch, and not getting the warning page at all. That is the warning for continuing an in progress test. |
I also never get the "Grade Test for ..." button in any situation. |
I still can't reproduce this. Did you disable the permission to submit answers for students? You won't get the warning or the grade test button in that case. |
Wait, I was on the other branch for #2610 accidentally. |
In testing this I did run across another issue, though hopefully not something users are actually doing. If you have a proctored test, a student starts a proctored test version with authentication, you then change the template set from proctored to normal test, it is no longer possible to access that proctored test version with the error 'Requested set "Quiz07" is a proctored test, but no valid proctor authorization has been obtained.'. Not something I think is introduced here, and hopefully not something instructors are actually doing. But maybe something we should look into? |
That case is not something to concern ourselves with at this point. That is something to defer for the future, and probably something that has existed for a long time. |
The problem is that these warning pages use the Not using the |
Another thing that I see. The message that is shown when a user with permission to create a new set for another user attempts to do so is The selected test (Testing_Proctor_Gateway) is not a valid test for tguy (acted as by grice1). That should not include the message that the set is not a valid test. I is a valid test, it is just that the version doesn't exist. That message needs to be changed to say that the test version does not exist instead. |
I was looking into that too, and found the following change to not delete the key if waiting for a confirmation works. diff --git a/lib/WeBWorK/ContentGenerator/GatewayQuiz.pm b/lib/WeBWorK/ContentGenerator/GatewayQuiz.pm
index 6a007a388..427fba093 100644
--- a/lib/WeBWorK/ContentGenerator/GatewayQuiz.pm
+++ b/lib/WeBWorK/ContentGenerator/GatewayQuiz.pm
@@ -695,8 +695,10 @@ async sub pre_header_initialize ($c) {
}
# If the set or problem is invalid, then delete any proctor session keys and return.
- if ($c->{invalidSet}) {
- if (defined $c->{assignment_type} && $c->{assignment_type} eq 'proctored_gateway') {
+ # Don't delete key if asking for submit for student confirmation.
+ if (!$c->{confirmSubmitForStudent} && $c->{invalidSet}) {
+ if (defined $c->{assignment_type} && $c->{assignment_type} eq 'proctored_gateway')
+ {
delete $c->authen->session->{proctor_authorization_granted};
}
return; I used I agree, I thought that message about the set being invalid was also odd to appear when asking for confirmation, but left it alone as that was existing behavior. I can go clean this up to try to better describe what the cases are. |
The Instead drop both of those, and use two flags that make sense. I suggest something like |
You can just use the |
@drgrice1 My simple fix (and even my more complicated fix I just pushed) only works for viewing open versions. When creating a new test version, even if I don't delete the |
When acting as another user with permissions to create or record answers as that user, rework how the confirmation message is stored. Instead of piggy backing off of the `invalidSet` key, use a new `actingConformation` key for this case. This also skips deleting any proctor authorization key while waiting for user confirmation to continue.
4e91f7c
to
54d6c4a
Compare
The problem is that proctor authorization only works if the session key |
Ahh. Can you share your commit/diff? I was thinking that when |
What I have done is in the |
88c8f55
to
881dd1d
Compare
Thanks, I adapted it to my previous changes, and everything seems to work in regard to not requiring two authentication attempts in my testing. |
d2f560e
to
e57a5eb
Compare
e57a5eb
to
d8e1d6f
Compare
Store the confirmation state when creating or viewing an open test version for another user with appropriate permissions in the session. This is used to confirm prior proctor authentication and not ask for a second after user confirmation. Credit to drgrice1.
d8e1d6f
to
b005d66
Compare
I had move the return when waiting for acting proctor confirmation to before deleting |
Yeah, I think it is right now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is looking good now.
When able to grade a test of another user, change the "Grade Test" button to "Grade Test for UserID" to make it clear the test is being graded for another user.
Show the "Check Test" button along side the "Grade Test" button for instructor who can use the problem grader but also have the permission to submit the past due test.
Allow instructors who can use the problem grader to grade unsubmitted tests for that user without needing the permission to submit test versions or answers for another user. This way if for some reason a student's test doesn't get submitted correctly (such as a user closing their browser without grading the test or after reaching a grade proctor screen), it can still be graded with their saved answers.
Update the timer when acting as another user if it is being shown, just only suppress warnings about running out of time in this case.
Update description of record_answers_when_acting_as_student to state that it can also start and grade test versions. Also include a warning about that permission should be disabled (set back to "nobody") after using it as it can interfere with tests, and should probably only be used temporarily.
Note this is just hopefully a good start to improving being able to grade tests that didn't get submitted and grading tests for other users, there are probably tweaks that need to be made.
I also initially wanted to only allow submitting an unsubmitted testing using a students saved answers, but due to how the GatewayQuiz module works, found this to be difficult to implement (or at least I didn't see an easy way to do that), so for now an instructor could change answers before submitting the unsubmitted test even if they don't have permission to record student answers. I suspect most instructors will just use the students saved answers in this case anyways.