Skip to content

Preserve the entered answer when the "Show Correct Answers" button is used.#2918

Open
drgrice1 wants to merge 1 commit intoopenwebwork:developfrom
drgrice1:bugfix/show-correct-preserve-answers
Open

Preserve the entered answer when the "Show Correct Answers" button is used.#2918
drgrice1 wants to merge 1 commit intoopenwebwork:developfrom
drgrice1:bugfix/show-correct-preserve-answers

Conversation

@drgrice1
Copy link
Member

This is a case that was missed in #2855. At this point on the develop branch when the "Show Correct Answers" button is used, the form fields are not submitted to PG, and so the answer disappears. This is perhaps a minor issue as this is not the answer saved in the database, but just the answer entered at the time the "Show Correct Answers" button is used which won't be saved to the database anyway. However, it is a change in behavior. So this pull request just restores that prior behavior.

Note that if there is an answer saved in the database, then that will replace what is submitted when the "Show Correct Answers" button is used anyway. That is how it was before, and that is the same with this.

… used.

This is a case that was missed in openwebwork#2855.  At this point on the develop
branch when the "Show Correct Answers" button is used, the form fields
are not submitted to PG, and so the answer disappears. This is perhaps a
minor issue as this is not the answer saved in the database, but just
the answer entered at the time the "Show Correct Answers" button is used
which won't be saved to the database anyway.  However, it is a change in
behavior. So this pull request just restores that prior behavior.

Note that if there is an answer saved in the database, then that will
replace what is submitted when the "Show Correct Answers" button is used
anyway.  That is how it was before, and that is the same with this.
@drgrice1 drgrice1 force-pushed the bugfix/show-correct-preserve-answers branch from 2830117 to 3c1af12 Compare February 25, 2026 12:50
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.

2 participants