--- loncom/interface/lonuserutils.pm 2020/04/05 20:08:52 1.206 +++ loncom/interface/lonuserutils.pm 2020/07/08 14:26:37 1.207 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Utility functions for managing LON-CAPA user accounts # -# $Id: lonuserutils.pm,v 1.206 2020/04/05 20:08:52 raeburn Exp $ +# $Id: lonuserutils.pm,v 1.207 2020/07/08 14:26:37 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1709,10 +1709,11 @@ sub my_custom_roles { my %rolehash=&Apache::lonnet::dump('roles',$udom,$uname); foreach my $key (keys(%rolehash)) { if ($key=~/^rolesdef\_(\w+)$/) { + my $role = $1; if ($crstype eq 'Community') { next if ($rolehash{$key} =~ /bre\&S/); } - $returnhash{$1}=$1; + $returnhash{$role}=$role; } } return %returnhash;