--- loncom/homework/essayresponse.pm 2004/10/27 18:30:48 1.44
+++ loncom/homework/essayresponse.pm 2004/12/04 19:16:42 1.51
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# essay (ungraded) style responses
#
-# $Id: essayresponse.pm,v 1.44 2004/10/27 18:30:48 banghart Exp $
+# $Id: essayresponse.pm,v 1.51 2004/12/04 19:16:42 banghart Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -51,9 +51,9 @@ sub start_essayresponse {
my $uploadedfile= &HTML::Entities::encode($Apache::lonhomework::history{"resource.$part.$id.uploadedfile"},'<>&"');
$result='
';
$result.=''.
- ' '.
+ ' '.
&mt('Submit entries below as answer to receive credit').' '.
- ' '.
+ ' '.
&mt('Save entries below as a draft answer (not submitting them for credit yet)').
' |
';
if ($ncol > 0) {
@@ -70,8 +70,8 @@ sub start_essayresponse {
$part.'_'.$id.'" onFocus="this.form.enctype='.
"'multipart/form-data'".';" />
'.
&mt('Allowed filetypes: [_1]',$uploadedfiletypes).'
'.
- 'OR:
Select Portfolio Files'.
+ 'OR:
Select Portfolio Files'.
'
'.
''.
'
';
@@ -140,8 +140,13 @@ sub end_essayresponse {
}
}
if ($portfiles =~ /[^\s]/) {
+ $portfiles =~s/,$//;
$Apache::lonhomework::results{"resource.$part.$id.portfiles"}=$portfiles;
- $Apache::lonhomework::results{"resource.$part.$id.uploadedurl"}=$portfiles;
+ my @submitted_files = split /,/,$portfiles;
+ my ($dsymb,$crsid,$domain,$name)=&Apache::lonxml::whichuser();
+ &Apache::lonnet::unmark_as_readonly($domain,$name,$dsymb.$crsid);
+ &Apache::lonnet::mark_as_readonly($domain,$name,\@submitted_files,$dsymb.$crsid);
+ &Apache::lonnet::clear_selected_files($name);
$uploadedflag=1;
}
$Apache::lonhomework::results{"resource.$part.$id.submission"}=$response;