--- loncom/homework/essayresponse.pm 2003/04/18 07:12:13 1.27
+++ loncom/homework/essayresponse.pm 2004/03/31 05:23:59 1.34
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# essay (ungraded) style responses
#
-# $Id: essayresponse.pm,v 1.27 2003/04/18 07:12:13 albertel Exp $
+# $Id: essayresponse.pm,v 1.34 2004/03/31 05:23:59 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -25,13 +25,12 @@
#
# http://www.lon-capa.org/
#
-# 4/3 Guy
-# July, 2002, H. K. Ng
-#
+
package Apache::essayresponse;
use strict;
-use Apache::lonxml;
-use Apache::lonnet;
+use Apache::lonxml();
+use Apache::lonnet();
+use Apache::lonlocal;
BEGIN {
&Apache::lonxml::register('Apache::essayresponse',('essayresponse'));
@@ -47,36 +46,39 @@ sub start_essayresponse {
my $part= $Apache::inputtags::part;
my $ncol= &Apache::lonnet::EXT("resource.$part".'_'."$id.maxcollaborators");
- my $coll= &HTML::Entities::encode($Apache::lonhomework::history{"resource.$part.$id.collaborators"});
+ my $coll= &HTML::Entities::encode($Apache::lonhomework::history{"resource.$part.$id.collaborators"},'<>&"');
my $uploadedfiletypes= &Apache::lonnet::EXT("resource.$part".'_'."$id.uploadedfiletypes");
$uploadedfiletypes=~s/[^\w\,]//g;
- my $uploadedfile= &HTML::Entities::encode($Apache::lonhomework::history{"resource.$part.$id.uploadedfile"});
+ my $uploadedfile= &HTML::Entities::encode($Apache::lonhomework::history{"resource.$part.$id.uploadedfile"},'<>&"');
$result='
'.
- ''.
- ' Submit entries below as answer to receive credit '. - ''. - ' Save entries below as a draft answer (not submitting them for credit yet) '. - ' |
'.
'Collaborators: '. - '(Enter maximum '.$ncol.' collaborators using username or username@domain, e.g. '. - 'smithje or smithje@'.$ENV{'user.domain'}.'.) '; + &mt('(Enter maximum [_1] collaborators using username or username@domain, e.g. smithje or smithje@[_2].)',$ncol,$ENV{'user.domain'}).' '; $result .= &check_collaborators($ncol,$coll) if ($coll =~ /\w+/); $result .=' |
Submit a file: Allowed filetypes: '.$uploadedfiletypes.' '; + "'multipart/form-data'".';" /> '. + &mt('Allowed filetypes: [_1]',$uploadedfiletypes). + ' '; if ($uploadedfile) { - $result.='Currently submitted: '.$uploadedfile.''; + my $curfile=' '. + $uploadedfile.''; + $result.=&mt('Currently submitted: [_1]',$curfile); } else { - $result.='(Hand in a file you have prepared on your computer)'; + $result.=&mt('(Hand in a file you have prepared on your computer)'); } $result.=' |