Diff for /loncom/interface/loncreateuser.pm between versions 1.92 and 1.96

version 1.92, 2004/12/28 05:01:44 version 1.96, 2005/01/11 21:46:52
Line 73  my $authformint; Line 73  my $authformint;
 my $authformfsys;  my $authformfsys;
 my $authformloc;  my $authformloc;
   
 BEGIN {  sub initialize_authen_forms {
     $ENV{'SERVER_NAME'}=~/(\w+\.\w+)$/;      my ($krbdefdom)=( $ENV{'SERVER_NAME'}=~/(\w+\.\w+)$/);
     my $krbdefdom=$1;      $krbdefdom= uc($krbdefdom);
     $krbdefdom=~tr/a-z/A-Z/;  
     my %param = ( formname => 'document.cu',      my %param = ( formname => 'document.cu',
                   kerb_def_dom => $krbdefdom                     kerb_def_dom => $krbdefdom 
                   );                    );
Line 397  ENDFORMINFO Line 396  ENDFORMINFO
                     'lg'   => "Login Data"                      'lg'   => "Login Data"
        );         );
  my $genhelp=&Apache::loncommon::help_open_topic('Generation');   my $genhelp=&Apache::loncommon::help_open_topic('Generation');
           &initialize_authen_forms();
  $r->print(<<ENDNEWUSER);   $r->print(<<ENDNEWUSER);
 $dochead  $dochead
 <h1>$lt{'cnu'}</h1>  <h1>$lt{'cnu'}</h1>
Line 674  END Line 674  END
  $currentauth=~/^localauth:/   $currentauth=~/^localauth:/
  ) { # bad authentication scheme   ) { # bad authentication scheme
     if (&Apache::lonnet::allowed('mau',$ENV{'request.role.domain'})) {      if (&Apache::lonnet::allowed('mau',$ENV{'request.role.domain'})) {
                   &initialize_authen_forms();
  my %lt=&Apache::lonlocal::texthash(   my %lt=&Apache::lonlocal::texthash(
                                'err'   => "ERROR",                                 'err'   => "ERROR",
        'uuas'  => "This user has an unrecognized authentication scheme",         'uuas'  => "This user has an unrecognized authentication scheme",
Line 715  ENDBADAUTH Line 716  ENDBADAUTH
         } else { # Authentication type is valid          } else { # Authentication type is valid
     my $authformcurrent='';      my $authformcurrent='';
     my $authform_other='';      my $authform_other='';
               &initialize_authen_forms();
     if ($currentauth=~/^krb(4|5):/) {      if ($currentauth=~/^krb(4|5):/) {
  $authformcurrent=$authformkrb;   $authformcurrent=$authformkrb;
  $authform_other="<p>$authformint</p>\n".   $authform_other="<p>$authformint</p>\n".
Line 1235  END Line 1237  END
                         $r->print(&commit_standardrole($url,$2,$start,$end,$1,undef,''));                          $r->print(&commit_standardrole($url,$2,$start,$end,$1,undef,''));
                     }                      }
                 }                  }
  # Assign the role and report it.  
  $r->print(&mt('Assigning').' '.$2.' in '.$url.': '.  
                          ($start?', '.&mt('starting').' '.localtime($start):'').  
                          ($end?', '.&mt('ending').' '.localtime($end):'').': <b>'.  
                           &Apache::lonnet::assignrole(  
                               $ENV{'form.ccdomain'},$ENV{'form.ccuname'},  
                               $url,$2,$end,$start)  
   .'</b><br>');  
     } else {      } else {
  $r->print('<p>'.&mt('ERROR').': '.&mt('Unknown command').' <tt>'.$_.'</tt></p><br>');   $r->print('<p>'.&mt('ERROR').': '.&mt('Unknown command').' <tt>'.$_.'</tt></p><br>');
             }              }
Line 1714  sub course_sections { Line 1708  sub course_sections {
     if ($num_sections == 1) {      if ($num_sections == 1) {
         $output = '<select name="currsec_'.$role.'" >'."\n".          $output = '<select name="currsec_'.$role.'" >'."\n".
                   '  <option value="">Select</option>'."\n".                    '  <option value="">Select</option>'."\n".
                     '  <option value="">No section</option>'."\n".
                   '  <option value="'.$sections[0].'" >'.$sections[0].'</option>'."\n";                    '  <option value="'.$sections[0].'" >'.$sections[0].'</option>'."\n";
     } else {      } else {
         $output = '<select name="currsec_'.$role.'" ';          $output = '<select name="currsec_'.$role.'" ';
         my $multiple = 4;          my $multiple = 4;
         if ($num_sections <4) { $multiple = $num_sections; }          if ($num_sections <4) { $multiple = $num_sections; }
         $output .= '"multiple size="'.$multiple.'" >'."\n";          $output .= '"multiple" size="'.$multiple.'">'."\n";
         foreach (@sections) {          foreach (@sections) {
             $output .= '<option value="'.$_.'">'.$_."</option>\n";              $output .= '<option value="'.$_.'">'.$_."</option>\n";
         }          }

Removed from v.1.92  
changed lines
  Added in v.1.96


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>