--- loncom/publisher/lonupload.pm 2003/11/08 11:04:52 1.22 +++ loncom/publisher/lonupload.pm 2003/11/08 11:13:50 1.24 @@ -2,7 +2,7 @@ # The LearningOnline Network with CAPA # Handler to upload files into construction space # -# $Id: lonupload.pm,v 1.22 2003/11/08 11:04:52 albertel Exp $ +# $Id: lonupload.pm,v 1.24 2003/11/08 11:13:50 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -94,32 +94,34 @@ sub phaseone { &Debug($r, "Filename for upload: $fn"); if (($fn) && ($fn!~/\/$/)) { - $r->print('
'); + $r->print(''); # Check for bad extension and warn user if ($fn=~/\.(\w+)$/ && (&Apache::loncommon::fileembstyle($1) eq 'hdn')) { - $r->print(''.&mt('The extension on this file,'). + $r->print(''.&mt('The extension on this file,'). ' "'.$1.'"'.&mt(', is reserved internally by LON-CAPA.'). - ''.
+ $r->print(' '.
+ $r->print(' '.
+ ' '.
+ $r->print(' '.
- &mt('Back to Directory').'');
+ $r->print(' '.
+ $r->print(' ');
+ ' ');
+ '
'.
&mt('Back to Directory').'');
} elsif ($fn=~/\.(\w+)$/ &&
!defined(&Apache::loncommon::fileembstyle($1))) {
$r->print(&mt('File').' '.$fn.' '.
&mt('could not be copied.').'
'.
- ''.
+ ''.
&mt('The extension on this file is not recognized by LON-CAPA.').
'');
- $r->print('
'.
&mt('Back to Directory').'');
} elsif (-d $target) {
$r->print('File '.$fn.' could not be copied.
'.
- ''.
+ ''.
&mt('The target is an existing directory.').
- '');
- $r->print('
');
+ $r->print(''.
&mt('Back to Directory').'');
} elsif (copy($source,$target)) {
chmod(0660, $target); # Set permissions to rw-rw---.
$r->print(&mt('File copied.'));
- $r->print('
'.
&mt('View file').'');
- $r->print('
'.
+ &mt('Back to Directory').'
');
} else {
$r->print('Failed to copy: '.$!);
- $r->print('
'.
&mt('Back to Directory').'');
}
}
} else {
- $r->print(''.
+ $r->print(''.
&mt('Please use browser "Back" button and pick a filename').
- '
');
}
} else {
$r->print(''.
&mt('Please use browser "Back" button and pick a filename').
- '
>');
}
}