--- loncom/homework/essayresponse.pm 2009/01/01 16:45:32 1.97
+++ loncom/homework/essayresponse.pm 2009/12/06 20:41:40 1.101.10.1
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# essay (ungraded) style responses
#
-# $Id: essayresponse.pm,v 1.97 2009/01/01 16:45:32 raeburn Exp $
+# $Id: essayresponse.pm,v 1.101.10.1 2009/12/06 20:41:40 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -60,16 +60,20 @@ sub start_essayresponse {
}
$result.='
';
if ( $Apache::lonhomework::type ne 'survey' ) {
- $result.= ''.
+ if ($env{'request.uri'} eq '/res/gci/gci/internal/submission.problem') {
+ $result .= '';
+ } else {
+ $result.= ' |
'.
' '.
''.
' |
';
+ }
}
if ($ncol > 0) {
@@ -267,7 +271,7 @@ sub file_submission {
}
my $uploadedfiletypes=
&Apache::lonnet::EXT("resource.$part".'_'."$id.uploadedfiletypes");
- if ($uploadedfiletypes) {
+ if ($uploadedfiletypes ne '') {
$uploadedfiletypes=~s/[^\w\,]//g;
$uploadedfiletypes=','.$uploadedfiletypes.',';
foreach my $file (@submitted_files) {
@@ -281,6 +285,8 @@ sub file_submission {
}
}
}
+ } else {
+ @acceptable_files = @submitted_files;
}
my $maxfilesize=&Apache::lonnet::EXT("resource.$part".'_'."$id.maxfilesize");
if (!$maxfilesize) {
@@ -378,7 +384,7 @@ sub file_submission {
$Apache::lonhomework::results{"resource.$part.$id.uploadedurl"}=
&Apache::lonnet::userfileupload('HWFILE'.$jspart.'_'.$id,undef,
$subdir);
- &Apache::lonnet::delenv($env{'form.HWFILE'.$jspart.'_'.$id});
+ delete($env{'form.HWFILE'.$jspart.'_'.$id});
}
} elsif ($which eq 'portfiles' &&
$Apache::lonhomework::history{"resource.$part.$id.$which"}) {
@@ -390,9 +396,9 @@ sub file_submission {
sub delete_form_items {
my ($jspart,$id) = @_;
- &Apache::lonnet::delenv($env{'form.HWFILE'.$jspart.'_'.$id.'.filename'});
- &Apache::lonnet::delenv($env{'form.HWFILE'.$jspart.'_'.$id.'.mimetype'});
- &Apache::lonnet::delenv($env{'form.HWFILE'.$jspart.'_'.$id});
+ delete($env{'form.HWFILE'.$jspart.'_'.$id.'.filename'});
+ delete($env{'form.HWFILE'.$jspart.'_'.$id.'.mimetype'});
+ delete($env{'form.HWFILE'.$jspart.'_'.$id});
}