Skip to content
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

Enable who have "modify_problem_sets" permission to view a changed seed problem and use check answer button #746

Open
xcompass opened this issue Oct 6, 2016 · 1 comment

Comments

@xcompass
Copy link
Member

xcompass commented Oct 6, 2016

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.

@Alex-Jordan
Copy link
Contributor

There is still an issue here, 7 years later.

  1. First, apply fix a permission mismatch #2251 assuming it is not already merged.
  2. Then set the permission for modify_problem_sets to ta.
  3. Then while logged in as a ta user, visit the PG editor and have a problem that should be randomly different for different seeds.
  4. Change the seed to something new like "314", and click to render the problem in a new tab.
  5. 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.

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

No branches or pull requests

2 participants