--- loncom/interface/loncreateuser.pm 2010/01/20 02:57:09 1.295.2.27 +++ loncom/interface/loncreateuser.pm 2010/01/20 14:35:36 1.295.2.28 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.295.2.27 2010/01/20 02:57:09 raeburn Exp $ +# $Id: loncreateuser.pm,v 1.295.2.28 2010/01/20 14:35:36 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1484,10 +1484,10 @@ sub display_existing_roles { if ($area =~ m{^/($match_domain)/($match_courseid)} ) { $class='Course'; my ($coursedom,$coursedir) = ($1,$2); - $sortkey.="\0$coursedom"; + my $cid = $1.'_'.$2; # $1.'_'.$2 is the course id (eg. 103_12345abcef103l3). my %coursedata= - &Apache::lonnet::coursedescription($1.'_'.$2); + &Apache::lonnet::coursedescription($cid); if ($coursedir =~ /^$match_community$/) { $class='Community'; } @@ -1509,8 +1509,8 @@ sub display_existing_roles { } } $sortkey.="\0$coursedir"; - $inccourses->{$1.'_'.$2}=1; - if ((&Apache::lonnet::allowed('c'.$role_code,$1.'/'.$2)) || + $inccourses->{$cid}=1; + if ((&Apache::lonnet::allowed('c'.$role_code,$coursedom.'/'.$coursedir)) || (&Apache::lonnet::allowed('c'.$role_code,$ccdomain))) { $allowed=1; } @@ -1524,13 +1524,13 @@ sub display_existing_roles { } } } - if ((&Apache::lonnet::allowed('dro',$1)) || + if ((&Apache::lonnet::allowed('dro',$coursedom)) || (&Apache::lonnet::allowed('dro',$ccdomain))) { $delallowed=1; } # - custom role. Needs more info, too if ($croletitle) { - if (&Apache::lonnet::allowed('ccr',$1.'/'.$2)) { + if (&Apache::lonnet::allowed('ccr',$coursedom.'/'.$coursedir)) { $allowed=1; $thisrole.='.'.$role_code; }