[LON-CAPA-cvs] cvs: loncom /interface createaccount.pm
raeburn
raeburn at source.lon-capa.org
Thu Sep 29 09:34:33 EDT 2011
raeburn Thu Sep 29 13:34:33 2011 EDT
Modified files:
/loncom/interface createaccount.pm
Log:
- Bug 6514.
Self-creation for institutional/SSO auth in domains with no defined
usertypes needs default.
Index: loncom/interface/createaccount.pm
diff -u loncom/interface/createaccount.pm:1.46 loncom/interface/createaccount.pm:1.47
--- loncom/interface/createaccount.pm:1.46 Tue Jan 11 16:58:27 2011
+++ loncom/interface/createaccount.pm Thu Sep 29 13:34:32 2011
@@ -3,7 +3,7 @@
# institutional log-in ID (institutional authentication required - localauth
# or kerberos) or an e-mail address.
#
-# $Id: createaccount.pm,v 1.46 2011/01/11 16:58:27 raeburn Exp $
+# $Id: createaccount.pm,v 1.47 2011/09/29 13:34:32 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -795,6 +795,17 @@
if (ref($usercreation->{'cancreate'}) eq 'HASH') {
if (ref($usercreation->{'cancreate'}{'statustocreate'}) eq 'ARRAY') {
@statustocreate = @{$usercreation->{'cancreate'}{'statustocreate'}};
+ if (@statustocreate == 0) {
+ my ($othertitle,$usertypes,$types) =
+ &Apache::loncommon::sorted_inst_types($domain);
+ if (ref($types) eq 'ARRAY') {
+ if (@{$types} == 0) {
+ @statustocreate = ('default');
+ }
+ } else {
+ @statustocreate = ('default');
+ }
+ }
} else {
@statustocreate = ('default');
my ($othertitle,$usertypes,$types) =
@@ -973,7 +984,7 @@
}
}
if ($checkfail) {
- $msg = '<h4>'.&mt('Account creation unavailable').'</h4>';
+ $msg = '<br /><h4>'.&mt('Account creation unavailable').'</h4>';
if ($checkfail eq 'username') {
$msg .= '<span class="LC_warning">'.
&mt('A LON-CAPA account may not be created with the username you use.').
@@ -999,7 +1010,7 @@
if ($rowcount) {
if ($editable) {
if ($courseid ne '') {
- $msg = '<h4>'.&mt('User information').'</h4>';
+ $msg = '<br /><h4>'.&mt('User information').'</h4>';
}
$msg .= &mt('To create one, use the table below to provide information about yourself, then click the [_1]Create LON-CAPA account[_2] button.','<span class="LC_cusr_emph">','</span>').'<br />';
} else {
More information about the LON-CAPA-cvs
mailing list