Conversation
Member
Author
|
The attached example problems include problems that use a MatchList in a MultiAnswer and RadioMultiAnswer, and the examples have custom checkers. I wanted to point out that the default MultiAnswer and RadioMultiAnswer checkers do work. The examples just demonstrate how you would do things in a custom checker. |
drgrice1
force-pushed
the
match-list-macro
branch
2 times, most recently
from
September 21, 2026 20:39
038adb0 to
f44b2b3
Compare
The `parserMatchList.pl` macro is intended to replace the
`PGchoicemacros.pl` match list (obtained via `new_match_list`).
This is the only thing left from the PGchoicemacros.pl that has not yet
been replaced with a modern MathObject equivalent.
The `MatchList` object derives from a `Value::List` and is an
`ans_array` type answer. So it is inserted into PGML with the
`[_]*{...}` syntax, and if a custom checker is desired the
`list_checker` is needed.
This macro is similar in nature to the `parserPopUp.pl` and
`parserCheckboxList.pl` macros in many ways, and actually uses the
`parserPopUp.pl` `DropDown` object internally. As with the objects from
those macros, this `MatchList` object can be used as a part answer in a
`MultiAnswer` or `RadioMultiAnswer`.
The `tutorial/sample-problems/Misc/Matching.pg` has been replaced with
the `tutorial/sample-problems/Misc/MatchList.pg` problem. The
`tutorial/sample-problems/Misc/MatchingAlt.pg` has also been removed,
since that approach is better accomplished with the `parserMatchList.pl`
macro.
There are unit tests for the macro in `t/macros/parserMatchList.t`.
Note that the `PTX` output will need verification (and probably
modification). Claude added something for that, but I don't know what
it is correct.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
drgrice1
force-pushed
the
match-list-macro
branch
from
September 22, 2026 01:57
f44b2b3 to
e0c58b2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
parserMatchList.plmacro is intended to replace thePGchoicemacros.plmatch list (obtained vianew_match_list). This is the only thing left from the PGchoicemacros.pl that has not yet been replaced with a modern MathObject equivalent.The
MatchListobject derives from aValue::Listand is anans_arraytype answer. So it is inserted into PGML with the[_]*{...}syntax, and if a custom checker is desired thelist_checkeris needed.This macro is similar in nature to the
parserPopUp.plandparserCheckboxList.plmacros in many ways, and actually uses theparserPopUp.plDropDownobject internally. As with the objects from those macros, thisMatchListobject can be used as a part answer in aMultiAnswerorRadioMultiAnswer.The
tutorial/sample-problems/Misc/Matching.pghas been replaced with thetutorial/sample-problems/Misc/MatchList.pgproblem. Thetutorial/sample-problems/Misc/MatchingAlt.pghas also been removed, since that approach is better accomplished with theparserMatchList.plmacro.There are unit tests for the macro in
t/macros/parserMatchList.t.Note that the
PTXoutput will need verification (and probably modification). Claude added something for that, but I don't know what it is correct.Here are some problems that demonstrate some other uses of the macro that are different than the sample problem:
MatchList.zip