--- loncom/interface/loncreateuser.pm 2019/04/29 22:19:24 1.451
+++ loncom/interface/loncreateuser.pm 2021/12/11 17:26:21 1.457
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Create a user
#
-# $Id: loncreateuser.pm,v 1.451 2019/04/29 22:19:24 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.457 2021/12/11 17:26:21 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -71,6 +71,7 @@ use Apache::longroup;
use Apache::lonuserutils;
use Apache::loncoursequeueadmin;
use LONCAPA qw(:DEFAULT :match);
+use HTML::Entities;
my $loginscript; # piece of javascript used in two separate instances
my $authformnop;
@@ -2441,8 +2442,8 @@ sub modify_login_block {
}
sub personal_data_display {
- my ($ccuname,$ccdomain,$newuser,$context,$inst_results,$rolesarray,
- $now,$captchaform,$emailusername,$usertype,$usernameset,$condition,$excluded) = @_;
+ my ($ccuname,$ccdomain,$newuser,$context,$inst_results,$rolesarray,$now,
+ $captchaform,$emailusername,$usertype,$usernameset,$condition,$excluded,$showsubmit) = @_;
my ($output,%userenv,%canmodify,%canmodify_status);
my @userinfo = ('firstname','middlename','lastname','generation',
'permanentemail','id');
@@ -2567,10 +2568,11 @@ sub personal_data_display {
if ($usernameset eq 'free') {
my $onclick = "toggleUsernameDisp(this,'selfcreateusername');";
$output .= &Apache::lonhtmlcommon::row_title($lt{'username'},undef,'LC_oddrow_value')."\n".
- &mt('Use e-mail address: ').
- ''."\n".
- (' 'x2).
- ''."\n".
+ ''.&mt('Use e-mail address: ').
+ ''.(' 'x2).
+ ''."\n".
'
'.
'
'.&mt('Preferred username').
' '.
@@ -2678,12 +2680,17 @@ sub personal_data_display {
&Apache::lonhtmlcommon::row_closure(1);
$rowcount ++;
}
- my $submit_text = &mt('Create account');
- $output .= &Apache::lonhtmlcommon::row_title()."\n".
- '
'.
- ''.
- &Apache::lonhtmlcommon::row_closure(1);
+ if ($showsubmit) {
+ my $submit_text = &mt('Create account');
+ $output .= &Apache::lonhtmlcommon::row_title()."\n".
+ '
';
+ if ($usertype ne '') {
+ $output .= '';
+ }
+ $output .= &Apache::lonhtmlcommon::row_closure(1);
+ }
}
$output .= &Apache::lonhtmlcommon::end_pick_box();
if (wantarray) {
@@ -3036,7 +3043,7 @@ sub update_user_data {
$env{'form.ccdomain'},$env{'form.ccuname'});
}
}
- $r->print('
'.&mt('Home server').': '.$uhome.' '.
+ $r->print('
'.&mt('Home Server').': '.$uhome.' '.
&Apache::lonnet::hostname($uhome));
} elsif (($env{'form.login'} ne 'nochange') &&
($env{'form.login'} ne '' )) {
@@ -3051,11 +3058,11 @@ sub update_user_data {
&Apache::lonnet::modifyuserauth(
$env{'form.ccdomain'},$env{'form.ccuname'},
$amode,$genpwd));
- $r->print('
'.&mt('Home server').': '.&Apache::lonnet::homeserver
+ $r->print('
'.&mt('Home Server').': '.&Apache::lonnet::homeserver
($env{'form.ccuname'},$env{'form.ccdomain'}));
} else {
# Okay, this is a non-fatal error.
- $r->print($error.&mt('You do not have the authority to modify this users authentication information.').$end);
+ $r->print($error.&mt('You do not have privileges to modify the authentication configuration for this user.').$end);
}
} elsif (($env{'form.intarg'} ne '') &&
(&Apache::lonnet::queryauthenticate($env{'form.ccuname'},$env{'form.ccdomain'}) =~ /^internal:/) &&
@@ -7147,9 +7154,10 @@ ENDSCRIPT
my ($nav_script,$nav_links);
# table header
- my $tableheader = ''.
+ my $heading = ''.
&mt('User access logs for: [_1]',
- &Apache::loncommon::aboutmewrapper(&Apache::loncommon::plainname($uname,$udom),$uname,$udom)).'
'
+ &Apache::loncommon::aboutmewrapper(&Apache::loncommon::plainname($uname,$udom),$uname,$udom)).'
';
+ my $tableheader = $heading
.&Apache::loncommon::start_data_table_header_row()
.' | '
.'
'.&mt('When').' | '
@@ -7267,7 +7275,7 @@ ENDSCRIPT
$r->print(&Apache::loncommon::end_data_table().
&userlogdisplay_navlinks(\%curr,$more_records));
} else { # No content displayed above
- $r->print('
'
+ $r->print($heading.'
'
.&mt('There are no records to display.')
.'
');
}
@@ -7456,12 +7464,12 @@ sub role_display_filter {
&mt('Context:').'