--- loncom/interface/lonuserutils.pm 2017/11/04 16:13:31 1.191 +++ loncom/interface/lonuserutils.pm 2017/11/04 20:23:23 1.192 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Utility functions for managing LON-CAPA user accounts # -# $Id: lonuserutils.pm,v 1.191 2017/11/04 16:13:31 raeburn Exp $ +# $Id: lonuserutils.pm,v 1.192 2017/11/04 20:23:23 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -4133,10 +4133,6 @@ sub upfile_drop_add { $fields{$env{'form.f'.$i}}=$keyfields[$i]; } } - if ($env{'form.fullup'} ne 'yes') { - $r->print('
'."\n". - ''); - } # # Store the field choices away my @storefields = qw/username names fname mname lname gen id @@ -4180,12 +4176,9 @@ sub upfile_drop_add { if (&Apache::lonnet::will_trust('enroll',$crsdom,$env{'form.defaultdomain'})) { $domain = $env{'form.defaultdomain'}; } else { - $r->print(''.&mt('Error'). + $r->print(''.&mt('Error').': '. &mt('Enrollment of users not permitted for specified default domain: [_1].', &Apache::lonnet::domain($env{'form.defaultdomain'},'description')).''); - if ($env{'form.fullup'} ne 'yes') { - $r->print(''); - } return; } } @@ -4197,12 +4190,9 @@ sub upfile_drop_add { (&Apache::lonnet::will_trust('coaurem',$env{'form.defaultdomain'},$defdom))) { $domain = $env{'form.defaultdomain'}; } else { - $r->print(''.&mt('Error'). + $r->print(''.&mt('Error').': '. &mt('Addition of users not permitted for specified default domain: [_1].', &Apache::lonnet::domain($env{'form.defaultdomain'},'description')).''); - if ($env{'form.fullup'} ne 'yes') { - $r->print(''); - } return; } } @@ -4213,12 +4203,9 @@ sub upfile_drop_add { if (&Apache::lonnet::will_trust('domroles',$defdom,$env{'form.defaultdomain'})) { $domain = $env{'form.defaultdomain'}; } else { - $r->print(''.&mt('Error'). + $r->print(''.&mt('Error').': '. &mt('Addition of users not permitted for specified default domain: [_1].', &Apache::lonnet::domain($env{'form.defaultdomain'},'description')).''); - if ($env{'form.fullup'} ne 'yes') { - $r->print(''); - } return; } } @@ -4232,11 +4219,8 @@ sub upfile_drop_add { } else { my %home_servers = &Apache::lonnet::get_servers($defdom,'library'); if (! exists($home_servers{$desiredhost})) { - $r->print(''.&mt('Error'). + $r->print(''.&mt('Error').': '. &mt('Invalid home server specified').''); - if ($env{'form.fullup'} ne 'yes') { - $r->print(''); - } return; } } @@ -4264,7 +4248,7 @@ sub upfile_drop_add { } if ($amode =~ /^krb/) { if (! defined($genpwd) || $genpwd eq '') { - $r->print(''. + $r->print(''.': '. &mt('Unable to enroll users').' '. &mt('No Kerberos domain was specified.').'

'); $amode = ''; # This causes the loop below to be skipped @@ -4912,7 +4896,9 @@ sub upfile_drop_add { "

\n"); if ($counts{'role'} > 0) { $r->print("

\n". - &mt('Roles added for [quant,_1,user].',$counts{'role'}).' '.&mt('If a user is currently logged-in to LON-CAPA, any new roles which are active will be available when the user next logs in.')."

\n"); + &mt('Roles added for [quant,_1,user].',$counts{'role'}).' '. + &mt('If a user is currently logged-in to LON-CAPA, any new roles which are active will be available when the user next logs in.'). + "

\n"); } else { $r->print('

'.&mt('No roles added').'

'); } @@ -4930,10 +4916,9 @@ sub upfile_drop_add { # Get current classlist my $classlist = &Apache::loncoursedata::get_classlist(); if (! defined($classlist)) { - $r->print('
'. - ''. - '

'.&mt('There are no students with current/future access to the course.').'

'. - '
'."\n"); + $r->print('

'. + &mt('There are no students with current/future access to the course.'). + '

'."\n"); } elsif (ref($classlist) eq 'HASH') { # Remove the students we just added from the list of students. foreach my $line (@userdata) { @@ -4949,9 +4934,6 @@ sub upfile_drop_add { } } } # end of unless - if ($env{'form.fullup'} ne 'yes') { - $r->print(''); - } } sub print_namespacing_alerts {