Conversation
Member
|
Mojolicious does not set the values of hidden inputs from the parameters. This is different than for text inputs and other visible form fields for which Mojolicious does set the values from parameters. |
Contributor
Author
|
That it was I thought was the case, but wasn't sure. I was just so use to visible inputs, I didn't think it would be different for hidden inputs when I implemented this, and it escaped my testing until it bit me recently. |
drgrice1
reviewed
Sep 23, 2026
The hidden field score was incorrectly set (by me) to zero, and not the actual score of the student initially. Which means saving the grades without changing a student's score would result in a grade of zero.
somiaj
force-pushed
the
bugfix/problem-grader-points
branch
from
September 24, 2026 01:04
2b596d1 to
57e5a3b
Compare
drgrice1
approved these changes
Sep 24, 2026
drgrice1
left a comment
Member
There was a problem hiding this comment.
Looks good. Fixes the problem.
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 hidden field score was incorrectly set (by me) to zero, and not the actual score of the student initially. Which means saving the grades without changing a student's score would result in a grade of zero.
I must admit, I'm unsure why setting the parameter didn't work, but elsewhere in the code this was the method used to undefine the parameter and then set the value inside the input, so I must have overlooked that when implementing this. Could it be how mojolicious deals with parameter values and hidden inputs?