--- loncom/homework/essayresponse.pm 2003/01/13 21:24:02 1.16
+++ loncom/homework/essayresponse.pm 2003/01/23 22:28:55 1.19
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# essay (ungraded) style responses
#
-# $Id: essayresponse.pm,v 1.16 2003/01/13 21:24:02 sakharuk Exp $
+# $Id: essayresponse.pm,v 1.19 2003/01/23 22:28:55 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -47,6 +47,8 @@ sub start_essayresponse {
my $ncol= &Apache::lonnet::EXT("resource.$part".'_'."$id.maxcollaborators");
my $coll= &HTML::Entities::encode($Apache::lonhomework::history{"resource.$part.$id.collaborators"});
+ my $uploadedfiletypes= &Apache::lonnet::EXT("resource.$part".'_'."$id.uploadedfiletypes");
+ my $uploadedfile= &HTML::Entities::encode($Apache::lonhomework::history{"resource.$part.$id.uploadedfile"});
$result='
'. @@ -57,6 +59,18 @@ sub start_essayresponse { $result .= &check_collaborators($ncol,$coll) if ($coll =~ /\w+/); $result .=' |
Submit a file: Allowed filetypes: '.$uploadedfiletypes.' '; + if ($uploadedfile) { + $result.='Currently submitted: '.$uploadedfile.''; + } else { + $result.='(Hand in a file you have prepared on your computer)'; + } + $result.=' |
'.
''.
' Submit text below as answer to receive credit '. @@ -79,6 +93,10 @@ sub end_essayresponse { $Apache::lonhomework::results{"resource.$part.$id.collaborators"}=$collaborators if ($collaborators ne $previous_list); } + my $filename= $ENV{'form.HWFILE'.$part.'_'.$id.'.filename'}; + if ($filename =~ /[^\s]/) { + $Apache::lonhomework::results{"resource.$part.$id.uploadedfile"}=$filename; + } if ( defined $ENV{'form.submitted'}) { my $response = $ENV{'form.HWVAL'.$id}; if ( $response =~ /[^\s]/) { @@ -100,7 +118,7 @@ sub end_essayresponse { if ($Apache::lonhomework::type eq 'exam') { $result.='\begin{enumerate}\item[\textbf{'.$Apache::lonxml::counter.'}.]\textit{Live blank on scoring form}\vskip 0 mm'; &Apache::lonxml::increment_counter(); - $result.= '\item[\textbf{'.$Apache::lonxml::counter.'}.]\textit{Live blank on scoring form}\vskip 0 mm \end{enumerate}'; + $result.= '\item[\textbf{'.$Apache::lonxml::counter.'}.]\textit{Leave blank on scoring form}\vskip 0 mm \end{enumerate}'; &Apache::lonxml::increment_counter(); } } |