Diff for /loncom/interface/lonuserutils.pm between versions 1.192 and 1.193

version 1.192, 2017/11/04 20:23:23 version 1.193, 2017/11/04 20:59:39
Line 1132  sub print_upload_manager_form { Line 1132  sub print_upload_manager_form {
             &Apache::loncommon::load_tmp_file($r,$datatoken);              &Apache::loncommon::load_tmp_file($r,$datatoken);
         }          }
     }      }
       if ($datatoken eq '') {
           $r->print('<p class="LC_error">'.&mt('Error').': '.
                     &mt('Invalid datatoken').'</p>');
           return 'missingdata';
       }
     my @records=&Apache::loncommon::upfile_record_sep();      my @records=&Apache::loncommon::upfile_record_sep();
     if($env{'form.noFirstLine'}){      if($env{'form.noFirstLine'}){
         $firstLine=shift(@records);          $firstLine=shift(@records);
Line 1214  sub print_upload_manager_form { Line 1219  sub print_upload_manager_form {
     }      }
     &print_upload_manager_footer($r,$i,$keyfields,$defdom,$today,$halfyear,      &print_upload_manager_footer($r,$i,$keyfields,$defdom,$today,$halfyear,
                                  $context,$permission,$crstype,$showcredits);                                   $context,$permission,$crstype,$showcredits);
       return 'ok';
 }  }
   
 sub setup_date_selectors {  sub setup_date_selectors {
Line 4179  sub upfile_drop_add { Line 4185  sub upfile_drop_add {
                     $r->print('<span class="LC_error">'.&mt('Error').': '.                      $r->print('<span class="LC_error">'.&mt('Error').': '.
                               &mt('Enrollment of users not permitted for specified default domain: [_1].',                                &mt('Enrollment of users not permitted for specified default domain: [_1].',
                                   &Apache::lonnet::domain($env{'form.defaultdomain'},'description')).'</span>');                                    &Apache::lonnet::domain($env{'form.defaultdomain'},'description')).'</span>');
                     return;                      return 'untrusted';
                 }                  }
             }              }
         } elsif ($context eq 'author') {          } elsif ($context eq 'author') {
Line 4193  sub upfile_drop_add { Line 4199  sub upfile_drop_add {
                     $r->print('<span class="LC_error">'.&mt('Error').': '.                      $r->print('<span class="LC_error">'.&mt('Error').': '.
                               &mt('Addition of users not permitted for specified default domain: [_1].',                                &mt('Addition of users not permitted for specified default domain: [_1].',
                                   &Apache::lonnet::domain($env{'form.defaultdomain'},'description')).'</span>');                                    &Apache::lonnet::domain($env{'form.defaultdomain'},'description')).'</span>');
                     return;                      return 'untrusted';
                 }                  }
             }              }
         } elsif (($context eq 'domain') && ($setting eq 'domain')) {          } elsif (($context eq 'domain') && ($setting eq 'domain')) {
Line 4206  sub upfile_drop_add { Line 4212  sub upfile_drop_add {
                     $r->print('<span class="LC_error">'.&mt('Error').': '.                      $r->print('<span class="LC_error">'.&mt('Error').': '.
                               &mt('Addition of users not permitted for specified default domain: [_1].',                                &mt('Addition of users not permitted for specified default domain: [_1].',
                                   &Apache::lonnet::domain($env{'form.defaultdomain'},'description')).'</span>');                                    &Apache::lonnet::domain($env{'form.defaultdomain'},'description')).'</span>');
                     return;                      return 'untrusted';
                 }                  }
             }              }
         }          }
Line 4219  sub upfile_drop_add { Line 4225  sub upfile_drop_add {
     } else {      } else {
         my %home_servers = &Apache::lonnet::get_servers($defdom,'library');          my %home_servers = &Apache::lonnet::get_servers($defdom,'library');
         if (! exists($home_servers{$desiredhost})) {          if (! exists($home_servers{$desiredhost})) {
             $r->print('<span class="LC_error">'.&mt('Error').': '.              $r->print('<p class="LC_error">'.&mt('Error').': '.
                       &mt('Invalid home server specified').'</span>');                        &mt('Invalid home server specified').'</p>');
             return;              return 'invalidhome';
         }          }
     }      }
     # Determine authentication mechanism      # Determine authentication mechanism
Line 4248  sub upfile_drop_add { Line 4254  sub upfile_drop_add {
     }      }
     if ($amode =~ /^krb/) {      if ($amode =~ /^krb/) {
         if (! defined($genpwd) || $genpwd eq '') {          if (! defined($genpwd) || $genpwd eq '') {
             $r->print('<span class="Error">'.': '.              $r->print('<span class="Error">'.
                       &mt('Unable to enroll users').' '.                        &mt('Unable to enroll users').' '.
                       &mt('No Kerberos domain was specified.').'</span></p>');                        &mt('No Kerberos domain was specified.').'</span></p>');
             $amode = ''; # This causes the loop below to be skipped              $amode = ''; # This causes the loop below to be skipped
Line 4321  sub upfile_drop_add { Line 4327  sub upfile_drop_add {
             }              }
         }          }
     }      }
       if ($datatoken eq '') {
           $r->print('<p class="LC_error">'.&mt('Error').': '.
                     &mt('Invalid datatoken').'</p>');
           return 'missingdata';
       }
     if ( $domain eq &LONCAPA::clean_domain($domain)      if ( $domain eq &LONCAPA::clean_domain($domain)
         && ($amode ne '')) {          && ($amode ne '')) {
         #######################################          #######################################
Line 4934  sub upfile_drop_add { Line 4945  sub upfile_drop_add {
             }              }
         }          }
     } # end of unless      } # end of unless
       return 'ok';
 }  }
   
 sub print_namespacing_alerts {  sub print_namespacing_alerts {

Removed from v.1.192  
changed lines
  Added in v.1.193


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