--- loncom/auth/lonroles.pm 2014/01/15 14:46:21 1.295 +++ loncom/auth/lonroles.pm 2014/02/23 19:06:18 1.296 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # User Roles Screen # -# $Id: lonroles.pm,v 1.295 2014/01/15 14:46:21 bisitz Exp $ +# $Id: lonroles.pm,v 1.296 2014/02/23 19:06:18 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -288,7 +288,7 @@ sub handler { "request.role.domain" => $env{'user.domain'}}); # Check if user is a DC trying to enter a course or author space and needs privs to be created if ($numdc > 0) { - foreach my $envkey (keys %env) { + foreach my $envkey (keys(%env)) { # Is this an ad-hoc Coordinator role? if (my ($ccrole,$domain,$coursenum) = ($envkey =~ m-^form\.(cc|co)\./($match_domain)/($match_courseid)$-)) { @@ -358,7 +358,7 @@ sub handler { } } - foreach $envkey (keys %env) { + foreach $envkey (keys(%env)) { next if ($envkey!~/^user\.role\./); my ($where,$trolecode,$role,$tstatus,$tend,$tstart); &Apache::lonnet::role_status($envkey,$update,$refresh,$now,\$role,\$where,