Diff for /loncom/interface/loncreateuser.pm between versions 1.269 and 1.274

version 1.269, 2008/12/15 00:12:38 version 1.274, 2009/01/16 10:59:48
Line 213  END_SCRIPT Line 213  END_SCRIPT
                     $tool_on = '';                      $tool_on = '';
                 }                  }
             }              }
             $curr_access = &Apache::lonnet::usertools_access($ccuname,$ccdomain,$item);  
             $output .= '  <tr class="LC_info_row">'."\n".              $output .= '  <tr class="LC_info_row">'."\n".
                        '   <td>'.$lt{$item}.'</td>'."\n".                         '   <td>'.$lt{$item}.'</td>'."\n".
                        '  </tr>'."\n".                         '  </tr>'."\n".
Line 770  $lt{'hs'}: $home_server_pick Line 769  $lt{'hs'}: $home_server_pick
                     my $authtype = $rules->{$matchedrule}{'authtype'};                      my $authtype = $rules->{$matchedrule}{'authtype'};
                     if ($authtype !~ /^(krb4|krb5|int|fsys|loc)$/) {                      if ($authtype !~ /^(krb4|krb5|int|fsys|loc)$/) {
                         $r->print(&Apache::lonuserutils::set_login($ccdomain,$authformkrb,$authformint,$authformloc));                          $r->print(&Apache::lonuserutils::set_login($ccdomain,$authformkrb,$authformint,$authformloc));
                     } else {                       } else {
                         my $authparm = $rules->{$matchedrule}{'authparm'};                          my $authparm = $rules->{$matchedrule}{'authparm'};
                           $authmsg = $rules->{$matchedrule}{'authmsg'};
                         if ($authtype =~ /^krb(4|5)$/) {                          if ($authtype =~ /^krb(4|5)$/) {
                             my $ver = $1;                              my $ver = $1;
                             if ($authparm ne '') {                              if ($authparm ne '') {
Line 780  $lt{'hs'}: $home_server_pick Line 780  $lt{'hs'}: $home_server_pick
 <input type="hidden" name="krbver" value="$ver" />  <input type="hidden" name="krbver" value="$ver" />
 <input type="hidden" name="krbarg" value="$authparm" />  <input type="hidden" name="krbarg" value="$authparm" />
 KERB  KERB
                                 $authmsg = $rules->{$matchedrule}{'authmsg'};      
                             }                              }
                         } else {                          } else {
                             $fixedauth =                               $fixedauth = 
Line 789  KERB Line 788  KERB
                                 $fixedauth .=                                      $fixedauth .=    
 '<input type="hidden" name="'.$authtype.'arg" value="'.$authparm.'" />'."\n";  '<input type="hidden" name="'.$authtype.'arg" value="'.$authparm.'" />'."\n";
                             } else {                              } 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";  '<input type="text" name="'.$authtype.'arg" value="" />'."\n";
                                   }
                             }                              }
                         }                          }
                     }                      }
