--- loncom/homework/essayresponse.pm 2004/12/14 20:12:30 1.54
+++ loncom/homework/essayresponse.pm 2005/01/31 22:00:40 1.58
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# essay (ungraded) style responses
#
-# $Id: essayresponse.pm,v 1.54 2004/12/14 20:12:30 banghart Exp $
+# $Id: essayresponse.pm,v 1.58 2005/01/31 22:00:40 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -67,9 +67,7 @@ sub start_essayresponse {
if ($uploadedfiletypes) {
$result.='
'.&mt('Submit a file: (only one file can be uploaded)').
'
'.
- $part.'_'.$id.'" '.
+ $part.'_'.$id.'" /> '.
&mt('Allowed filetypes: [_1]',$uploadedfiletypes).' '.
'OR: Select Portfolio Files'.
' '.
@@ -110,14 +108,12 @@ sub end_essayresponse {
$Apache::lonhomework::results{"resource.$part.$id.collaborators"}=$collaborators
if ($collaborators ne $previous_list);
}
- if ( defined($ENV{'form.submitted'}) &&
- $ENV{'form.submitted'} eq 'scantron' ) {
+ if ( &Apache::response::submitted('scantron') ) {
$increment=&Apache::response::scored_response($part,$id);
- } elsif ( defined($ENV{'form.submitted'}) ) {
+ } elsif ( &Apache::response::submitted() ) {
my $response = $ENV{'form.HWVAL_'.$id};
my $filename= $ENV{'form.HWFILE'.$part.'_'.$id.'.filename'};
my $portfiles = $ENV{'form.HWPORT'.$part.'_'.$id};
- &Apache::lonnet::logthis("portfiles now $portfiles");
if (( $response =~ /[^\s]/) || ($filename =~ /[^\s]/) || ($portfiles =~ /[^\s]/)) {
my $award;
if ($ENV{'form.HWDRAFT'.$part.'_'.$id} eq 'yes') {
@@ -153,6 +149,8 @@ sub end_essayresponse {
&Apache::lonnet::clear_selected_files($name);
$uploadedflag=1;
} else {
+ my ($dsymb,$crsid,$domain,$name)=&Apache::lonxml::whichuser();
+ &Apache::lonnet::unmark_as_readonly($domain,$name,$dsymb.$crsid);
$Apache::lonhomework::results{"resource.$part.$id.portfiles"}="";
}
$Apache::lonhomework::results{"resource.$part.$id.submission"}=$response;
|