Conversation
|
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. |
038adb0 to
f44b2b3
Compare
5ac5649 to
2f358ab
Compare
|
Overall, this works well. I've been testing this by rewriting some problems. I have a few comments:
|
I suppose. I will leave that up to @Alex-Jordan. To be honest, I don't know why that macro file exists, and I don't think it is a good idea to even have. I missed when that was added.
Generally, the responsive layout that is used will work for all scenarios. But we can add other layout options if needed. I will leave that for another pull request though.
You state the last sentence as a workaround, but that is the intended way to do that. You have the list of answers, and you have the |
b4e86b2 to
29f9d61
Compare
|
I added several options and another method. See my edited initial comment. @Alex-Jordan: With the new options you can achieve the alignment you requested. Set Note that using images as choices in this macro (just as for using them for the I added this macro to those that are loaded by the |
f51c112 to
2853785
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>
2853785 to
7c74431
Compare
|
I'm not getting the questions and choices to align top/bottom. It seems like lines 580 and 594 is where the css class is set, but that is on the individual items. Shouldn't the align be on the containing div? (line 568) |
|
@pstaabp: Are you trying to align the questions and choices, or are you trying to align the content of the questions or choices? The lines of code that you are referring to are for the alignment of question or choice content, not for alignment of the questions and choices. The alignment of questions and choices is set with the |
|
I think I misunderstood what those did. I was thinking the |
|
Yes, the |



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
Edit:
Added options:
Added method:
answer: Call$ml->answer($i)to get the textual answer for question$i.