--- loncom/homework/essayresponse.pm 2004/12/14 18:44:56 1.53
+++ loncom/homework/essayresponse.pm 2004/12/14 20:12:30 1.54
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# essay (ungraded) style responses
#
-# $Id: essayresponse.pm,v 1.53 2004/12/14 18:44:56 banghart Exp $
+# $Id: essayresponse.pm,v 1.54 2004/12/14 20:12:30 banghart Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -65,7 +65,7 @@ sub start_essayresponse {
$result .='';
}
if ($uploadedfiletypes) {
- $result.='
'.&mt('Submit a file:').
+ $result.=' |
'.&mt('Submit a file: (only one file can be uploaded)').
'
'.
@@ -127,19 +127,18 @@ sub end_essayresponse {
}
my $uploadedflag=0;
if ($filename =~ /[^\s]/) {
- &Apache::lonnet::logthis("the file to upload is $filename");
- my $uploadedfiletypes= &Apache::lonnet::EXT("resource.$part".'_'."$id.uploadedfiletypes");
- $uploadedfiletypes=~s/[^\w\,]//g;
- $uploadedfiletypes=','.$uploadedfiletypes.',';
- my ($extension)=($filename=~/\.(\w+)$/);
- if ($uploadedfiletypes=~/\,$extension\,/i) {
- $Apache::lonhomework::results{"resource.$part.$id.uploadedfile"}=$filename;
- $Apache::lonhomework::results{"resource.$part.$id.uploadedurl"}=
- &Apache::lonnet::userfileupload('HWFILE'.$part.'_'.$id,undef,'essayresponse');
- $uploadedflag=1;
- } else {
- $award='INVALID_FILETYPE';
- }
+ my $uploadedfiletypes= &Apache::lonnet::EXT("resource.$part".'_'."$id.uploadedfiletypes");
+ $uploadedfiletypes=~s/[^\w\,]//g;
+ $uploadedfiletypes=','.$uploadedfiletypes.',';
+ my ($extension)=($filename=~/\.(\w+)$/);
+ if ($uploadedfiletypes=~/\,$extension\,/i) {
+ $Apache::lonhomework::results{"resource.$part.$id.uploadedfile"}=$filename;
+ $Apache::lonhomework::results{"resource.$part.$id.uploadedurl"}=
+ &Apache::lonnet::userfileupload('HWFILE'.$part.'_'.$id,undef,'essayresponse');
+ $uploadedflag=1;
+ } else {
+ $award='INVALID_FILETYPE';
+ }
} else {
$Apache::lonhomework::results{"resource.$part.$id.uploadedfile"}="";
$Apache::lonhomework::results{"resource.$part.$id.uploadedurl"}="";
|