CAPA originally used the psvn to generate seeds, but we've found that
it can be rather constraining -- too many dependencies that aren't
really related. In particular the psvn's, currently generated randomly,
are really just unique identifiers for each record in the database. If
one switches databases (something we're working hard on) the results
The new database model would give you control over setting the seed for
each problem and you could write your own routine for deciding the
Here's my suggestion -- it's a kludge which will work in the meantime -- and changes code in a minimal number of places.
The idea is that in the setDefinion file we can add an extra field -- set to 1 it demands that we
use the seed from the previous problem. Set to 0 or omitted gives the current behavior.
In FILE.pl change the readSetDef subroutine to check for the extra field and return (as
a last variable)
a reference to the new array of directives as to whether or not to use the previous seed.
(Perhaps force the 0th element to always be zero, since you will never? use the seed given
to the previous student.)
Next, in the proceduresForBuildProbSetDB.pl and the subroutine buildProbSetDB
accept the extra array reference -- approximatly line 49-50
Finally at line 281--282 modify the lines so that the seed is chosen appropriately
-- if the method is not "readFromLogFile" then check to see if you are supposed
to reuse the seed. if so reuse it, otherwise generate a new one.
In each case save a copy of the seed in a variable whose scope contains the
while statement looping through the problems. This will be needed for the next
problem in case it wants to reuse the seed.
This change should be backword compatible, so if you get time to hack it we can
put it in our CVS for others who would like to do this. It's a nice new feature.
We'll make sure it is included, in a cleaner way, in the next version.
<| Post or View Comments |>