WeBWorK Problems

multiple problem versions

multiple problem versions

by Kenneth Appel -
Number of replies: 1
I may be trying to reinvent a wheel that is already there, so please let me know if this is the case.

I think that it is often the case, especially at the k-12 level that one wants to put multiple versions
of the same problem (i.e., with different numbers into the same or subsequent assignments. I don't know a way to do this. If it is not possible to do
this at the moment, I have one suggestion that I hope would not create a massive amount of work.

The need to make problems reappear in the same way when students go back to them causes the random
number generator to start on the student's seed each time that it is run. If it were possible to input
a number that was identifiable from the problem name
(for instance prob1@5.pg which the system would
successfully identify as prob1.pg with extra data 5)
then one could begin each problem that had random data with a loop that forced a number of iterations of an instruction like "$fake=random(1,2,1);" equal to the extra data, in this case 5. This would reset the problem to work with different numbers. If there was no
extra data the prob1.pg would be interpreted as having 0 as extra data. Thus current problems would still function in the intended way.

Any comments, either ways to do what I want within the current system, explanations of the difficulties of doing what I suggest, or better ways of doing it
would be greatly appreciated.
Ken Appel
In reply to Kenneth Appel

Re: multiple problem versions

by Michael Gage -
Ken,

If I've understood you correctly than I believe your plan is unnecessarily complicated. If you simply place two copies of the same question in the same set they will be given different seeds -- so the student will see two copies of the problem that differ only in the exact numbers that appear. Is that what you want?

To do this simply create a new blank problem in the homework set (using the homework set editor), copy the "path" of the problem you want to duplicate and paste it over the path of the blank problem. Save the result. You can reorder the problems in the set to place the duplicate questions wherever you want.

When you view this set in the homework editor you will see a warning message that the same question has been used twice -- but there is nothing wrong with that. The warning is there only because most of the time two copies of the same question means the instructor made a mistake in picking problems.

There is a very, very low probability that the two random seeds chosen for successive questions are identical -- but I wouldn't worry about that.


--Mike