Rework the single problem grader interface.#2877
Merged
somiaj merged 1 commit intoopenwebwork:developfrom Feb 3, 2026
Merged
Conversation
0c8f3b8 to
415b40a
Compare
Alex-Jordan
approved these changes
Jan 3, 2026
Contributor
Alex-Jordan
left a comment
There was a problem hiding this comment.
I tried this out, and it's good! It works as described. I will try #2876 too now.
Contributor
Member
Author
415b40a to
2ed9374
Compare
The problem grader is now always visible for users that have the
permission to use it and in the case that they are acting for another
user. This does mean that there is no way to open the problem grader
when viewing your own problem. However, the problem grader is in a
collapse. The state of the collapse is stored in local storage, and
whenever you open another problem or change effective users, the
collapse goes back to the state that it was in the last time that you
had a page open that showed the problem grader.
Correct answers in feedback are now always shown with the reveal button,
even when the problem grader is on the page. However, the reveal button
is removed by JavaScript behind the scenes while the problem grader is
expanded, and put back if the feedback button is not opened while the
problem grader is open. So if you open a feedback button while the
problem grader is open, the reveal button is not shown, and the correct
answer is immediately visible. To summarize the reveal button
visibility, the reveal button will not be shown anytime that a feedback
button is opened while the problem grader is open, and in that case will
never return until the page reloads, but any feedback button that is not
opened while the problem grader is open will still show the reveal
button, and as usual once the reveal button is used, it will never come
back until the page is reloaded.
The problem grader is now below the problem in homework sets as it is in
tests. With the collapse and the grader always in the page, I really do
not want it above the problem as it currently is.
The original reason for the problem grader being on top was so that it
would be close to the old results table with the answers. With that
gone, that reason no longer applies.
Also remove the code for the `output_hidden_info` method in the
`Problem.html.ep` template. This is because the answer to the question
`$c->can('output_hidden_info')` is `$c` can't. There is no such method
anywhere in the code anymore.
2ed9374 to
e62b568
Compare
Contributor
|
I am trying to think if there is any down side to not being able to see the problem grader on your own problem. I guess you could use the other problem grader if you really wanted to change your own grades. But only reason I could see needing to do that is if you were testing something, and not really needed in practice. |
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.
The problem grader is now always visible for users that have the permission to use it and in the case that they are acting for another user. This does mean that there is no way to open the problem grader when viewing your own problem. However, the problem grader is in a collapse. The state of the collapse is stored in local storage, and whenever you open another problem or change effective users, the collapse goes back to the state that it was in the last time that you had a page open that showed the problem grader.
Correct answers in feedback are now always shown with the reveal button, even when the problem grader is on the page. However, the reveal button is removed by JavaScript behind the scenes while the problem grader is expanded, and put back if the feedback button is not opened while the problem grader is open. So if you open a feedback button while the problem grader is open, the reveal button is not shown, and the correct answer is immediately visible. To summarize the reveal button visibility, the reveal button will not be shown anytime that a feedback button is opened while the problem grader is open, and in that case will never return until the page reloads, but any feedback button that is not opened while the problem grader is open will still show the reveal button, and as usual once the reveal button is used, it will never come back until the page is reloaded.
The problem grader is now below the problem in homework sets as it is in tests. With the collapse and the grader always in the page, I really do not want it above the problem as it currently is.
The original reason for the problem grader being on top was so that it would be close to the old results table with the answers. With that gone, that reason no longer applies.
This is as requested by @Alex-Jordan in #2872, and is an alternate approach to that pull request.
Also remove the code for the
output_hidden_infomethod in theProblem.html.eptemplate. This is because the answer to the question$c->can('output_hidden_info')is$ccan't. There is no such method anywhere in the code anymore.