--- loncom/interface/loncreateuser.pm 2016/11/11 14:39:23 1.420 +++ loncom/interface/loncreateuser.pm 2016/11/12 00:16:24 1.421 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.420 2016/11/11 14:39:23 raeburn Exp $ +# $Id: loncreateuser.pm,v 1.421 2016/11/12 00:16:24 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1836,11 +1836,12 @@ sub display_existing_roles { my $class='Unknown'; my $credits=''; my $csec; - if ($area =~ m{^/($match_domain)/($match_courseid)} ) { + if ($area =~ m{^/($match_domain)/($match_courseid)}) { $class='Course'; my ($coursedom,$coursedir) = ($1,$2); my $cid = $1.'_'.$2; # $1.'_'.$2 is the course id (eg. 103_12345abcef103l3). + next if ($envkey =~ m{^/$match_domain/$match_courseid/[A-Za-z0-9]+_gr$}); my %coursedata= &Apache::lonnet::coursedescription($cid); if ($coursedir =~ /^$match_community$/) { @@ -2001,7 +2002,7 @@ sub display_existing_roles { } else { if ($context eq 'domain') { if ((&Apache::lonnet::allowed('vur',$ccdomain)) && - ($area=~m{^/$ccdomain/})) { + ($envkey=~m{^/$ccdomain/})) { $rolepriv{$envkey}='view'; } } elsif ($context eq 'course') {