WeBWorK Main Forum

Hardcopy Error

Re: Hardcopy Error

by Arnold Pizer -
Number of replies: 0
Thanks for reporting this Blake. I think both are the same error since in case 1 the students can not select the set which is not open.

The bug is in Hardcopy.pm and is subtle since it happens for students but not professors (they select sets differently). Here's what is there now:

# when students don't select any sets the size of @setIDs is 1 with a null character in $setIDs[0].
# when professors don't select any sets the size of @setIDs is 0.
# the following test "unless ((@setIDs) and ($setIDs[0] =~ /\S+/))" catches both cases and prevents
# warning messages in the case of a professor's empty array.

Previously the test was "unless (@setIDs)"

I don't think it is worthwhile to put this in patches. If you want to use it cd to
.../webwork/webwork2/lib/WeBWorK/ContentGenerator
and run
cvs update -A Hardcopy.pm

Arnie