- Check as many as you wish in response to the essay problem. ");
- $r->print("Files selected from other directories: ");
- foreach (&Apache::lonnet::files_not_in_path($env{'user.name'}, $env{'form.currentpath'})) {
- $r->print($_." ");
+ Check as many as you wish in response to the problem. ");
+ my @otherfiles=&Apache::lonnet::files_not_in_path($env{'user.name'}, $env{'form.currentpath'});
+ if (@otherfiles) {
+ $r->print("Files selected from other directories: ");
+ foreach my $file (@otherfiles) {
+ $r->print($file." ");
+ }
}
}
sub upload {
@@ -418,8 +441,8 @@ sub upload {
}
}
my $current_disk_usage = &Apache::lonnet::diskusage($env{'user.domain'}, $env{'user.name'},$portfolio_root);
- if ((($current_disk_usage/1000) + $filesize) > $disk_quota){
- $r->print('Unable to upload '.$fname.' (size = '.$filesize.' kilobytes. Disk quota will be exceeded.'.
+ if (($current_disk_usage + $filesize) > $disk_quota){
+ $r->print('Unable to upload '.$fname.' (size = '.$filesize.' kilobytes). Disk quota will be exceeded.'.
' Disk quota is '.$disk_quota.' kilobytes. Your current disk usage is '.$current_disk_usage.' kilobytes.');
$r->print(&done('Back'));
}
@@ -529,7 +552,7 @@ sub handler {
$r->print(&Apache::loncommon::bodytag('Portfolio Manager'));
}
$r->rflush();
- if (($env{'form.storeupl'} eq 'Upload') & (!$env{'form.uploaddoc.filename'})){
+ if (($env{'form.storeupl'}) & (!$env{'form.uploaddoc.filename'})){
$r->print(' No file was selected to upload.'.
'To upload a file, click Browse...'.
', select a file, then click Upload,');