--- loncom/homework/essayresponse.pm 2004/05/10 23:09:18 1.35
+++ loncom/homework/essayresponse.pm 2005/04/08 19:21:52 1.63
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# essay (ungraded) style responses
#
-# $Id: essayresponse.pm,v 1.35 2004/05/10 23:09:18 albertel Exp $
+# $Id: essayresponse.pm,v 1.63 2005/04/08 19:21:52 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -29,7 +29,7 @@
package Apache::essayresponse;
use strict;
use Apache::lonxml();
-use Apache::lonnet();
+use Apache::lonnet;
use Apache::lonlocal;
BEGIN {
@@ -44,47 +44,27 @@ sub start_essayresponse {
$result=&Apache::response::meta_package_write('essayresponse');
} elsif ($target eq 'web') {
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 $uploadedfiletypes= &Apache::lonnet::EXT("resource.$part".'_'."$id.uploadedfiletypes");
$uploadedfiletypes=~s/[^\w\,]//g;
- 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) {
$result .='
'.
'Collaborators: '.
- &mt('(Enter maximum [_1] collaborators using username or username@domain, e.g. smithje or smithje@[_2].)',$ncol,$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 .='
';
}
- if ($uploadedfiletypes) {
- $result.='
'.&mt('Submit a file:').
- ' '.
- &mt('Allowed filetypes: [_1]',$uploadedfiletypes).
- ' ';
- if ($uploadedfile) {
- my $url=$Apache::lonhomework::history{"resource.$part.$id.uploadedurl"};
- push (@Apache::lonxml::extlinks,$url);
- &Apache::lonnet::allowuploaded('/adm/essayresponse',$url);
- my $curfile=' '.
- $uploadedfile.'';
- $result.=&mt('Currently submitted: [_1]',$curfile);
- } else {
- $result.=&mt('(Hand in a file you have prepared on your computer)');
- }
- $result.='