--- loncom/interface/lonuserutils.pm 2017/08/08 15:34:32 1.186
+++ loncom/interface/lonuserutils.pm 2017/11/04 20:23:23 1.192
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Utility functions for managing LON-CAPA user accounts
#
-# $Id: lonuserutils.pm,v 1.186 2017/08/08 15:34:32 raeburn Exp $
+# $Id: lonuserutils.pm,v 1.192 2017/11/04 20:23:23 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -943,14 +943,14 @@ sub print_upload_manager_footer {
&Apache::lonhtmlcommon::row_closure();
}
- my ($trustedref,$untrustedref);
+ my ($trusted,$untrusted);
if ($context eq 'course') {
- ($trustedref,$untrustedref) = &Apache::lonnet::trusted_domains('enroll',$defdom);
+ ($trusted,$untrusted) = &Apache::lonnet::trusted_domains('enroll',$defdom);
} elsif ($context eq 'author') {
- ($trustedref,$untrustedref) = &Apache::lonnet::trusted_domains('othcoau',$defdom);
+ ($trusted,$untrusted) = &Apache::lonnet::trusted_domains('othcoau',$defdom);
}
$Str .= &Apache::lonhtmlcommon::row_title(&mt('Default domain'))
- .&Apache::loncommon::select_dom_form($defdom,'defaultdomain',undef,1,undef,$trustedref,$untrustedref)
+ .&Apache::loncommon::select_dom_form($defdom,'defaultdomain',undef,1,undef,$trusted,$untrusted)
.&Apache::lonhtmlcommon::row_closure();
$Str .= &Apache::lonhtmlcommon::row_title(&mt('Starting and Ending Dates'))
@@ -1127,8 +1127,10 @@ sub print_upload_manager_form {
if (!$env{'form.datatoken'}) {
$datatoken=&Apache::loncommon::upfile_store($r);
} else {
- $datatoken=$env{'form.datatoken'};
- &Apache::loncommon::load_tmp_file($r);
+ $datatoken=&Apache::loncommon::valid_datatoken($env{'form.datatoken'});
+ if ($datatoken ne '') {
+ &Apache::loncommon::load_tmp_file($r,$datatoken);
+ }
}
my @records=&Apache::loncommon::upfile_record_sep();
if($env{'form.noFirstLine'}){
@@ -2342,7 +2344,8 @@ function setCourseCat(formname) {
}
courseSet('$codetitles[1]');
for (var j=0; j
\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.')."
\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.'). + "\n"); } else { $r->print(''.&mt('No roles added').'
'); } @@ -4909,10 +4916,9 @@ sub upfile_drop_add { # Get current classlist my $classlist = &Apache::loncoursedata::get_classlist(); if (! defined($classlist)) { - $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) { @@ -4928,9 +4934,6 @@ sub upfile_drop_add { } } } # end of unless - if ($env{'form.fullup'} ne 'yes') { - $r->print(''); - } } sub print_namespacing_alerts {