--- loncom/interface/loncreateuser.pm 2017/08/11 00:24:53 1.446
+++ loncom/interface/loncreateuser.pm 2022/10/18 23:28:00 1.460
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Create a user
#
-# $Id: loncreateuser.pm,v 1.446 2017/08/11 00:24:53 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.460 2022/10/18 23:28:00 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;
@@ -78,6 +79,7 @@ my $authformkrb;
my $authformint;
my $authformfsys;
my $authformloc;
+my $authformlti;
sub initialize_authen_forms {
my ($dom,$formname,$curr_authtype,$mode) = @_;
@@ -88,7 +90,7 @@ sub initialize_authen_forms {
domain => $dom,
);
my %abv_auth = &auth_abbrev();
- if ($curr_authtype =~ /^(krb4|krb5|internal|localauth|unix):(.*)$/) {
+ if ($curr_authtype =~ /^(krb4|krb5|internal|localauth|unix|lti):(.*)$/) {
my $long_auth = $1;
my $curr_autharg = $2;
my %abv_auth = &auth_abbrev();
@@ -107,6 +109,7 @@ sub initialize_authen_forms {
$authformint = &Apache::loncommon::authform_internal(%param);
$authformfsys = &Apache::loncommon::authform_filesystem(%param);
$authformloc = &Apache::loncommon::authform_local(%param);
+ $authformlti = &Apache::loncommon::authform_lti(%param);
}
sub auth_abbrev {
@@ -116,6 +119,7 @@ sub auth_abbrev {
internal => 'int',
localauth => 'loc',
unix => 'fsys',
+ lti => 'lti',
);
return %abv_auth;
}
@@ -243,6 +247,7 @@ sub build_tools_display {
'aboutme' => "Personal Information Page",
'webdav' => "WebDAV access to Authoring Spaces (if SSL and author/co-author)",
'portfolio' => "Personal User Portfolio",
+ 'timezone' => "Can set Time Zone",
'avai' => "Available",
'cusa' => "availability",
'chse' => "Change setting",
@@ -253,14 +258,15 @@ sub build_tools_display {
'community' => 'Can request creation of communities',
'textbook' => 'Can request creation of textbook courses',
'placement' => 'Can request creation of placement tests',
+ 'lti' => 'Can request creation of LTI courses',
'requestauthor' => 'Can request author space',
);
if ($context eq 'requestcourses') {
%userenv = &Apache::lonnet::userenvironment($ccdomain,$ccuname,
'requestcourses.official','requestcourses.unofficial',
'requestcourses.community','requestcourses.textbook',
- 'requestcourses.placement');
- @usertools = ('official','unofficial','community','textbook','placement');
+ 'requestcourses.placement','requestcourses.lti');
+ @usertools = ('official','unofficial','community','textbook','placement','lti');
@options =('norequest','approval','autolimit','validate');
%validations = &Apache::lonnet::auto_courserequest_checks($ccdomain);
%reqtitles = &courserequest_titles();
@@ -282,8 +288,8 @@ sub build_tools_display {
} else {
%userenv = &Apache::lonnet::userenvironment($ccdomain,$ccuname,
'tools.aboutme','tools.portfolio','tools.blog',
- 'tools.webdav');
- @usertools = ('aboutme','blog','webdav','portfolio');
+ 'tools.webdav','tools.timezone');
+ @usertools = ('aboutme','blog','webdav','portfolio','timezone');
}
foreach my $item (@usertools) {
my ($custom_access,$curr_access,$cust_on,$cust_off,$tool_on,$tool_off,
@@ -543,6 +549,7 @@ sub courserequest_titles {
community => 'Communities',
textbook => 'Textbook',
placement => 'Placement Tests',
+ lti => 'LTI Provider',
norequest => 'Not allowed',
approval => 'Approval by Dom. Coord.',
validate => 'With validation',
@@ -1479,17 +1486,21 @@ ENDAUTH
$inst_results{$ccuname.':'.$ccdomain}));
if ((&Apache::lonnet::allowed('ccc',$env{'request.role.domain'})) ||
(&Apache::lonnet::allowed('udp',$env{'request.role.domain'}))) {
- $r->print('
'.$authformcurrent. @@ -2370,8 +2443,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'); @@ -2481,8 +2554,8 @@ sub personal_data_display { } $rowcount ++; $output .= &Apache::lonhtmlcommon::row_closure(1); - my $upassone = ''; - my $upasstwo = ''; + my $upassone = ''; + my $upasstwo = ''; $output .= &Apache::lonhtmlcommon::row_title(&mt('Password').'*', 'LC_pick_box_title', 'LC_oddrow_value')."\n". @@ -2496,10 +2569,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". ' |