--- loncom/interface/loncreateuser.pm 2010/04/23 17:51:42 1.295.2.33 +++ loncom/interface/loncreateuser.pm 2010/03/21 21:05:42 1.337 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.295.2.33 2010/04/23 17:51:42 raeburn Exp $ +# $Id: loncreateuser.pm,v 1.337 2010/03/21 21:05:42 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -685,7 +685,7 @@ ENDBLOCK ); my $sellink=&Apache::loncommon::selectstudent_link('crtusername','srchterm','srchdomain'); my ($title,$buttontext,$showresponse); - if ($env{'form.action'} eq 'singlestudent') { + if ($env{'form.action'} eq 'singlestudent') { if ($crstype eq 'Community') { $title = $lt{'enrm'}; } else { @@ -1053,8 +1053,8 @@ ENDFORMINFO } } else { foreach my $key (keys(%env)) { - if ($key=~/^user\.priv\.cm\.\/($match_domain)\/($match_username)/) { - $inccourses{$1.'_'.$2}=1; + if ($key=~/^user\.priv\.cm\.\/($match_domain)\/($match_username)/) { + $inccourses{$1.'_'.$2}=1; } } } @@ -1428,7 +1428,7 @@ sub display_existing_roles { my (%rolesdump,%roletext,%sortrole,%roleclass,%rolepriv); if ($context eq 'course' || $context eq 'author') { my @roles = &Apache::lonuserutils::roles_by_context($context,1,$crstype); - my %roleshash = + my %roleshash = &Apache::lonnet::get_my_roles($ccuname,$ccdomain,'userroles', ['active','previous','future'],\@roles,$roledom,1); foreach my $key (keys(%roleshash)) { @@ -1499,7 +1499,7 @@ sub display_existing_roles { if (defined($coursedata{'description'})) { $carea=$coursedata{'description'}. ''.&mt('Domain').': '.$coursedom.(' 'x8). - &Apache::loncommon::syllabuswrapper(&mt('Syllabus'),$coursedir,$coursedom); + &Apache::loncommon::syllabuswrapper(&mt('Syllabus'),$coursedir,$coursedom); $sortkey.="\0".$coursedata{'description'}; } else { if ($class eq 'Community') { @@ -1525,10 +1525,10 @@ sub display_existing_roles { $allowed = 1; } } - } + } if ((&Apache::lonnet::allowed('dro',$coursedom)) || (&Apache::lonnet::allowed('dro',$ccdomain))) { - $delallowed=1; + $delallowed=1; } # - custom role. Needs more info, too if ($croletitle) { @@ -1541,11 +1541,11 @@ sub display_existing_roles { $carea.='Section: '.$3; $sortkey.="\0$3"; if (!$allowed) { - if ($env{'request.course.sec'} eq $3) { - if (&Apache::lonnet::allowed('c'.$role_code,$1.'/'.$2.'/'.$3)) { - $allowed = 1; - } - } + if ($env{'request.course.sec'} eq $3) { + if (&Apache::lonnet::allowed('c'.$role_code,$1.'/'.$2.'/'.$3)) { + $allowed = 1; + } + } } } $area=$carea; @@ -1554,8 +1554,8 @@ sub display_existing_roles { # Determine if current user is able to revoke privileges if ($area=~m{^/($match_domain)/}) { if ((&Apache::lonnet::allowed('c'.$role_code,$1)) || - (&Apache::lonnet::allowed('c'.$role_code,$ccdomain))) { - $allowed=1; + (&Apache::lonnet::allowed('c'.$role_code,$ccdomain))) { + $allowed=1; } if (((&Apache::lonnet::allowed('dro',$1)) || (&Apache::lonnet::allowed('dro',$ccdomain))) && @@ -1619,7 +1619,7 @@ sub display_existing_roles { '
'; - if (exists($menu_item->{'help'})) { - $menu_html.= - &Apache::loncommon::help_open_topic($menu_item->{'help'}); - } - $menu_html.=''; - if (exists($menu_item->{'url'})) { - $menu_html.=qq{}; - } else { - $menu_html.= - qq{}; } - $menu_html.= &mt($menu_item->{'text'}).''; - $menu_html.='
' + .&mt('There are no records to display.') + .'
'; + if (($curr->{'page'} > 1) || ($more_records)) { + if ($curr->{'page'} > 1) { + $nav_links .= ' '; + } + if ($more_records) { + $nav_links .= ''; + } } - } else { - $r->print('
'. - &mt('There are no records to display'). - '
' + $output .= '
' .&mt('Only changes made from servers running LON-CAPA [_1] or later are displayed.' ,'2.6.99.0'); if ($version) { $output .= ' '.&mt('This LON-CAPA server is version [_1]',$version); } - $output .= '