Skip to content

Fix bug in problemRandomize hardcopy. - #1516

Merged
Alex-Jordan merged 1 commit into
openwebwork:developfrom
somiaj:bugfix/hardcopy-problem-randomize
Aug 18, 2026
Merged

Fix bug in problemRandomize hardcopy.#1516
Alex-Jordan merged 1 commit into
openwebwork:developfrom
somiaj:bugfix/hardcopy-problem-randomize

Conversation

@somiaj

@somiaj somiaj commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

When generating hardcopy with a problem using problemRandomize, $input_ref doesn't contain the user or effectiveUser keys, which causes an error when trying to compare them. Only compare if user and efficitveUser are equal in the case effectiveUser is a defined key in $input_ref.

Fixes #1515.

Note this is just a quick fix, as the macro is deprecated and there could probably be other issues with its approach.

When generating hardcopy with a problem using problemRandomize,
`$input_ref` doesn't contain the `user` or `effectiveUser` keys,
which causes an error when trying to compare them. Only compare if
`user`  and `efficitveUser` are equal in the case `effectiveUser`
is a defined key in `$input_ref`.

Fixes openwebwork#1515.

@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 for this broken macro!

@Alex-Jordan
Alex-Jordan merged commit 39e5991 into openwebwork:develop Aug 18, 2026
3 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.

3 participants