--- loncom/interface/lonuserutils.pm 2017/11/01 02:51:07 1.184.2.1 +++ loncom/interface/lonuserutils.pm 2018/09/14 20:52:35 1.184.4.1 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Utility functions for managing LON-CAPA user accounts # -# $Id: lonuserutils.pm,v 1.184.2.1 2017/11/01 02:51:07 raeburn Exp $ +# $Id: lonuserutils.pm,v 1.184.4.1 2018/09/14 20:52:35 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1126,6 +1126,11 @@ sub print_upload_manager_form { &Apache::loncommon::load_tmp_file($r,$datatoken); } } + if ($datatoken eq '') { + $r->print('
'.&mt('Error').': '. + &mt('Invalid datatoken').'
'); + return 'missingdata'; + } my @records=&Apache::loncommon::upfile_record_sep(); if($env{'form.noFirstLine'}){ $firstLine=shift(@records); @@ -1208,6 +1213,7 @@ sub print_upload_manager_form { } &print_upload_manager_footer($r,$i,$keyfields,$defdom,$today,$halfyear, $context,$permission,$crstype,$showcredits); + return 'ok'; } sub setup_date_selectors { @@ -4126,10 +4132,6 @@ sub upfile_drop_add { $fields{$env{'form.f'.$i}}=$keyfields[$i]; } } - if ($env{'form.fullup'} ne 'yes') { - $r->print(''."\n"); + $r->print(''. + &mt('There are no students with current/future access to the course.'). + '
'."\n"); } elsif (ref($classlist) eq 'HASH') { # Remove the students we just added from the list of students. foreach my $line (@userdata) { @@ -4866,9 +4874,7 @@ sub upfile_drop_add { } } } # end of unless - if ($env{'form.fullup'} ne 'yes') { - $r->print(''); - } + return 'ok'; } sub print_namespacing_alerts {