Line 2071  sub update_user_data { Line 2078  sub update_user_data {
                     }                      }
                 } else {                  } else {
                     $changed{$tool} = &tool_admin($tool,'',\%changeHash);                      $changed{$tool} = &tool_admin($tool,'',\%changeHash);
                     print STDERR "for $tool - changed is $changed{$tool}\n";  
                     if ($changed{$tool}) {                      if ($changed{$tool}) {
                         $newaccess{$tool} = &mt('default');                          $newaccess{$tool} = &mt('default');
                     } else {                      } else {
Line 2125  sub update_user_data { Line 2131  sub update_user_data {
                     &Apache::lonnet::put('environment',\%changeHash,                      &Apache::lonnet::put('environment',\%changeHash,
                                   $env{'form.ccdomain'},$env{'form.ccuname'});                                    $env{'form.ccdomain'},$env{'form.ccuname'});
                 if ($chgresult eq 'ok') {                  if ($chgresult eq 'ok') {
                     my %newenvhash;  
                     my $hashid="$env{'form.ccuname'}:$env{'form.ccdomain'}";  
                     foreach my $key (keys(%changed)) {  
                         if ($key ne 'quota') {  
                             &Apache::lonnet::devalidate_cache_new('usertools.'.$key,$hashid);  
                             $newenvhash{'environment.tools.'.$key} =   
                                 $changeHash{'tools.'.$key};  
                         }  
                     }  
                     if (($env{'user.name'} eq $env{'form.ccuname'}) &&                      if (($env{'user.name'} eq $env{'form.ccuname'}) &&
                         ($env{'user.domain'} eq $env{'form.ccdomain'})) {                          ($env{'user.domain'} eq $env{'form.ccdomain'})) {
                         &Apache::lonnet::appenv(\%newenvhash);                          my %newenvhash;
                           foreach my $key (keys(%changed)) {
                               if ($key ne 'quota') {
                                   $newenvhash{'environment.tools.'.$key} = 
                                       $changeHash{'tools.'.$key};
                                   $newenvhash{'environment.availabletools.'.$key} =
                                       $changeHash{'tools.'.$key};
                               }
                           }
                           if (keys(%newenvhash)) {
                               &Apache::lonnet::appenv(\%newenvhash);
                           }
                     }                      }
                 }                  }
             }              }
Line 2603  sub update_roles { Line 2611  sub update_roles {
  $r->print('<p><span class="LC_error">'.&mt('ERROR').': '.&mt('Unknown command').' <tt>'.$key.'</tt></span></p><br />');   $r->print('<p><span class="LC_error">'.&mt('ERROR').': '.&mt('Unknown command').' <tt>'.$key.'</tt></span></p><br />');
             }              }
             foreach my $key (sort(keys(%disallowed))) {              foreach my $key (sort(keys(%disallowed))) {
                   $r->print('<p class="LC_warning">');
                 if (($key eq 'none') || ($key eq 'all')) {                    if (($key eq 'none') || ($key eq 'all')) {  
                     $r->print('<p>'.&mt('[_1] may not be used as the name for a section, as it is a reserved word.',$key));                      $r->print(&mt('[_1] may not be used as the name for a section, as it is a reserved word.','<tt>'.$key.'</tt>'));
                 } else {                  } else {
                     $r->print('<p>'.&mt('[_1] may not be used as the name for a section, as it is the name of a course group.',$key));                      $r->print(&mt('[_1] may not be used as the name for a section, as it is the name of a course group.','<tt>'.$key.'</tt>'));
                 }                  }
                 $r->print(' '.&mt('Please <a href="javascript:history.go(-1)">go back</a> and choose a different section name.').'</p><br />');                  $r->print('</p><p>'
                            .&mt('Please [_1]go back[_2] and choose a different section name.'
                                ,'<a href="javascript:history.go(-1)'
                                ,'</a>')
                            .'</p><br />'
                   );
             }              }
  }   }
     } # End of foreach (keys(%env))      } # End of foreach (keys(%env))
Line 5061  sub update_selfenroll_config { Line 5075  sub update_selfenroll_config {
                         $warning{$item} = &mt('Section for self-enrolled users unchanged as the proposed section is a group').'<br />'.&mt('Group names and section names must be distinct');                          $warning{$item} = &mt('Section for self-enrolled users unchanged as the proposed section is a group').'<br />'.&mt('Group names and section names must be distinct');
                     } elsif ($newval eq 'all') {                      } elsif ($newval eq 'all') {
                         $newval = $curr_val;                          $newval = $curr_val;
                         $warning{$item} = &mt("Section for self-enrolled users unchanged, as 'all' is a reserved section name.");                          $warning{$item} = &mt('Section for self-enrolled users unchanged, as "all" is a reserved section name.');
                     }                      }
                     if ($newval eq '') {                      if ($newval eq '') {
                         $newval = 'none';                          $newval = 'none';

Removed from v.1.269  
changed lines
  Added in v.1.274


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