You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to have a discussion before making a PR just to make sure my proposal is good.
So currently, Edit permission for problem sets are defined in "modify_problem_sets" setting and default is professor. We have changed it to TA to allow TA to update problems. However, then they are testing the question using changed seed, they can't use "Check Answer" button, because the changed seed is not submitted when "Check Answer" is clicked. It is because this line: https://github.com/openwebwork/webwork2/blob/master/lib/WeBWorK/ContentGenerator/Problem.pm#L1735
Webwork will not generate the form field for changed seed unless the user is a professor. There is no issue with default permission settings but not for TAs.
Then set the permission for modify_problem_sets to ta.
Then while logged in as a ta user, visit the PG editor and have a problem that should be randomly different for different seeds.
Change the seed to something new like "314", and click to render the problem in a new tab.
Click "Check Answers" in the new tab. Now the problem will re-render with some default seed, not the "314" that you set.
The code surrounding this seems to be kind of a mess. Because maybe once upon a time, you could assume that having permission to use the Editor and having permission to modify a set would be the same thing. But in 2023, you might enter the editor to create a new PG file not attached to any set, to edit a hardcopy theme, or to edit the course_info file. For example maybe you would like to let a ta do some of these things even though you do not want to give a ta the ability to modify an actual problem set.
So anyway right now the permission modify_problem_sets is doing too much. But also, not enough, because there are places where some sort of permission level (either this one or some new permission level) should be used, but instead the code strictly requires the user to be professor level.
I would like to have a discussion before making a PR just to make sure my proposal is good.
So currently, Edit permission for problem sets are defined in "modify_problem_sets" setting and default is professor. We have changed it to TA to allow TA to update problems. However, then they are testing the question using changed seed, they can't use "Check Answer" button, because the changed seed is not submitted when "Check Answer" is clicked. It is because this line: https://github.com/openwebwork/webwork2/blob/master/lib/WeBWorK/ContentGenerator/Problem.pm#L1735
Webwork will not generate the form field for changed seed unless the user is a professor. There is no issue with default permission settings but not for TAs.
I'm proposing to change the permission checking for above line to be consistent with the line which controls the display of the "Edit" button:https://github.com/openwebwork/webwork2/blob/master/lib/WeBWorK/ContentGenerator/Problem.pm#L1242.
The text was updated successfully, but these errors were encountered: