Skip to content

Fix some issues with the list handling for MultiAnswer and RadioMultiAnswer. - #1538

Merged
pstaabp merged 1 commit into
openwebwork:developfrom
drgrice1:multi-ans-list-handling-tweaks
Sep 22, 2026
Merged

pstaabp merged 1 commit into
openwebwork:developfrom
drgrice1:multi-ans-list-handling-tweaks

Conversation

@drgrice1

Copy link
Copy Markdown
Member

There is a check in both macros that sets the checkTypes value to be 'compatible' when the default checker is used and checkTypes is not 'exact'. However, 'exact' is not a valid value ever. That is supposed to be 'equal'.

Also in the perform_check method for a RadioMultiAnswer it should not return when the answer hash ans_message is set and checkTypes is compatible. For a MultiAnswer object it is already this way. This means that if an entry in a list answer is incorrect, the default or custom checker will not be called. The default checker will return 0 in this case (with a minor tweak to ensure the score is 1 instead of just nonzero that was added), but a custom checker might want to score this case and give partial credit.

@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.

Looks good.

@somiaj

somiaj commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

With the problem in the forums, I was wondering if we could make compatible the default for checkTypes, since we are basically doing that for the default checker. Though I assume this was not done in order to not break some older problems that expected the old behavior.

@drgrice1

Copy link
Copy Markdown
Member Author

Yes, the new compatible setting was created so that it would not break existing behavior.

@drgrice1
drgrice1 force-pushed the multi-ans-list-handling-tweaks branch 2 times, most recently from 6d7f161 to 1a2c024 Compare September 21, 2026 20:39
…Answer.

There is a check in both macros that sets the `checkTypes` value to be
'compatible' when the default checker is used and `checkTypes` is not
'exact'. However, 'exact' is not a valid value ever.  That is supposed
to be 'equal'.

Also in the `perform_check` method for a `RadioMultiAnswer` it should
not return when the answer hash `ans_message` is set and `checkTypes` is
`compatible`.  For a `MultiAnswer` object it is already this way.  This
means that if an entry in a list answer is incorrect, the default or
custom checker will not be called.  The default checker will return 0 in
this case (with a minor tweak to ensure the score is 1 instead of just
nonzero that was added), but a custom checker might want to score this
case and give partial credit.
@drgrice1
drgrice1 force-pushed the multi-ans-list-handling-tweaks branch from 1a2c024 to 697c892 Compare September 22, 2026 01:57

@pstaabp pstaabp 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.

Fixes the issue.

@pstaabp
pstaabp merged commit 5ba77ac into openwebwork:develop Sep 22, 2026
4 checks passed
@drgrice1
drgrice1 deleted the multi-ans-list-handling-tweaks branch September 22, 2026 11:27
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