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

Show template problem ID in tests. #2253

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

somiaj
Copy link
Contributor

@somiaj somiaj commented Nov 14, 2023

For users who can see the single problem grader, also show the template problem ID if the problems are in random order or not enumerated from 1 to N. This way instructors can see what the real problem ID is in the case it is different from the problem number.

I'm unsure on the best label for this, I went with Template ID as Template Problem ID was a bit too long and I thought it was more descriptive than Problem ID.

This was mentioned in #2248.

  For users who can see the single problem grader, also show
  the template problem ID if the problems are in random order
  or not enumerated from 1 to N. This way instructors can
  see what the real problem ID is in the case it is different
  from the problem number.
Copy link
Member

@drgrice1 drgrice1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. I am not entirely certain that tying this to the permission to use the problem grader is correct. I am fine with that though.

@Alex-Jordan
Copy link
Contributor

I don't have an opinion, but alternative permission levels to use that occur to me are can_show_source_file and modify_problem_sets. The first one feels closer to semantically correct, but not perfectly so. The latter one is a bit of a misnomer because it grants access to the Set Details page, regardless of whether you would save any changes or just view what is there. But I guess if someone needs to act on the problem numbers they would see from this, they would be someone who has to go to the Set Details page.

@somiaj
Copy link
Contributor Author

somiaj commented Nov 14, 2023

My logic was pigging back off of being able to see the problem grader, since I assume it would be most useful for someone grading a test to know what the real problem ID is when they are randomized. I have no strong opinions on which permission is best, and didn't see one that would clearly be preferred.

@drgrice1
Copy link
Member

Yes, @somiaj is correct. The problems are ordered by problem_id when they are obtained from the database. So the last element in the @problems array will have the largest problem_id.

@Alex-Jordan Alex-Jordan merged commit 5494343 into openwebwork:develop Nov 16, 2023
1 check passed
@somiaj somiaj deleted the test_show_template_id branch November 21, 2023 20:31
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.

3 participants