Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rendering static images when checking answers in the PG problem editor. #2574

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

drgrice1
Copy link
Sponsor Member

This fixes issue #2556 essentially as @somiaj suggests (although there is no need to first check that $rh->{fileName} is defined).

The reason that $rh->{fileName} is defined is because the default.html.ep template always adds the fileName hidden field even when the fileName parameter is not defined in the original request. So if you click "Check Answers" it will be defined in RenderProblem.pm on that request.

…ditor.

This fixes issue openwebwork#2556 essentially as @somiaj suggests (although there
is no need to first check that `$rh->{fileName}` is defined).

The reason that `$rh->{fileName}` is defined is because the
`default.html.ep` template always adds the `fileName` hidden field even
when the `fileName` parameter is not defined in the original request. So
if you click "Check Answers" it will be defined in `RenderProblem.pm` on
that request.
@drgrice1 drgrice1 force-pushed the render-problem-non-empty-filenames branch from 0294d84 to b615eac Compare September 18, 2024 20:34
Copy link
Contributor

@somiaj somiaj left a comment

Choose a reason for hiding this comment

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

Thanks for looking into this and double checking there wasn't a better fix.

Could this also be a hotfix?

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