--- loncom/interface/loncreateuser.pm 2009/11/28 21:33:53 1.329 +++ loncom/interface/loncreateuser.pm 2009/12/15 16:40:31 1.330 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.329 2009/11/28 21:33:53 raeburn Exp $ +# $Id: loncreateuser.pm,v 1.330 2009/12/15 16:40:31 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -935,7 +935,7 @@ sub print_user_modification_page { ); my $response; if ($env{'form.origform'} eq 'crtusername') { - $response = ''.&mt('No match was found for the username ([_1]) in LON-CAPA domain: [_2]',$ccuname,$ccdomain). + $response = ''.&mt('No match found for the username [_1] in LON-CAPA domain: [_2]',''.$ccuname.'',$ccdomain). '
'; } $response .= '

' @@ -5861,12 +5861,12 @@ sub build_search_response { my ($context,$srch,%srch_results) = @_; my ($currstate,$response,$forcenewuser); my %names = ( - 'uname' => 'username', - 'lastname' => 'last name', + 'uname' => 'username', + 'lastname' => 'last name', 'lastfirst' => 'last name, first name', - 'crs' => 'this course', - 'dom' => 'LON-CAPA domain: ', - 'instd' => 'the institutional directory for domain: ', + 'crs' => 'this course', + 'dom' => 'LON-CAPA domain', + 'instd' => 'the institutional directory for domain', ); my %single = ( @@ -5886,14 +5886,20 @@ sub build_search_response { $currstate = 'modify'; $response = &mt("$single{$srch->{'srchtype'}} was found for the $names{$srch->{'srchby'}} ([_1]) in $names{$srch->{'srchin'}}.",$srch->{'srchterm'}); if ($srch->{'srchin'} eq 'dom' || $srch->{'srchin'} eq 'instd') { - $response .= &display_domain_info($srch->{'srchdomain'}); + $response .= ': '.&display_domain_info($srch->{'srchdomain'}); } - } else { - $response = ''.&mt("$nomatch{$srch->{'srchtype'}} found for the $names{$srch->{'srchby'}} ([_1]) in $names{$srch->{'srchin'}}",$srch->{'srchterm'}); + } else { # Search has nothing found. Prepare message to user. + $response = ''; if ($srch->{'srchin'} eq 'dom' || $srch->{'srchin'} eq 'instd') { - $response .= &display_domain_info($srch->{'srchdomain'}); + $response .= &mt("$nomatch{$srch->{'srchtype'}} found for the $names{$srch->{'srchby'}} [_1] in $names{$srch->{'srchin'}}: [_2]", + ''.$srch->{'srchterm'}.'', + &display_domain_info($srch->{'srchdomain'})); + } else { + $response .= &mt("$nomatch{$srch->{'srchtype'}} found for the $names{$srch->{'srchby'}} [_1] in $names{$srch->{'srchin'}}.", + ''.$srch->{'srchterm'}.''); } $response .= ''; + if ($srch->{'srchin'} ne 'alc') { $forcenewuser = 1; my $cansrchinst = 0;