Skip to content

Fix bug in ProblemGrader when only points are shown. - #3218

Open
somiaj wants to merge 1 commit into
openwebwork:developfrom
somiaj:bugfix/problem-grader-points
Open

somiaj wants to merge 1 commit into
openwebwork:developfrom
somiaj:bugfix/problem-grader-points

Conversation

@somiaj

@somiaj somiaj commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

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?

@drgrice1

Copy link
Copy Markdown
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.

@somiaj

somiaj commented Sep 23, 2026

Copy link
Copy Markdown
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.

Comment thread templates/ContentGenerator/Instructor/ProblemGrader.html.ep Outdated
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
somiaj force-pushed the bugfix/problem-grader-points branch from 2b596d1 to 57e5a3b Compare September 24, 2026 01:04

@drgrice1 drgrice1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good. Fixes the problem.

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