Diff for /loncom/interface/lonuserutils.pm between versions 1.184.2.1 and 1.184.2.2

version 1.184.2.1, 2017/11/01 02:51:07 version 1.184.2.2, 2017/11/16 17:05:49
Line 1126  sub print_upload_manager_form { Line 1126  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 1208  sub print_upload_manager_form { Line 1213  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 4126  sub upfile_drop_add { Line 4132  sub upfile_drop_add {
             $fields{$env{'form.f'.$i}}=$keyfields[$i];              $fields{$env{'form.f'.$i}}=$keyfields[$i];
         }          }
     }      }
     if ($env{'form.fullup'} ne 'yes') {  
         $r->print('<form name="studentform" method="post" action="/adm/createuser">'."\n".  
                   '<input type="hidden" name="action" value="'.$env{'form.action'}.'" />');  
     }  
     #      #
     # Store the field choices away      # Store the field choices away
     my @storefields = qw/username names fname mname lname gen id       my @storefields = qw/username names fname mname lname gen id 
Line 4174  sub upfile_drop_add { Line 4176  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>');
             $r->print(&Apache::loncommon::end_page());              $r->print(&Apache::loncommon::end_page());
             return;              return 'invalidhome';
         }          }
     }      }
     # Determine authentication mechanism      # Determine authentication mechanism
Line 4277  sub upfile_drop_add { Line 4279  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 4829  sub upfile_drop_add { Line 4836  sub upfile_drop_add {
                   "</p>\n");                    "</p>\n");
         if ($counts{'role'} > 0) {          if ($counts{'role'} > 0) {
             $r->print("<p>\n".              $r->print("<p>\n".
                       &mt('Roles added for [quant,_1,user].',$counts{'role'}).' '.&mt('If a user is currently logged-in to LON-CAPA, any new roles which are active will be available when the user next logs in.')."</p>\n");                        &mt('Roles added for [quant,_1,user].',$counts{'role'}).' '.
                         &mt('If a user is currently logged-in to LON-CAPA, any new roles which are active will be available when the user next logs in.').
                         "</p>\n");
         } else {          } else {
             $r->print('<p>'.&mt('No roles added').'</p>');              $r->print('<p>'.&mt('No roles added').'</p>');
         }          }
Line 4847  sub upfile_drop_add { Line 4856  sub upfile_drop_add {
             #  Get current classlist              #  Get current classlist
             my $classlist = &Apache::loncoursedata::get_classlist();              my $classlist = &Apache::loncoursedata::get_classlist();
             if (! defined($classlist)) {              if (! defined($classlist)) {
                 $r->print('<form name="studentform" method="post" action="/adm/createuser">'.                  $r->print('<p class="LC_info">'.
                           '<input type="hidden" name="action" value="'.$env{'form.action'}.'" />'.                            &mt('There are no students with current/future access to the course.').
                           '<p class="LC_info">'.&mt('There are no students with current/future access to the course.').'</p>'.                            '</p>'."\n");
                           '</form>'."\n");  
             } elsif (ref($classlist) eq 'HASH') {              } elsif (ref($classlist) eq 'HASH') {
                 # Remove the students we just added from the list of students.                  # Remove the students we just added from the list of students.
                 foreach my $line (@userdata) {                  foreach my $line (@userdata) {
Line 4866  sub upfile_drop_add { Line 4874  sub upfile_drop_add {
             }              }
         }          }
     } # end of unless      } # end of unless
     if ($env{'form.fullup'} ne 'yes') {      return 'ok';
         $r->print('</form>');  
     }  
 }  }
   
 sub print_namespacing_alerts {  sub print_namespacing_alerts {

Removed from v.1.184.2.1  
changed lines
  Added in v.1.184.2.2


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