--- loncom/homework/essayresponse.pm 2002/08/07 16:23:05 1.15
+++ loncom/homework/essayresponse.pm 2003/01/22 17:29:21 1.17
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# essay (ungraded) style responses
#
-# $Id: essayresponse.pm,v 1.15 2002/08/07 16:23:05 albertel Exp $
+# $Id: essayresponse.pm,v 1.17 2003/01/22 17:29:21 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -30,6 +30,7 @@
#
package Apache::essayresponse;
use strict;
+use Apache::lonxml;
BEGIN {
&Apache::lonxml::register('Apache::essayresponse',('essayresponse'));
@@ -46,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='
'. @@ -56,6 +59,12 @@ sub start_essayresponse { $result .= &check_collaborators($ncol,$coll) if ($coll =~ /\w+/); $result .=' |
Submit a file: Allowed filetypes: '.$uploadedfiletypes.' (Hand in a file you have prepared on your computer) |
'.
''.
' Submit text below as answer to receive credit '. @@ -95,6 +104,13 @@ sub end_essayresponse { } } elsif ($target eq 'edit') { $result.=&Apache::edit::end_table(); + } elsif ($target eq 'tex') { + 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}'; + &Apache::lonxml::increment_counter(); + } } &Apache::response::end_response; |