Skip to content

Make sure to account for an undefined ANSWER_ENTRY_ORDER in the single problem grader. - #3195

Merged
somiaj merged 1 commit into
openwebwork:developfrom
drgrice1:bugfix/grader-undef-answer-order
Sep 7, 2026
Merged

Make sure to account for an undefined ANSWER_ENTRY_ORDER in the single problem grader.#3195
somiaj merged 1 commit into
openwebwork:developfrom
drgrice1:bugfix/grader-undef-answer-order

Conversation

@drgrice1

@drgrice1 drgrice1 commented Sep 3, 2026

Copy link
Copy Markdown
Member

Previously the problem grader could only be made visible when the problem successfully rendered. Now that it is always visible, a little more care is needed. The ANSWER_ENTRY_ORDER array in the PG flags will not be defined if the problem does not successfully render.

This fixes issue #3194.

@drgrice1

drgrice1 commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

It seems to me that the fact that the problem

DOCUMENT();
ENDDOCUMENT();

does not render reveals a fundamental flaw in PG.

The PG.pl macro certainly should not call any method that is defined in another macro. Either the MODES method should not be called in PG.pl, or the MODES method should be defined in PG.pl.

@somiaj somiaj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fixes the issue.

@somiaj

somiaj commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

When testing this out, I noticed that some users the problem grader has a comment field and others don't, what is the logic for if it is possible for the instructor to add a comment with the single problem grader?

@somiaj

somiaj commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

does not render reveals a fundamental flaw in PG.

Note, @dlglin pointed out a few other issues with PGbasicmacros.pl requiring stuff from PGauxiliaryFunctions.pl, and basically PG has issues and isn't well tested in the case PGstandard.pl is not loaded. Either we start just loading PGstandard.pl by default, or we fix those issues is my thought.

@drgrice1

drgrice1 commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

The comments are saved in the past answer table. So in order for there to be a place to save the comment, there must be a past answer. So if the student has not submitted an answer, there is no comment field.

…gle problem grader.

Previously the problem grader could only be made visible when the
problem successfully rendered.  Now that it is always visible, a little
more care is needed.  The `ANSWER_ENTRY_ORDER` array in the PG flags
will not be defined if the problem does not successfully render.

This fixes issue openwebwork#3194.
@drgrice1
drgrice1 force-pushed the bugfix/grader-undef-answer-order branch from fb937ae to fd3e269 Compare September 7, 2026 01:26
somiaj added a commit that referenced this pull request Sep 7, 2026
…er-hotfix

Make sure to account for an undefined `ANSWER_ENTRY_ORDER` in the single problem grader. (Hotfix of #3195)
@somiaj

somiaj commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Using @Alex-Jordan approval on #3196 as an approval on this too, and merging.

@somiaj
somiaj merged commit e2ab788 into openwebwork:develop Sep 7, 2026
2 checks passed
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