[LON-CAPA-cvs] cvs: loncom(version_2_10_X) /interface createaccount.pm

raeburn raeburn at source.lon-capa.org
Thu Sep 29 10:12:21 EDT 2011


raeburn		Thu Sep 29 14:12:21 2011 EDT

  Modified files:              (Branch: version_2_10_X)
    /loncom/interface	createaccount.pm 
  Log:
  - Backport 1.47.
  
  
Index: loncom/interface/createaccount.pm
diff -u loncom/interface/createaccount.pm:1.40.2.3 loncom/interface/createaccount.pm:1.40.2.4
--- loncom/interface/createaccount.pm:1.40.2.3	Fri Dec 24 20:36:11 2010
+++ loncom/interface/createaccount.pm	Thu Sep 29 14:12:21 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.40.2.3 2010/12/24 20:36:11 raeburn Exp $
+# $Id: createaccount.pm,v 1.40.2.4 2011/09/29 14:12:21 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -796,6 +796,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) =
@@ -974,7 +985,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.').
@@ -1000,7 +1011,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