[LON-CAPA-cvs] cvs: loncom /interface createaccount.pm
raeburn
raeburn at source.lon-capa.org
Tue Feb 18 12:45:11 EST 2025
raeburn Tue Feb 18 17:45:11 2025 EDT
Modified files:
/loncom/interface createaccount.pm
Log:
- Following changes in rev. 1.73, if account creation available for both
institutional authentication and e-mail address based verification, londes.js
is needed (separately) for login form when "Choose your affiliation" box
displayed for e-mail users.
Index: loncom/interface/createaccount.pm
diff -u loncom/interface/createaccount.pm:1.89 loncom/interface/createaccount.pm:1.90
--- loncom/interface/createaccount.pm:1.89 Tue Feb 18 02:38:06 2025
+++ loncom/interface/createaccount.pm Tue Feb 18 17:45:11 2025
@@ -4,7 +4,7 @@
# kerberos, or SSO) or an e-mail address. Requests to use an e-mail address as
# username may be processed automatically, or may be queued for approval.
#
-# $Id: createaccount.pm,v 1.89 2025/02/18 02:38:06 raeburn Exp $
+# $Id: createaccount.pm,v 1.90 2025/02/18 17:45:11 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -159,7 +159,7 @@
my ($cancreate,$statustocreate,$statusforemail,$emailusername,
$emailoptions,$verification,$emaildomain,$types,$usertypes,$othertitle) =
&get_creation_controls($domain,$domconfig{'usercreation'});
- my $pagetitle;
+ my ($pagetitle,$need_affiliation);
if (ref($cancreate) eq 'ARRAY') {
unless (($env{'form.token'}) || ($sso_username ne '') || ($env{'form.phase'}) ||
($env{'form.create_with_email'})) {
@@ -172,6 +172,7 @@
if ((@{$cancreate} == 1) && (@{$statusforemail} > 0)) {
$pagetitle = 'Select affiliation';
}
+ $need_affiliation = 1;
} else {
$js .= &username_js();
}
@@ -334,7 +335,8 @@
} elsif (!$token) {
&print_header($r,$start_page,$courseid,$pagetitle);
my $now=time;
- if ((grep(/^login$/,@{$cancreate})) && (!grep(/^email$/,@{$cancreate}))) {
+ if ((grep(/^login$/,@{$cancreate})) &&
+ ((!grep(/^email$/,@{$cancreate})) || ($need_affiliation))) {
if (open(my $jsh,"<","$include/londes.js")) {
while(my $line = <$jsh>) {
$r->print($line);
More information about the LON-CAPA-cvs
mailing list