Hi Mark,
I don't believe this is currently possible without modifying the build problem set procedures.
Here is something to get you started, I haven't been able to check it. If you can develop it into a nice
feature which is still backward compatible we'll be happy to add it to our CVS code.
The key lines are 278--296 in /scripts/proceduresForBuildProbSetDB.pl.
Assuming that there are 5 problems and @scramble = (3,4,2,0,1);
then replacing trhe second line
$probNumber=$i+1;
by
$probNumber=$scramble[$i]+1
should give you the scrambled order. Look at NchooseK in PGchoicemacros.pl to see how to
write a subroutine that permutes integers. The +1 is to change everything from a run of
integers starting at 0 which is used internally by WeBWorK to a run starting at 1, which
is how the problems are labeled and stored.
Let us know how it goes.
--Mike for($i=0; $i<@problemList; ++$i) { $probNumber=$i+1; &putProblemFileName ($problemList[$i],$probNumber, $PIN);
if ($method eq 'readFromLogFile') {$probSeed = shift @seedsArrayFromLogFile;} else { # note continuationflag is zero for first problem & if unspecified unless( $problemContinuationFlagList[$i] ) { $probSeed = int(rand(5000)); } }
push (@seedList,$probSeed); ## put seed in array to be saved later in log file &putProblemSeed ($probSeed,$probNumber, $PIN); &putProblemValue ($problemValueList[$i],$probNumber, $PIN); &putProblemMaxNumOfIncorrectAttemps ($problemAttemptLimitList[$i],$probNumber, $PIN); &putProblemAttempted(0,$probNumber, $PIN); &putProblemStatus(0,$probNumber, $PIN); &putProblemNumOfCorrectAns (0,$probNumber, $PIN); &putProblemNumOfIncorrectAns (0,$probNumber, $PIN); }
<| Post or View Comments |>
|