WeBWorK "Show Correct Answer" tied to exercise.divisional.answer?

165 views
Skip to first unread message

Mitch Keller

unread,
Aug 22, 2021, 5:11:19 PM8/22/21
to PreTeXt support
Am I correct that whether or not the "Show Correct Answer" button appears after clicking the "Make Interactive" button on a WeBWorK exercise is tied to exercise.divisional.answer? I'm helping Steve get AC3 ready to ship out the typo updates, and it seems that toggling that stringparam enables/disables "Show Correct Answer". Since Steve doesn't have answers to non-WeBWorK exercises in AC3, I've got a solution for him. However, for ACS, we have an answer child for all the divisional exercises and put them in the back of the book in an appendix. We would not want them to display where born. If these are not tied together, can someone point me toward what we need to do to get the "Show Correct Answer" button without displaying divisional exercise answers where born? If "Show Correct Answer" is tied to that stringparam, is there any hope of getting the behavior separated? I don't think I can just use custom XSLT to kill the answers, as it seems that would wreak havoc on the appendix of exercise answers. (Although maybe there's a mode that can solve that problem for me?)

Alex Jordan

unread,
Aug 22, 2021, 6:41:58 PM8/22/21
to pretext...@googlegroups.com
exercise.divisional.answer controls whether an answer to an exercise
is available to the reader where the exercise is born. Think of this
as an author's pedagogical decision, not a decision that has to do
with saving print space or reducing layout clutter. So it makes sense
that it uniformly applies to showing answer knowls as well as to
making the "show correct answer" button.

So yes, in the case of a live WeBWorK exercise, that is still
controlling whether the reader can see the correct answers right there
where the exercise is. If "no", the answers to these exercises will be
in that appendix just like they are for the other exercises.

I don't think you can hack around this with XSLT. Whether the button
is there is controlled by pretext-webwork.js seeing that the answer
knowl is present in the static preview. If you really want to practice
the dark arts, you could post-process HTML to insert the things that
the js is looking for, while still making that invisible to the reader
who has not yet made the exercise live.

On Sun, Aug 22, 2021 at 2:11 PM Mitch Keller <mi...@rellek.net> wrote:
>
> Am I correct that whether or not the "Show Correct Answer" button appears after clicking the "Make Interactive" button on a WeBWorK exercise is tied to exercise.divisional.answer? I'm helping Steve get AC3 ready to ship out the typo updates, and it seems that toggling that stringparam enables/disables "Show Correct Answer". Since Steve doesn't have answers to non-WeBWorK exercises in AC3, I've got a solution for him. However, for ACS, we have an answer child for all the divisional exercises and put them in the back of the book in an appendix. We would not want them to display where born. If these are not tied together, can someone point me toward what we need to do to get the "Show Correct Answer" button without displaying divisional exercise answers where born? If "Show Correct Answer" is tied to that stringparam, is there any hope of getting the behavior separated? I don't think I can just use custom XSLT to kill the answers, as it seems that would wreak havoc on the appendix of exercise answers. (Although maybe there's a mode that can solve that problem for me?)
>
> --
> You received this message because you are subscribed to the Google Groups "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/707b1665-4b37-4d42-bc90-366b5bf62b56n%40googlegroups.com.

Alex Jordan

unread,
Aug 22, 2021, 6:45:38 PM8/22/21
to pretext...@googlegroups.com
> Think of this
as an author's pedagogical decision

That may sound silly, since it is a stringparam and those are usually
publisher thingies. So maybe this aspect warrants discussion. Is
"exercise.divisional.answer" an author device or a publisher device?
If it's established to be a publisher device, there is cause to
consider separating the two output features (having answer knowls
versus having the show correct answer button).

Rob Beezer

unread,
Aug 22, 2021, 7:40:43 PM8/22/21
to pretext...@googlegroups.com
Options like

exercise.divisional.answer

are intended to migrate to the publisher file. So I definitely view them as a
publisher decision.

The author writes the "answer" and associates it with the "exercise". If the
text is open source, then that answer is available no matter what decisions are
made about visibility.

If an author feels answers should be controlled, then they should place them in
a private repository and exert the copyright protections they are entitled to.
We have machinery to support this, tested and in use with Judson's AATA.

Rob

Alex Jordan

unread,
Aug 22, 2021, 8:21:51 PM8/22/21
to pretext...@googlegroups.com
We currently have:
exercise.divisional.answer (yes or no)
webwork.divisional.static (yes or no)

and hypothetically we would also have something like
webwork.divisional.showcorrect (yes or no)

To be clear, in these cases:
Case 1:
exercise.divisional.answer = yes
webwork.divisional.showcorrect = no

Case 2 (what I think Mitch wants):
exercise.divisional.answer = no
webwork.divisional.showcorrect = yes

we would have each thing literally do what it says it is doing? In
other words, should we think about if Case 1 makes no sense and
overrule the yes,no options to be yes,yes?

It's not a good time to introduce:
webwork.divisional.showcorrect
and make it behave in a backward-compatible way for the few projects
that are already using live WW 2.16 embeddings. The new stringparam
can come into existence, but if I am the one doing that, the timeline
for getting it out there won't be like "in time for fall 2021".
> To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/be66c6b5-4f6d-8dcc-9701-d5c99c59591d%40ups.edu.

Mitch Keller

unread,
Aug 22, 2021, 9:20:14 PM8/22/21
to pretext...@googlegroups.com
Yes, Case 2 is what I am looking for. I don’t think Rob’s proposed solution of storing answers elsewhere is adequate, as for ACS, we don’t display answers where born, but we do display them in an appendix.

In terms of adjusting something in XSLT, I was thinking of setting exercise.divisional.answer = yes and dealing with the non-WW exercises. But I’m not sure if Matt cares that much about whether or not an update built this summer has the “Show Correct Answer” button. Steve really wanted it for AC3, and his lack of exercise/answer means that we have a fix for the time being and this is more something to be adjusted going forward. Happy to file an issue to memorialize this on the to do list.

> On Aug 22, 2021, at 19:22, Alex Jordan <jordanc...@gmail.com> wrote:
>
> We currently have:
> To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/CA%2BR-jreLcfDg%2BhpmCTibSmBdmcdWzaCWC8kzA0gDmzjv0MC3xg%40mail.gmail.com.

Rob Beezer

unread,
Aug 23, 2021, 12:12:17 AM8/23/21
to pretext...@googlegroups.com
I wasn't proposing a solution, I was arguing against this being an author decision once they had released answers as open source. In other words, you can't put the toothpaste back in the tube.

Alex Jordan

unread,
Aug 23, 2021, 2:07:07 AM8/23/21
to pretext...@googlegroups.com
> I was arguing against this being an author decision once they had released answers as open source. In other words, you can't put the toothpaste back in the tube.

That sounds like you see this as about making answers unavailable to
students. The argument that this could be an author decision has, I
think, more subtleties than just being about making answers
unavailable to students. There are pedagogical (=> author) reasons for
making the student reader exert non-zero effort to access the answers.
If it's effortless to bypass critical thinking and just click open an
answer, mindless opportunism can strike. But if a reader must take
several steps to get to that answer, it is a willful conscious
decision.

Yes, the author can write answers separately. It's just a shame the
extra file maintenance that causes.

Mitch, in the first post:
> We would not want them to display where born.

Can you say why not? What is the reason for that choice, specifically
with regard to HTML output where space is free?
> To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/MTAwMDAwOS5iZWV6ZXI.1629691935%40quikprotect.

Mitch Keller

unread,
Aug 23, 2021, 12:02:55 PM8/23/21
to pretext...@googlegroups.com


> On Aug 23, 2021, at 1:06 AM, Alex Jordan <jordanc...@gmail.com> wrote:
>
>> I was arguing against this being an author decision once they had released answers as open source. In other words, you can't put the toothpaste back in the tube.
>
> That sounds like you see this as about making answers unavailable to
> students. The argument that this could be an author decision has, I
> think, more subtleties than just being about making answers
> unavailable to students. There are pedagogical (=> author) reasons for
> making the student reader exert non-zero effort to access the answers.
> If it's effortless to bypass critical thinking and just click open an
> answer, mindless opportunism can strike. But if a reader must take
> several steps to get to that answer, it is a willful conscious
> decision.
>
> Yes, the author can write answers separately. It's just a shame the
> extra file maintenance that causes.
>
> Mitch, in the first post:
>> We would not want them to display where born.
>
> Can you say why not? What is the reason for that choice, specifically
> with regard to HTML output where space is free?

It’s exactly the reason you wrote: Making the student reader exert non-zero effort to access the answers. Why even bother opening the hint knowl (when there is one) if you can just open the answer? I know from using activities from ACS in class that very few students scroll to the backmatter to look at the answers, even when I’m having them use their computers to see the activity they’re working on.

I also think that there’s a matter of faculty adoption decisions. A lot of faculty who are not authors/publishers/editors will be dismissive of something that has the answer immediately available for an exercise, even if it’s a multi-step problem where what gets turned in for grading would have a lot of work shown to get any credit.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/CA%2BR-jrdtXxkP1-1TicwvvQhdBHwYoqOvVNN4KG0v_-AdnNqmWg%40mail.gmail.com.


Mitch Keller
mi...@rellek.net

Alex Jordan

unread,
Aug 23, 2021, 12:44:08 PM8/23/21
to pretext...@googlegroups.com
> It’s exactly the reason you wrote: Making the student reader exert non-zero effort to access the answers. Why even bother opening the hint knowl (when there is one) if you can just open the answer?

That's what I was thinking originally, that it's a pedagogical reason.
Follow-up question: why do you want the Show Correct Answers button?
That's very close to making the answers immediately available. It's
two clicks now instead of one, but still on the same page.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/43621F03-E994-47A6-B54E-6DFCAAD4832C%40rellek.net.

Mitch Keller

unread,
Aug 23, 2021, 1:00:42 PM8/23/21
to pretext...@googlegroups.com


> On Aug 23, 2021, at 11:43 AM, Alex Jordan <jordanc...@gmail.com> wrote:
>
>> It’s exactly the reason you wrote: Making the student reader exert non-zero effort to access the answers. Why even bother opening the hint knowl (when there is one) if you can just open the answer?
>
> That's what I was thinking originally, that it's a pedagogical reason.

Yeah, it definitely feels like the sort of thing that’s a pedagogical decision that the publisher (perhaps in consultation with the author) makes to either support a certain pedagogy or because it seems the most likely pedagogical preference of the instructors using the text.

> Follow-up question: why do you want the Show Correct Answers button?
> That's very close to making the answers immediately available. It's
> two clicks now instead of one, but still on the same page.

I honestly didn’t notice it wasn’t there until Steve asked me about it. I think an argument for Show Correct Answer being independently controllable is that (as most PreTeXt books are published at this time), WeBWorK exercises are there purely for student practice and that after a certain number of tries, it makes pedagogical sense to encourage the student to click Show Correct Answer to see if they can get unstuck. (Perhaps the issue is something about how they have been entering their answer and the problem isn’t giving them suitable feedback.) Since some exercises support randomization, it’s not like having an answer in the backmatter is fully adequate for these exercises. Also, getting access to the answer here gives a chance to learn from it and then randomize and try another version, which you don’t really have with the traditional exercises.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/CA%2BR-jreKwzUqT3J5hng%3DUcKbmKyHzFZzSGNHj3zCrerrvm2j%2Bw%40mail.gmail.com.


Mitch Keller
mi...@rellek.net

Alex Jordan

unread,
Aug 23, 2021, 1:06:14 PM8/23/21
to pretext...@googlegroups.com
Maybe it makes sense for the "randomized" problems (the ones after the
initial version of the live exercise) to have the button, even when
the initial live version does not have the button.

Sometimes the "randomized" version is identical to the original
version. But we do hope eventually to just suppress the Randomize
button in situations where the next version will match the first
version.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/56174BE7-8788-4D75-A05A-952451C5853B%40rellek.net.

Sean Fitzpatrick

unread,
Aug 27, 2021, 4:15:42 PM8/27/21
to pretext...@googlegroups.com
If we get to the point where the Randomize button only shows up when a question is truly randomized, how feasible (or desirable) would it be too set things up so that the Show Answer button shows up *after* the Randomize button is pressed?
Reply all
Reply to author
Forward
0 new messages