--- loncom/homework/essayresponse.pm 2002/07/09 17:18:25 1.8
+++ loncom/homework/essayresponse.pm 2002/07/19 20:43:11 1.9
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# essay (ungraded) style responses
#
-# $Id: essayresponse.pm,v 1.8 2002/07/09 17:18:25 ng Exp $
+# $Id: essayresponse.pm,v 1.9 2002/07/19 20:43:11 ng Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -40,10 +40,16 @@ sub start_essayresponse {
if ($target eq 'meta') {
$result=&Apache::response::meta_package_write('essayresponse');
}
-# if ($target eq 'web') {
-# $result='
Collaborators: ';
-# }
+ if ($target eq 'web') {
+ my $id = $Apache::inputtags::response['-1'];
+ my $part= $Apache::inputtags::part;
+ my $symb= &Apache::lonnet::symbread($ENV{'form.url'});
+# my $ncol= &Apache::lonnet::EXT('parameter\_$part\_$id\_maxcollaborators',$symb);
+ my $ncol= &Apache::lonnet::get($symb,['parameter\_$part\_$id\_maxcollaborators']);
+ $result ='
Collaborators:
'.$ncol.':
'.
+ '(Enter collaborators using username or username@domain, e.g. smithje or doej@msu or smithje@fsu.)';
+ }
return $result;
}
@@ -51,14 +57,16 @@ sub end_essayresponse {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
if ( $target eq 'grade' ) {
if ( defined $ENV{'form.submitted'}) {
- my $id = $Apache::inputtags::response['-1'];
- my $response = $ENV{'form.HWVAL'.$Apache::inputtags::response['-1']};
- my $collaborators = $ENV{'form.HWCOL'.$Apache::inputtags::response['-1']};
+ my $id = $Apache::inputtags::response['-1'];
+ my $response = $ENV{'form.HWVAL'.$id};
+ my $collaborators = $ENV{'form.HWCOL'.$id};
+# my $response = $ENV{'form.HWVAL'.$Apache::inputtags::response['-1']};
+# my $collaborators = $ENV{'form.HWCOL'.$Apache::inputtags::response['-1']};
if ( $response =~ /[^\s]/) {
my $part=$Apache::inputtags::part;
$Apache::lonhomework::results{"resource.$part.$id.submission"}=$response;
$Apache::lonhomework::results{"resource.$part.$id.awarddetail"}="SUBMITTED";
-# $Apache::lonhomework::results{"resource.$part.$id.collaborators"}=$collaborators;
+ $Apache::lonhomework::results{"resource.$part.$id.collaborators"}=$collaborators;
my %previous=&Apache::response::check_for_previous($response,$part,$id);
&Apache::response::handle_previous(\%previous,'SUBMITTED');
}