--- loncom/interface/loncreateuser.pm 2016/11/09 16:35:46 1.418 +++ 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.418 2016/11/09 16:35:46 raeburn Exp $ +# $Id: loncreateuser.pm,v 1.421 2016/11/12 00:16:24 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -429,7 +429,7 @@ sub build_tools_display { ''; } $output .= ' '.$custom_access.(' 'x4). - $lt{'avai'}.': '.$currdisp.''."\n"; + $lt{'avai'}.': '.$currdisp.''."\n". &Apache::loncommon::end_data_table_row()."\n"; unless (&Apache::lonnet::allowed('udp',$ccdomain)) { $output .= @@ -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$/) { @@ -1899,7 +1900,6 @@ sub display_existing_roles { } } if ($area=~m{^/($match_domain/$match_courseid/(\w+))}) { - $csec = $2; $carea.='
'.&mt('Section: [_1]',$csec); $sortkey.="\0$csec"; @@ -2001,7 +2001,8 @@ sub display_existing_roles { $rolepriv{$envkey}='edit'; } else { if ($context eq 'domain') { - if (&Apache::lonnet::allowed('vur',$ccdomain)) { + if ((&Apache::lonnet::allowed('vur',$ccdomain)) && + ($envkey=~m{^/$ccdomain/})) { $rolepriv{$envkey}='view'; } } elsif ($context eq 'course') { @@ -2058,14 +2059,14 @@ sub display_existing_roles { &Apache::loncommon::start_data_table_header_row()); if ($showall) { $r->print( -''.$lt{'rev'}.''.$lt{'ren'}.''.$lt{'del'} +''.$lt{'rev'}.''.$lt{'ren'}.''.$lt{'del'}.'' ); } elsif ($showexpired) { $r->print(''.$lt{'rev'}.''); } $r->print( -''.$lt{'rol'}.''.$lt{'ext'}. -''.$lt{'sta'}.''.$lt{'end'}.''. +''.$lt{'rol'}.''.$lt{'ext'}.''. +''.$lt{'sta'}.''.$lt{'end'}.''. &Apache::loncommon::end_data_table_header_row()); foreach my $type ('Authoring Space','Course','Community','Domain','System','Unknown') { if ($output{$type}) { @@ -6096,15 +6097,15 @@ ENDSCRIPT } if ($registered) { $regon = ' checked="checked" '; - $regoff = ' '; + $regoff = ''; } else { - $regon = ' '; + $regon = ''; $regoff = ' checked="checked" '; } $output .= '  '; } elsif ($item eq 'enroll_dates') { my ($starttime,$endtime);