## WeBWorK Problems

### Turning off problemRandomize for a single problem

by Paul Seeburger -
Number of replies: 4
I have placed the problemRandomize.pl in my PGcourse.pl so all of my problems will allow the student to obtain a new version.

However, sometimes there are problems that I wish to not include problemRandomization in.

Is there a way to not include it other than to not load PGcourse.pl?

Currently I do not have anything else in PGcourse.pl, but I can see that I may include more there in the future.

### Re: Turning off problemRandomize for a single problem

by Davide Cervone -
You can load problemRandomize.pl conditionally dependent on the homework set number and question number. Something like
loadMacros("problemRandomize.pl") unless
($setNumber eq "MySet1" &&$questionNumber == 2) ||
($setNumber eq "MySet2" &&$questionNumber == 5);

should do it. This example uses randomization except for problem 2 on set MySet1 and problem 5 on set MySet2. Modify to suit your needs.

### Re: Turning off problemRandomize for a single problem

by Danny Glin -
Alternatively you should be able to use a variable in the problem to disable the randomization.

$noRandomization = 1; and then in pgCourse.pl: loadMacros("problemRandomize.pl") unless$noRandomization;

### Re: Turning off problemRandomize for a single problem

by Paul Seeburger -
That sounds like a nice option!  I'll give it a try.

Thanks, Danny!