WeBWorK Main Forum

Show Me Another not working

Show Me Another not working

by Michael Shulman -
Number of replies: 4
I'm having trouble getting Show Me Another to work. I enabled it in Course Configuration, and then set the number of tries to something positive in the homework sets detail. When I try a problem enough times, the button then appears, but clicking it gives the error "WeBWorK was unable to generate a different version of this problem".

By editing line 242 of lib/WeBWorK/ContentGenerator/ShowMeAnother.pm to change = 0 to = 1, I can make the error go away; but then the "new version" of the problem is the same as the old one. Presumably this line of the file is testing to prevent this, so it seems that the problem is that the necessary re-randomization is not happening. Any ideas what could be wrong and how I can make the randomization happen?
In reply to Michael Shulman

Re: Show Me Another not working

by Alex Jordan -
Hi Michael,

It sounds like you are using a problem that doesn't randomly change from one seed to the next. Have you looked at that problem's source code? If so, does it seem like it should be randomly different for different seeds?

The first message you got is intentional. In an SMA version, you maybe allow the student to see the correct answer and/or the solution. We didn't want a studnet to be able to get the answer to their real problem just by using the SMA button, and then either seeing the SMA's correct answer, seeing the SMA's solution, or using free and unlimited 'check answer' button pushes on the SMA.

So when you hit that button, what happens is it tries several new seeds to generate new versions, and if it just keeps getting the same version (as judged by comparing the HTML presentations of the question statement) after enough times, it quits.

Probably we should make that message more helpful by adding something like "It is possible this problem does not provide for new random versions."


In reply to Alex Jordan

Re: Show Me Another not working

by Michael Shulman -
That was actually the first thing I looked at. The problem is randomizing plenty. It's Library/272/setStewart12_3/problem_1a.pg, which contains six calls to random(-5,5).

Sorry I didn't mention that; I did mention it in when I first wrote this post, but then my browser ate it and I guess I forgot to say it again when I re-wrote the post.
In reply to Michael Shulman

Re: Show Me Another not working

by Alex Jordan -
In that case, I don't know. I am using 2.12, and I just created a problem set with that problem and turned on all the SMA switches. I'm able to use the button and it gives a new version. Ideas off the top of my head:

Are you using 2.12? (It worked here when we were on 2.11 too.)

Are you using images to display instead of MathJax? If so, and if the image is caching, maybe that would explain this. But the more I think about that the less sure I am.

It's a long shot, but if you were really unlucky then all the attempted seeds would produce the same output.
In reply to Alex Jordan

Re: Show Me Another not working

by Michael Shulman -
Well, I don't know what was wrong before, but after deleting that problem from the set and re-adding it, it works now. Maybe there was a temporary problem with the random number generator or something...