Hi,
Several years ago, I used a technique where a set of problem files were randomly re-ordered. For example, given 3 problems the order of the problems would be different for individual students. This depended on a macro, unionInclude.pl, which seems to be no longer in pg.
I've listed the file I used in the past--which worked until we upgraded to 2.7 this summer--and the error message below. I have an old copy of unionInclude.pl in the macros folder of the course and sometimes it works just fine.
When it does not work, it seems to get stuck on one problem and instead of having problems 3,2,5,1,4 (for example) it will put out 3,2,5,5,5 (with error messages on the problems from file 5). The error message says there is an uninitialized $n. None of the problem files have a variable $n, but unionInclude.pl does.
Is there another way to do this? --rac
-------Error message--------------------------------------------------------------
WeBWorK Warnings
WeBWorK has encountered warnings while processing your request. If this occured when viewing a problem, it was likely caused by an error or ambiguity in that problem. Otherwise, it may indicate a problem with the WeBWorK system itself. If you are a student, report these warnings to your professor to have them corrected. If you are a professor, please consult the warning output below for more information.
Warning messages
Use of uninitialized value $n in array element at line 53 of (eval 9960)
----------File to re-order problems---------------------------------------------
DOCUMENT(); # This should be the first executable line in the problem.
loadMacros(
"unionInclude.pl"
);
#--------The first problem number must be initialized.
$initialProblemNumber = 6;
includeRandomProblem(
"31IntAlg_06_LinearSystem.pg",
"31IntAlg_07_LinearSystem.pg",
"31IntAlg_08_LinearSystem.pg",
"31IntAlg_09_LinearSystem.pg",
"31IntAlg_10_LinearSystem.pg",
"31IntAlg_11_LinearSystem.pg",
"31IntAlg_12_LinearSystem.pg",
"31IntAlg_13_LinearSystem.pg"
);
ENDDOCUMENT();