[LON-CAPA-cvs] cvs: loncom /interface loncreateuser.pm

raeburn raeburn@source.lon-capa.org
Mon, 05 Jan 2009 15:37:21 -0000


raeburn		Mon Jan  5 15:37:21 2009 EDT

  Modified files:              
    /loncom/interface	loncreateuser.pm 
  Log:
  - Where the proposed username for a new user matches a format rule defined for the domain which specifies either int or loc authentication, provide a textbox to enter the autharg unless authparmfixed is true for the format rule as specified in localenroll::username_rules().
  
  
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.272 loncom/interface/loncreateuser.pm:1.273
--- loncom/interface/loncreateuser.pm:1.272	Sun Dec 28 22:12:10 2008
+++ loncom/interface/loncreateuser.pm	Mon Jan  5 15:37:21 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Create a user
 #
-# $Id: loncreateuser.pm,v 1.272 2008/12/28 22:12:10 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.273 2009/01/05 15:37:21 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -769,8 +769,9 @@
                     my $authtype = $rules->{$matchedrule}{'authtype'};
                     if ($authtype !~ /^(krb4|krb5|int|fsys|loc)$/) {
                         $r->print(&Apache::lonuserutils::set_login($ccdomain,$authformkrb,$authformint,$authformloc));
-                    } else { 
+                    } else {
                         my $authparm = $rules->{$matchedrule}{'authparm'};
+                        $authmsg = $rules->{$matchedrule}{'authmsg'};
                         if ($authtype =~ /^krb(4|5)$/) {
                             my $ver = $1;
                             if ($authparm ne '') {
@@ -779,7 +780,6 @@
 <input type="hidden" name="krbver" value="$ver" />
 <input type="hidden" name="krbarg" value="$authparm" />
 KERB
-                                $authmsg = $rules->{$matchedrule}{'authmsg'};    
                             }
                         } else {
                             $fixedauth = 
@@ -788,8 +788,16 @@
                                 $fixedauth .=    
 '<input type="hidden" name="'.$authtype.'arg" value="'.$authparm.'" />'."\n";
                             } else {
-                                $varauth =  
+                                if ($authtype eq 'int') {
+                                    $varauth = '<br />'.
+&mt('[_1] Internally authenticated (with initial password [_2])','','<input type="password" size="10" name="intarg" value="" />')."<label><input type=\"checkbox\" name=\"visible\" onClick='if (this.checked) { this.form.intarg.type=\"text\" } else { this.form.intarg.type=\"password\" }' />".&mt('Visible input').'</label>';
+                                } elsif ($authtype eq 'loc') {
+                                    $varauth = '<br />'.
+&mt('[_1] Local Authentication with argument [_2]','','<input type="text" name="'.$authtype.'arg" value="" />')."\n";
+                                } else {
+                                    $varauth =
 '<input type="text" name="'.$authtype.'arg" value="" />'."\n";
+                                }
                             }
                         }
                     }