--- loncom/interface/loncreateuser.pm 2019/08/27 14:45:04 1.406.2.17
+++ loncom/interface/loncreateuser.pm 2021/12/13 20:53:06 1.406.2.20
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Create a user
#
-# $Id: loncreateuser.pm,v 1.406.2.17 2019/08/27 14:45:04 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.406.2.20 2021/12/13 20:53:06 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;
@@ -2381,8 +2382,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');
@@ -2507,10 +2508,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').
' '.
@@ -2618,12 +2620,16 @@ 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 .= ''.
+ &Apache::lonhtmlcommon::row_closure(1);
+ }
+ }
}
$output .= &Apache::lonhtmlcommon::end_pick_box();
if (wantarray) {
@@ -2973,7 +2979,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 '' )) {
@@ -2988,7 +2994,7 @@ 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.
@@ -7077,9 +7083,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').' | '
@@ -7197,7 +7204,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.')
.'
');
}
@@ -7386,12 +7393,12 @@ sub role_display_filter {
&mt('Context:').'