## WeBWorK Problems

### problemRandomize --- errors trying to load

by Dick Lane -
Number of replies: 4
It appears that trying to load problemRandomize.pl triggers errors in the latest version of $WW. My previous posting has a simple PGcourse.pl file which I would like to use with several demo courses. The errors occur even if I comment-out everything except loadMacros("problemRandomize.pl"); Since several attempts to report details via the Report Bug link have timed-out, I have attached an HTML file with full text of the error-report. (FWIW, the course is a local copy of model_Calculus_1.) In reply to Dick Lane ### Re: problemRandomize --- errors trying to load by Michael Gage - There is an errant comment at line 188 (about). It should read: grader =>$main::PG->{flags}->{PROBLEM_GRADER_TO_USE} || \&main::avg_problem_grader, #$main::PG_FLAGS{PROBLEM_GRADER_TO_USE} previously the comment was inadvertently placed before the || instead of at the end of the line. I've updated the copy in the svn trunk and gage_dev branches. Thanks for the report. -- Mike In reply to Dick Lane ### Re: problemRandomize --- errors trying to load by Dick Lane - Since both "svn update" and "sudo svn update" (while in pg/macros) got response "Server sent unexpected return value (403 Forbidden) in response to OPTIONS request for 'http://svn.webwork.maa.org/system/trunk/pg/macros'", I did the revision manually. After copying the original line, commenting-it-out, and moving the comment to end-of-line, the relevant section in my version of problemRandomize.pl is now (also note deletion of ";") ## grader =>$main::PG->{flags}->{PROBLEM_GRADER_TO_USE}; #$main::PG_FLAGS{PROBLEM_GRADER_TO_USE} || \&main::avg_problem_grader, grader =>$main::PG->{flags}->{PROBLEM_GRADER_TO_USE} || \&main::avg_problem_grader, #$main::PG_FLAGS{PROBLEM_GRADER_TO_USE} Although problems load now, I get a pink screen for each with warning message "Use of uninitialized value$data[0] in join or string at (eval ###) line 300"
where ### is a 4-digit number that varies (but "line 300" is always cited).

ps: the original might have been OK if written on 2 lines as
new code    ## quote old code
|| remaining stuff ,

### Re: problemRandomize --- errors trying to load

by Michael Gage -
I found some remaining bugs (the use of \$ans_rule_count instead of
the new ans_rule_count() ) and one other involving labels. This macro
file used some of the low level calls in PG and was more affected by
the recent conversion to using objects.

Not sure why you would have trouble with the download. You might
try the update from pg rather than pg/macros and see if that behaves differently. If not check with Jason Aubrey and see if can identify the problem.