From: Sam H. v. a. <we...@ma...> - 2005-10-26 16:19:44
|
Log Message: ----------- only check status behaviors for guest users that have a defined status. apparently, status can still sometimes be empty. Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator: Login.pm Revision Data ------------- Index: Login.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Login.pm,v retrieving revision 1.30 retrieving revision 1.31 diff -Llib/WeBWorK/ContentGenerator/Login.pm -Llib/WeBWorK/ContentGenerator/Login.pm -u -r1.30 -r1.31 --- lib/WeBWorK/ContentGenerator/Login.pm +++ lib/WeBWorK/ContentGenerator/Login.pm @@ -175,7 +175,9 @@ # figure out if there are any valid practice users my @guestUserIDs = grep m/^$practiceUserPrefix/, $db->listUsers; my @GuestUsers = $db->getUsers(@guestUserIDs); - my @allowedGuestUsers = grep { $ce->status_abbrev_has_behavior($_->status, "allow_course_access") } @GuestUsers; + my @allowedGuestUsers = grep { defined $_->status and $_->status ne "" + and $ce->status_abbrev_has_behavior($_->status, "allow_course_access") + } @GuestUsers; # form for guest login if (@allowedGuestUsers) { |