--- loncom/interface/londocs.pm 2013/05/21 19:30:11 1.550
+++ loncom/interface/londocs.pm 2013/07/17 14:18:36 1.554
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.550 2013/05/21 19:30:11 raeburn Exp $
+# $Id: londocs.pm,v 1.554 2013/07/17 14:18:36 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2802,8 +2802,30 @@ sub multiple_check_form {
}
sub process_file_upload {
- my ($upload_output,$coursenum,$coursedom,$allfiles,$codebase,$uploadcmd) = @_;
+ my ($upload_output,$coursenum,$coursedom,$allfiles,$codebase,$uploadcmd,$crstype) = @_;
# upload a file, if present
+ my $filesize = length($env{'form.uploaddoc'});
+ if (!$filesize) {
+ $$upload_output = '
'.
+ &mt('Unable to upload [_1]. (size = [_2] bytes)',
+ ''.$env{'form.uploaddoc.filename'}.'',
+ $filesize).' '.
+ &mt('Either the file you attempted to upload was empty, or your web browser was unable to read its contents.').' '.
+ '